I am trying to import osm.bz2 flie from http://download.geofabrik.de/. I think I am almost there though somehow my CMD returns error messages
I downloaded osmosis-latest file from http://bretth.dev.openstreetmap.org/osmosis-build/osmosis-latest.zip
what I followed was http://learnosm.org/en/osm-data/osmosis/ and system environment and everything else were set.
Yet, even the tutorial command.. which is extracting school POI and save it to school.osm is not working in my PC. I have bhutan-latest.osm.bz2 file and *.osm isn't pbf so I switch --rbf to --rx (read xml)
this is the entire code I used
osmosis --read-xml bhutan-latest.osm --nkv KeyValueList="amenity.school" --wx schools.osm
and the error messages are..
org.openstreetmap.osmosis.core.OsmosisRuntimeException: Argument keyValueListFile for task 2-nkv does not exist. and more..
so from this concept I tried to import the osm file to my postgis and this is my code
osmosis \ --rx file=bhutan-latest.osm \ --write-apidb host="localhost" database="worldmap"port="5433" user="postgres" password="postgres"
and it give me this error code
/mnt/c/Program Files (x86)/osmosis/bin/osmosis: 94: exec: java: Permission denied
by the way, I used both windows command and Ubuntu in windows 10
the reason why I am trying to use osmosis instead of osm2pgsql is I only need building footprint from OSM data. I believe osm2pgsql does not have extract query? If osm2pgsql can extract building footprint only, then I do not mind using osm2pgsql. osm2pgsql works fine in my Windows Ubuntu.
it takes so much time though, using windows10 ubuntu would be a lot easier for a person like me who does not have much knowledge of computer science.
you have to tune default.style.