pgRouting / osm2pgrouting

Import tool for OpenStreetMap data to pgRouting database
https://pgrouting.org
GNU General Public License v2.0
289 stars 111 forks source link

What is the bare minimum required on Overpass API do get an osm file that osm2pgrouting can use? #180

Open iboates opened 7 years ago

iboates commented 7 years ago

I working on an automated process of generating routing databases and I am thinking that I can save some time and resources if I use Overpass API to download just the data that is required, rather than the entire region or subregion from Geofabrik. Is there already a query defined, or maybe some kind of list that details exactly the features that are required to generate the routing database?

dkastl commented 7 years ago

There is no such list or instructions, that I'm aware of.

cvvergara commented 7 years ago

@iboates Yes, there are no instructions about this, but what you think make sense. So, taking your line of thought: after downloading the file from your favourite downloader that has nodes, ways & relations use osmium-tools to create a new file with:

and process the new file with osm2pgrouting (if you are on this, I will release 2.3 soon, you can find it in develop branch, if you want to give it a try)

PS, I haven't tested this idea

iboates commented 7 years ago

Thanks, @cvvergara

I will let you know how it goes

iboates commented 7 years ago

After headache after headache I have decided that I will put off trying to use bounding boxes on overpass to collect data. Despite the very general query of

[out:xml]; way({0},{1},{2},{3}); node({0},{1},{2},{3}); relation({0},{1},{2},{3}); (._;>;); out body;

(the braced numbers representing the bounding box parameters)

I continuously get not well-formed (invalid token) at line 1394*** Error in 'osm2pgrouting': double free or corruption (!prev): 0x0000000001225da0 ***

I would like to revisit this at some point, because i find the process of downloading an entire subregion and then performing a bounding box to be needlessly inefficient, but in the meantime it will just have to do.

cvvergara commented 7 years ago

@iboates Please try the one on develop On that version I removed the C pointers and I am using C++ containers