ad-freiburg / pfaedle

Precise map-matching for public transit feeds. Generates high-quality GTFS shapes from OSM data.
GNU General Public License v3.0
206 stars 29 forks source link

Example for the -X option #23

Closed sign0 closed 3 years ago

sign0 commented 3 years ago

Hi,

Could we have an example of using pfaedle with the -X option to filter and lighten an OSM dataset?

I'm working with several GTFS, the europe-latest.osm dataset, and it is very slow...

Is it possible to multithread ? Split the trips csv from or other approach ? I think pfaedle is running on one thread... And I have 15 other threads that are bored during this time... :)

Any, well done for the work, I prefer your solution to an OSRM with dubious lua profile... ;)

patrickbr commented 3 years ago

pfaedle is multithreaded, but the parsing and graph building isn't (the bottleneck here is mainly I/O).

If you have feeds A, B, C and OSM file europe-latest.osm, the following command should create a dataset containing everything you need (off the top of my head, no guarantee for correctness):

pfaedle -x europe-latest.osm -X europe-transit.osm -m all A B C

Multiple input feeds are allowed in filter (-X) mode. If you are just shapefying for trains, use -m rail, for example.

You can also try to pre-filter the OSM file with osmconvert or osmfilter, e.g. remove the meta information (authors names, timestamps, etc) or drop stuff you are certain you don't need.

sign0 commented 3 years ago

Thanks, it works perfectly !