hi i am putting osm data into postgres using osmosis the command i use is : osmosis --read-xml file="/home/ubuntu/osmosis/bin/eu_filterxrx.osm" --write-apidb host="localhost" database="osm_test-1" user="shafi" password="lhoft" validateSchemaVersion="no" writing it to an apidb. Doing this makes converts my latitude and longitudes to integers for some reason orignal data looks like this: as you can see lat and long are both decimals above. but once i put the data into postgres and i view it using pgadmin the lat and lon are no longer deicmals they are now integers making them useless. how do i stop it doing that, Thanks in Advance asked 30 Nov '20, 17:03 shafi-as |
You have explicitly asked for an "apidb" database. The "apidb" schema is optimised for processing by the "openstreetmap-website" software and nothing else. The openstreetmap-website code expects the latitudes and longitudes to be written exactly like they are here. If you want to do anything else with the OSM data than using it with the openstreetmap-website code, then do not use the apidb schema. Import the data with osm2pgsql instead. answered 30 Nov '20, 17:35 Frederik Ramm ♦ i need to use the apidb schema as i have cloned the osm webpage and im viewing this data in josm on my own private server, osm2pgsql doesnt allow me to do that from what i have heard.
(30 Nov '20, 18:21)
shafi-as
1
True, but if you view the data in JOSM then everything is fine, as the openstreetmap-website (or cgimap) code that sits between JOSM and the database will convert these coordinates for you.
(30 Nov '20, 18:24)
Frederik Ramm ♦
|