[OSM-Devserver] osmosis gurus needed

Christoph Wagner freemaps.osm at googlemail.com
Mi Apr 7 11:26:45 CEST 2010


Hello,

I want to improve the speed of the garmin all in one map by filtering the osm-input data with osmosis.

My problem is, to extract different features from one osm file and write it to multiple output files.

I know there are some filters for this purpose but my special question is:

Can I split an osm file with osmosis in such objects that matches a filter and the rest?

Lets assume I need all highways from an osm file in a separate file and all other objects in another one. Is that possible with osmosis?

input: europe.osm
output: roads_europe.osm and non_roads_europe.osm

How should I do this?

I think I can get all highways and relations with this, but what about the rest?

osmosis \
  --read-xml europe.osm \
  --tf accept-ways highway=* \
  --used-node \
  --write-xml roads_europe.osm

or do I have to use 2 separate pipelines like this:

osmosis \
  --read-xml europe.osm \
  --tee \
  --tf accept-ways highway=* \
  --used-node \
  --write-xml roads_europe.osm \
  --tf reject-ways highway=* \
  --write-xml non_roads_europe.osm

I don't know if this is clever enough because you have to filter it two times.
And what about the nodes that are used only in highways? Can I get rid of them?

Thanks for help
Christoph

-------------- nächster Teil --------------
Ein Dateianhang mit Binärdaten wurde abgetrennt...
Dateiname   : signature.asc
Dateityp    : application/pgp-signature
Dateigröße  : 197 bytes
Beschreibung: OpenPGP digital signature
URL         : <https://lists.openstreetmap.de/pipermail/devserver/attachments/20100407/c35cb239/attachment.pgp>