Open AzilAverakot opened 6 months ago
Attention: Patch coverage is 12.12121%
with 29 lines
in your changes are missing coverage. Please review.
Project coverage is 82.50%. Comparing base (
c30254c
) to head (16cf6d2
). Report is 2 commits behind head on master.:exclamation: Current head 16cf6d2 differs from pull request most recent head 3def3b4. Consider uploading reports for the commit 3def3b4 to get more accurate results
Files | Patch % | Lines |
---|---|---|
src/graph.jl | 10.00% | 18 Missing :warning: |
src/parse.jl | 15.38% | 11 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
The goal of this change is to allow users to add custom tags to the OSM graph.
MM 3rd network file in this agreed format will contain OSM tags together with vicmap tags and custom tags.
In this pr I add functions to add custom tags to the tags dictionary for ways and nodes. This will only be done if the user provides the dictionary filter to specify which custom tags to ingest.
For example, given the following sample file structure:
{
"version": "dtp_osm_road_network_transport:2.2",
"timestamp_osm_base": "2023-12-05T23:27:21.722",
"elements": [
{
"id": "OSM&&NODE10000307796",
"type": "node",
"lon": 145.2680669,
"lat": -37.7890839
},
{
"id": "OSM&&NODE10000307797",
"type": "node",
"lon": 145.2680689,
"lat": -37.7891024
},
{
"dtp_id": "DTP&&WAY123456789"/"OSM&&WAY123456789",
"way_id": "OSM&&WAY123456789",
"type": "way",
"nodes": ["OSM&&NODE10000307796", "OSM&&NODE10000307797", "OSM&&NODE10000307798"],
"source_matched_id": "VICMAP_TRANSPORT&&59472156",
"tags": {
"name": "Ormiston Place",
"nodes": ["OSM&&NODE10000307796", "OSM&&NODE10000307797", "OSM&&NODE10000307798"],
"source": "nearmap",
"highway": "residential",
"more fields": "..."
},
"custom_tags": {
"DTP_REG_NAME": "GREATER METRO",
"LGA_ABB_NAME": "CASEY",
"MEL30_ART": "N",
"more fields": "..."
},
"vmt_tags": {
"ufi": "59472156",
"div_rd": "U",
"road_name": "ORMISTON",
"road_seal": "1",
"more fields": "..."
}
},
]
}
to ingest selected vmt_tags and custom_tags the user needs to provide the following dictionary as the function input:
tags_filter = Dict(
"custom_tags" => ["DTP_REG_NAME", "LGA_ABB_NAME", "MEL30_ART"],
"vmt_tags" => ["ufi", "div_rd"]
)
When user provides a dictionary that contains the names of custom tags that need to be ingested those tags are added to ways and nodes.