Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recieve Exception "There are no edges remaining after parsing" when using custom built OSM data #7099

Open
LeePhillipsServiceStream opened this issue Jan 20, 2025 · 3 comments

Comments

@LeePhillipsServiceStream
Copy link

LeePhillipsServiceStream commented Jan 20, 2025

Hello, this issue is likely extremely similar to this issue "#6340"

I am trying to run the "osrm-extract" on a custom made .osm built using road data for Melbourne city in Australia.

I have already tried the publicly available .osm data for Melbourne city but also want to utilize custom made data to better understand the osrm system.

I am receiving the following error.

osrm-extract.exe map_data\melbourne_darko\roadLocalJson_lower.osm -p profiles\car.lua
[info] Parsed 0 location-dependent features with 0 GeoJSON polygons←[0m
[info] Using script profiles\car.lua←[0m
[info] Input file: roadLocalJson_lower.osm←[0m
[info] Profile: car.lua←[0m
[info] Threads: 12←[0m
[info] Parsing in progress..←[0m
[info] input file generated by josm←[0m
[info] timestamp: n/a←[0m
[info] Using profile api version 4←[0m
[info] Found 3 turn restriction tags:←[0m
[info]   motorcar←[0m
[info]   motor_vehicle←[0m
[info]   vehicle←[0m
[info] Parse relations ...←[0m
[info] Parse ways and nodes ...←[0m
[info] Using profile api version 4←[0m
[info] Using profile api version 4←[0m
[info] Using profile api version 4←[0m
[info] Using profile api version 4←[0m
[info] Using profile api version 4←[0m
[info] Using profile api version 4←[0m
[info] Using profile api version 4←[0m
[info] Using profile api version 4←[0m
[info] Using profile api version 4←[0m
[info] Using profile api version 4←[0m
[info] Using profile api version 4←[0m
[info] Parsing finished after 35.099 seconds←[0m
[info] Raw input contains 1182064 nodes, 545595 ways, and 0 relations, 0 restrictions←[0m
←[31m[error] [exception] There are no edges remaining after parsing.src\extractor\extractor.cpp:580
←[0m

I am almost certain it is because I am missing certain tags that are controlled by the car.lua config. I am finding it difficult to find information regarding how to edit the car.lua config to control the functionality of the osrm program.

Here is an example <way> along with an example <node> from my osm set

<node id='462044' lat='-37.92541000015' lon='145.09377000021' />

<way id='230500'>
    <nd ref='462044' />
    <nd ref='462045' />
    <tag k='alternate_street_name' v='16' />
    <tag k='boat_ferry' v='n' />
    <tag k='bridge' v='n' />
    <tag k='carpool_road' v='n' />
    <tag k='construction_status_closed' v='n' />
    <tag k='controlled_access' v='n' />
    <tag k='express_lane' v='n' />
    <tag k='four_wheel_drive' v='n' />
    <tag k='from_any_hazmat_restriction' v='n' />
    <tag k='from_avgspeed_minutes' v='0.095000000000000001' />
    <tag k='from_bdouble_19_tpr' v='n' />
    <tag k='from_bdouble_23_tpr' v='n' />
    <tag k='from_bdouble_25_tpr' v='n' />
    <tag k='from_bdouble_26hml_tpr' v='y' />
    <tag k='from_bdouble_26_tpr' v='y' />
    <tag k='from_bdouble_27_5_tpr' v='n' />
    <tag k='from_bdouble_hml_tpr' v='n' />
    <tag k='from_bdouble_tpr' v='n' />
    <tag k='from_btriple_hml_tpr' v='n' />
    <tag k='from_btriple_tpr' v='n' />
    <tag k='from_freeflow_minutes' v='0.095000000000000001' />
    <tag k='from_mod_speedkph_minutes' v='0.152' />
    <tag k='from_pbs2a_tpr' v='y' />
    <tag k='from_pbs2b_tpr' v='y' />
    <tag k='from_pbs3a_tpr' v='n' />
    <tag k='from_pbs3b_tpr' v='n' />
    <tag k='from_pbs4a_tpr' v='n' />
    <tag k='from_ref_speed_limit_kph' v='60' />
    <tag k='from_restrict_buses' v='n' />
    <tag k='from_restrict_carpools' v='n' />
    <tag k='from_restrict_cars' v='n' />
    <tag k='from_restrict_deliveries' v='n' />
    <tag k='from_restrict_emrgncy_vehicles' v='n' />
    <tag k='from_restrict_motorcycles' v='n' />
    <tag k='from_restrict_pedestrians' v='n' />
    <tag k='from_restrict_taxis' v='n' />
    <tag k='from_restrict_through_traffic' v='n' />
    <tag k='from_restrict_trucks' v='n' />
    <tag k='from_semi_trailer_restriction' v='n' />
    <tag k='from_single_axle_restriction' v='n' />
    <tag k='from_speedkph_minutes' v='0.095000000000000001' />
    <tag k='from_speedlimit_minutes' v='0.095000000000000001' />
    <tag k='from_tandem_axle_restriction' v='n' />
    <tag k='from_tpr' v='y' />
    <tag k='from_triple_axle_restriction' v='n' />
    <tag k='from_truck_speedlimit_minutes' v='0.095000000000000001' />
    <tag k='from_weekday_minutes' v='0.095000000000000001' />
    <tag k='from_weekend_minutes' v='0.095000000000000001' />
    <tag k='from_zlevel' v='0' />
    <tag k='frontage' v='n' />
    <tag k='functional_class' v='3' />
    <tag k='iso_country_code' v='aus' />
    <tag k='left_locality' v='oakleigh south' />
    <tag k='length_m' v='95' />
    <tag k='link_id' v='134317924' />
    <tag k='manoeuvre_class' v='0' />
    <tag k='objectid' v='229922' />
    <tag k='objectid_1' v='229922' />
    <tag k='paved' v='y' />
    <tag k='private' v='n' />
    <tag k='public_access' v='y' />
    <tag k='rail_ferry' v='n' />
    <tag k='ramp' v='n' />
    <tag k='restrict_emergency_vehicles' v='n' />
    <tag k='road_class' v='6' />
    <tag k='roundabout' v='n' />
    <tag k='speed_kph' v='60' />
    <tag k='street_name' v='centre rd' />
    <tag k='shape_length' v='120.5164737200862' />
    <tag k='timezoneid' v='2' />
    <tag k='tollway' v='n' />
    <tag k='to_any_hazmat_restriction' v='n' />
    <tag k='to_avgspeed_minutes' v='0.095000000000000001' />
    <tag k='to_bdouble_19_tpr' v='n' />
    <tag k='to_bdouble_23_tpr' v='n' />
    <tag k='to_bdouble_25_tpr' v='n' />
    <tag k='to_bdouble_26hml_tpr' v='y' />
    <tag k='to_bdouble_26_tpr' v='y' />
    <tag k='to_bdouble_27_5_tpr' v='n' />
    <tag k='to_bdouble_hml_tpr' v='n' />
    <tag k='to_bdouble_tpr' v='n' />
    <tag k='to_btriple_hml_tpr' v='n' />
    <tag k='to_btriple_tpr' v='n' />
    <tag k='to_freeflow_minutes' v='0.095000000000000001' />
    <tag k='to_mod_speedkph_minutes' v='0.152' />
    <tag k='to_pbs2a_tpr' v='y' />
    <tag k='to_pbs2b_tpr' v='y' />
    <tag k='to_pbs3a_tpr' v='n' />
    <tag k='to_pbs3b_tpr' v='n' />
    <tag k='to_pbs4a_tpr' v='n' />
    <tag k='to_ref_speed_limit_kph' v='60' />
    <tag k='to_restrict_buses' v='n' />
    <tag k='to_restrict_carpools' v='n' />
    <tag k='to_restrict_cars' v='n' />
    <tag k='to_restrict_deliveries' v='n' />
    <tag k='to_restrict_emergency_vehicles' v='n' />
    <tag k='to_restrict_motorcycles' v='n' />
    <tag k='to_restrict_pedestrians' v='n' />
    <tag k='to_restrict_taxis' v='n' />
    <tag k='to_restrict_through_traffic' v='n' />
    <tag k='to_restrict_trucks' v='n' />
    <tag k='to_semi_trailer_restriction' v='n' />
    <tag k='to_single_axle_restriction' v='n' />
    <tag k='to_speedkph_minutes' v='0.095000000000000001' />
    <tag k='to_speedlimit_minutes' v='0.095000000000000001' />
    <tag k='to_tandem_axle_restriction' v='n' />
    <tag k='to_tpr' v='y' />
    <tag k='to_triple_axle_restriction' v='n' />
    <tag k='to_truck_speedlimit_minutes' v='0.095000000000000001' />
    <tag k='to_weekday_minutes' v='0.095000000000000001' />
    <tag k='to_weekend_minutes' v='0.095000000000000001' />
    <tag k='to_zlevel' v='0' />
    <tag k='transport_verified' v='y' />
    <tag k='travel_direction' v='b' />
    <tag k='tunnel' v='n' />
    <tag k='urban' v='y' />
    <tag k='length' v='0.095176118157913575' />
  </way>

Please tell me the most obvious missing tags from this way

Please tell me if there are any obvious formatting errors from the example

My data set only contains nodes and ways (to act as intersections and edges respectively in the road network graph)
Do you think this is enough? Is there more osm data that needs to be added for the osrm program to function?

Finally, is there an information source for how to properly edit the car.lua script, what various features could be added to it and what feature defines the filtering process when running osrm-extract?

Thank you very much for your help

@jcoupey
Copy link

jcoupey commented Jan 21, 2025

If you want your ways to be parsed by OSRM, you need to comply to the OpenStreetMap format. Road infrastructure is typically described using the highway key. A good starting point is the wiki page on highway (and pages for specific values described there).

If you want to further understand how profiles work, you want to check out the documentation or directly look at the code. For example this snippet is storing the default speed used based on the values of the highway tag:

speeds = Sequence {
highway = {
motorway = 90,
motorway_link = 45,
trunk = 85,
trunk_link = 40,
primary = 65,
primary_link = 30,
secondary = 55,
secondary_link = 25,
tertiary = 40,
tertiary_link = 20,
unclassified = 25,
residential = 25,
living_street = 10,
service = 15
}
},

@LeePhillipsServiceStream
Copy link
Author

LeePhillipsServiceStream commented Jan 21, 2025

Awesome, after some more searching I suspected the highway = something tag was significant.

Thanks for the confirmation

The data that I have also has speed encodings on it as an extra tag on the ways.

Is there an option within the car.lua profile to enable the osrm-extract to use the speed encoding?

@jcoupey
Copy link

jcoupey commented Jan 22, 2025

If you want to use a custom tag containing speed, you'll have to adjust the lua parsing code in the profile. Another option would be to use the built-in support for traffic data to pass in speeds between pair of nodes, see https://github.com/Project-OSRM/osrm-backend/wiki/Traffic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants