1

I want to display entire country OSM data in my application.
The problem my application don't know how to deal large maps.
Instead of chunking the map into 5-10 small chunks, I wish to display only the following items:

highway=trunk, highway=trunk_link, highway=primary,highway=primary_link, highway=secondary, highway=secondary_link,highway=tertiary,highway=tertiary_link ,highway=motorway, highway=motorway_link

All roads but residentials. I don't want to show rails, polygon shapes (area, landuse, parks.. etc..) Only roads!

But after running this command:

osmosis.bat --read-xml "C:\belgium-latest.osm" --tag-filter accept-nodes highway=trunk, highway=trunk_link, highway=primary,highway=primary_link, highway=secondary, highway=secondary_link,highway=tertiary,highway=tertiary_link ,highway=motorway, highway=motorway_link --write-xml "C:\belgium-latest-highwayOnly.osm"

I still have the other shapes (not only highways) and the osm file is too big.. it shrunk only 25%~.. i hoped it to be smaller.

I am doing something wrong ? should i add objects to reject-nodes attribute ?

  • 1
    the tool i started using instead osmosis is osmfilter with the following: osmfilter.exe belgium-latest.osm --keep="highway=primary =primary_link =trunk =trunk_link =secondary =secondary_link =tertiary =tertiary_link =motorway =motorway_link, =residential =residential_link " >bel_highway_all.osm – ilansch Jun 18 '15 at 10:24
  • 1
    I also recommend to try wiki.openstreetmap.org/wiki/Osmfilter as an alternative to osmosis ... try to read all ist documentation in the OSM wiki. – stephan75 Jun 18 '15 at 17:00
1

Your syntax looks odd, please try the original code snippets and alter them step by step till you get the desired results:
https://wiki.openstreetmap.org/wiki/Osmosis#Example_usage
It's also wise to start with an pretty small area, so your processing is fast and doesn't prevent you from testing :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.