This refer to this post : Read Here
I'm in trouble when using osmosis command line to export data from planet-latest.osm.bz2 directly to osm2pgsql using some criteria to select what to transfer.
I think is more easy to export planet-latest.osm.bz2 to an XML with osmosis and then use osm2pgsql to import to Postgre, but I can't go further. So I need help in osmosis parameters to show how can I to export data using filters like
--place='city' --admin_level='2'
and import to Postgre using osm2pgsql.
Sorry about this very similar post, but the user was helping me was gived up.
osmosis --read-xml brazil.osm.bz2 --node-key-value keyValueList="place.city,admin_level.2" --write-xml output.osmI doosm2pgsql -c -s -d OSMTest -U postgres -W -H 10.5.112.210 -P 5432 ./output.osm -S ./default.styleand the data was imported the way I need. Next I will try put all togeter in one step and try with planet-latest.osm.bz2. – Magno C Dec 12 '12 at 12:49-at the end. Give that a try (should work on Windows or Linux) – dwurf Dec 12 '12 at 23:26