[OSM-dev] Question running osmosis (node-key-value and way-key-value at the same time)
Christoph Eckert
ce at christeck.de
Tue Jun 23 23:56:17 BST 2009
Hi Brett,
> That type of error is usually because you're running java 1.5 or older.
> From your previous emails you seem to be running java 1.6 which should
> be okay. Can you double check to make sure you're still using 1.6? If
> you are then I'm not sure what's going on ...
there's a global Java 1.5 installation, and a local 1.6 installation in ~/bin/
I adjusted the osmosis shell script to use the latter one and yeah, it's up
and running! Thanks a bunch for the help.
Of course it immediately triggers the next question :) . I try to extract some
data from an osm file which shall only contain the base net of roads,
railways and cities. E.g. I do:
./osmosis-0.31/bin/osmosis
--read-xml file="planet.bz2"
--node-key-value keyValueList="place.city"
--way-key-value
keyValueList="highway.motorway,highway.motorway_link,highway.motorway_junction,highway.trunk,highway.trunk_link"
--write-xml file="basemap.osm"
This only writes nodes, no ways at all. Removing the nodes, it will write
ways:
./osmosis-0.31/bin/osmosis
--read-xml file="planet.bz2"
--way-key-value
keyValueList="highway.motorway,highway.motorway_link,highway.motorway_junction,highway.trunk,highway.trunk_link"
--write-xml file="basemap.osm"
So I thought I need to use the pipes as found in the documentation. So I
tried:
./osmosis-0.31/bin/osmosis
--read-xml file="planet.bz2"
outPipe.0="readpipe"
--node-key-value keyValueList="place.city"
inPipe.0="readpipe" outPipe.0="outpipe"
--way-key-value
keyValueList="highway.motorway,highway.motorway_link,highway.motorway_junction"
inPipe.0="readpipe" outPipe.0="outpipe"
--write-xml file="basemap.osm"
inPipe.0="outpipe"
However, osmosis does not like my syntax. I'm obviously using the pipes in a
wrong or at least unsupported :) manner. Any hint is much appreciated. Do I
need the pipes in this case? If so, what should I change? Or an alternative
syntax?
Thanks & best regards,
ce
More information about the dev
mailing list