PgOSM Flex (GitHub) provides high quality OpenStreetMap datasets in PostGIS using the osm2pgsql Flex output. This project provides a curated set of Lua and SQL scripts to clean and organize the most commonly used OpenStreetMap data, such as roads, buildings, and points of interest (POIs).
Running PgOSM Flex is easy via the PgOSM Docker image hosted on Docker Hub.
- The quick start shows how easy it is to get started
- Change how PgOSM Flex runs with common customizations
- Customize layersets to change what data you load
- Configure connection to external database, and use replication
- High quality spatial data
- Easy to customize
- Easy to use
A few decisions made in this project:
- ID column is
- Geometry column named
- Defaults to same units as OpenStreetMap (e.g. km/hr, meters)
- Data not included in a dedicated column is available from
- Points, Lines, and Polygons are not mixed in a single table
- Tracks latest Postgres, PostGIS, and osm2pgsql versions
This project's approach is to do as much processing in the Lua styles passed along to osm2pgsql, with post-processing steps creating indexes, constraints and comments.
Minimum versions supported:
- Postgres 12
- PostGIS 3.0
This project will attempt, but not guarantee, to support PostgreSQL 12 until it reaches it EOL support.
The osm2pgsql version requirement is no longer relevant. Users of the Docker image naturally use the latest version of osm2pgsql at the time the Docker image was created.
osm2pgsql requires at least 2 GB RAM.
Fast SSD drives are strongly recommended. It should work on slower storage devices (HDD, SD, etc), however the osm2pgsql-tuner package used to determine the best osm2pgsql command assumes fast SSDs.