PostgreSQL
From OpenStreetMap Wiki
(Redirected from Postgresql)
PostgreSQL (postgresql.org) is an Open Source relational database. Since API v0.6 it is used for the main central OSM database running on Servers/smaug. For technical details of how this can be set up to work with the OMS rails app, see The Rails Port and Database schema.
Geospatial capabilities
PostgreSQL has geometry types. For our core OSM database we do not use these. We have our own representation of OpenStreetMap Data Primitives.
The PostGIS extension for PostgreSQL is often used for geographic data. PostGIS adds geospatial functions and two metadata tables. Again we do not use this for our core database, however we do use all of these things on the tile server database as required by the Mapnik rendering engine.
- Osmosis can be used to populate a more general PostgreSQL/PostGIS database from a Planet.osm OSM data dump file.
- osm2postgresql is powered by Osmosis and does much more (but works only on GNU/Linux)
- osm2pgsql handles transformation of the planet data into the expected format.
- OSM2PostGIS pretty new
- OSM in a box has a own converter
- Imposm PostGIS importer that supports custom DB schemas. Can import planet files with low memory.
- osm2pgrouting imports to PostgreSQL/PostGIS database for routing purpose.
See Also
- Database - About the main OSM database
- Databases and data access APIs - compares the tool specific schemas
- PostGIS
- MySQL
- Osmosis PostGIS Setup