NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

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's gravatar image

kope
55447
accept rate: 0%

edited 19 Mar '18, 10:05

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

(19 Mar '18, 11:23) SK53 ♦
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×252
×191
×60
×47
×30

question asked: 19 Mar '18, 09:30

question was seen: 1,513 times

last updated: 19 Mar '18, 11:23

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum