I have dovnloaded "historical" planet file from 2015 year. I need select only some features in the Europe area. As first I used osmosis for this operation: osmosis --read-xml file="d:\DATA_works\meff2018\planet_2015\planet-151228.osm" --bounding-polygon file="europe.poly" --tf accept-ways highway= --write-xml file="d:\DATA_works\meff2018\planet_2015\all_HWs_2015_europe.osm"* But this command selected only nodes from the planet files, not lines. So I tried second option - combination of osmfilter and osmconvert commands: *osmfilter d:\DATA_works\meff2018\planet_2015\planet-151228.osm --keep="highway= motorway =motorway_link =trunk =trunk_link =primary =primary_link =secondary =secondary_link =tertiary= tertiary_link" -o=e:\data\osm2015\accepted_HWs_world.osm osmconvert e:\data\osm2015\accepted_HWs_world.osm -B=europe.poly -o=e:\data\osm2015\accepted_HWs_europe.osm* After this, I have file with lines for Europe. But there are ALL highways - not only this, which are mentioned in the --keep option in the osmfilter command. Can you tell me what I'm doing wrong, please? asked 19 Mar '18, 09:30 kope |
at least one problem might be that you have a space between "highway=" and "motorway". This is what I use in a parameter file:
--keep=highway=motorway =motorway_link =trunk =trunk_link =primary =primary_link =secondary =secondary_link =tertiary =residential =unclassified =pedestrian
--drop-relations