[GIS] Using Osmosis to extract highways and move to a MySQL database

openstreetmaposmosis

I am pretty new to using Osmosis and I have been having a hard time of getting it going. So basically I am trying to extract highway data from the latest osm planet dump file using osmosis and moving into a mysql database.

I followed the simple script of

osmosis --read-pbf file="C:\A\Osmosis\planet.pbf" --tf accept-ways highways=* --used-node --write-xml highways

But I keep getting the error
"the following named pipes () and 1 default pipes have not been terminated with appropriate output sinks."

Can anyone help me. 🙂

Best Answer

I recommend to try your osmosis based filtering with a smaller country extract first. See Planet.osm wiki page for sources about raw OSM data, especially geofabrik.de Because processing the whole planet.pbf file can cause errors related to disc space or RAM.

But I cannot give you a concrete solution about your error message from osmosis, sorry.

As an alternative to osmosis, you can try osmfilter in connection with osmconvert.