開放街圖標誌 OpenStreetMap 開放街圖

Importing OSM data to PostgreSQL using imposm3

於 2022年四月 9日 由 tomczkEnglish發表。

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 **

電子郵件圖示 藍天圖示 Facebook 圖示 LinkedIn 圖示 乳齒象圖示 Telegram 圖示 X 圖示

討論

登入 來留下評論