OpenStreetMap logo OpenStreetMap

If you want to import OpenStreetMap data to PostgreSQL (+ PostGIS) database two popular tools are osm2pgsql and imposm3.

Both were designed to prepare data for rendering although some time ago osm2pgsql was upgraded with scripting capabilities that go beyond simple mapping files that specify what tables to create and what objects should be inserted there (filter by tags).

There is also osmosis if you want a - more or less - copy of OpenStreetMap database.

imposm3 development was put on hold due to lack of funding while osm2pgsql is actively developed. This makes it questionable choice to use imposm3 but it does have some nice qualities that can make it better for some projects.

In my opinion it’s a very good tool that is useful when:

  • you have a webapp and want to use OSM data but Overpass API is too slow/limited
  • you want to use OSM data for spatial analysis and keep it updated

** The rest is of the text including instructions how to import data is in my github page: https://ttomasz.github.io/2022-04-08/osm-import-data-with-imposm **

Discussion

Log in to leave a comment