[OSM-dev] osmosis advice
Pierre-Alain Dorange
pdorange at mac.com
Tue Apr 26 10:09:03 BST 2011
Thanks to you, i'm using osmosis to extract data from OSM.
But i'm new to osmosis and i got some (little) troubles.
Data i extract (based on tag filtering) are not complete (as they were
with XAPI i used before).
For example when i run :
./osmosis --rb "france.osm.pbf" --tf accept-nodes \
"man_made=surveillance" --tf accept-ways "man_made=surveillance" \
--tf accept-relations "man_made=surveillance" --wx fr_surveillance.xml
I got all nodes, ways and relations with "man_made=surveillance" but for
ways or relation i do not have they corresponding nodes.
For exemple i got a way tagged "man_made=surveillance" associated with
its list of nodes, but those nodes are not in the output file so i'm not
able to process them (i just want to compute the barycenter so i can put
an icon on my final map fr the way/relation).
What i need is nodes, ways and relations with the tag (OK) but also
complete (nodes and ways associated to made a complete data set).
Another exeample if i run :
./osmosis --rb "france.osm.pbf" --tf accept-nodes \
"man_made=surveillance" --wx fr_surveillance.xml
i got a huge XML file : 10 GB ! (glups) : probably too big to be
process.
Adding the option --un (used nodes) made osmosis to fails (out of
memory, i run java with -Xmx1024m option)
I do not really understand how osmosis really works... and how to use
it...
Looking at many example, i seems i have to run seval osmosis request
(but i do not really understand which) and finally merge results.
I continue experiences but i seems tricky to used osmosis...
Note :
i used osmosis 0.39 on MacOS X 10.6
The data (france.osm.pbf) came from geofabrick.
--
Pierre-Alain Dorange
OSM experiences : <http://www.leretourdelautruche.com/map/>
More information about the dev
mailing list