1

I am new to using OpenStreetMap data and PostGIS database. I learned how to use osm2pgsql and transferred osm data for a small city to PostGIS database and worked fine. The problem is that when I try to do the same for bigger cities or for a whole country it does not work.

So my question is how to use osm2pqsl for transfering large amount of data?

or if there is another option to do this job?

I am interested to read all attributes and tags in OSM that is why downloading shapefile is not a solution for me.

  • 3
    Can you elaborate on "it does not work"? – scai Apr 25 '15 at 18:58
0

Maybe osmosis is the option you are looking for. You can use osmosis to import all tags into the postgis database. Since osmosis does not build GIS ready to use objects you must do this in a separate process using SQL. A very good collection to start with are the osmosis layers from moenk available on github.

1

osm2pgsql is surely designed to import the whole planet into postgis. You have to make sure to use a recent version of osm2pgsql, because the node numbers in OSM have hit a limit which made it necessary to change the number format from integer to long integer. Older versions of osm2pgsql will fail therefore.

On windows, there are a few more pitfalls. You can follow https://github.com/openstreetmap/osm2pgsql/issues/17 to get the latest Windows binaries.

If you need more tags than the standard rendering toolchain, you can expand the default style to fit your needs.

  • Thank you for providing hints. I tried osmosis and it worked fine, so I didn't follow to solve my problem anymore. – New OSMer Jun 8 '15 at 14:23

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.