1

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.

  • 1
    seems like I can edit default.style and read it in my osm2pgsql command line. just add -m --slim --drop --style building.style – Pil Kwon May 16 '18 at 2:55
  • Er, "/mnt/c/Program Files (x86)/osmosis/bin/osmosis: 94: exec: java: Permission denied" suggests that you're using a Windows version of an osmosis script on Linux (by mounting a Windows drive with the software installed there). Whatever you're trying to do, you probably don't want to do it like that. If you install osmosis on Linux it should pull in dependencies as described in the "osmosis" part of wiki.openstreetmap.org/wiki/User:SomeoneElse/… . – SomeoneElse May 17 '18 at 12:15
  • It is not clear if you have unzipped the .osm file from .bz2 or not. Have you? – user30184 Aug 28 '18 at 5:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.