Why not ask your question on the new OpenStreetMap Community Forum?

From the component overview on the wiki I see that a plain Postgres is used for the main database (marked as "PostgreSQL backend"). What is the reason no GIS database (like PostGIS) is used? Would it not bring any advantages?

I see PostGIS being used in the rendering part of the system. Can someone explain why is it used there?

asked 22 Oct '16, 20:04

Kozuch's gravatar image

accept rate: 8%

The strength of PostGIS is geometry operations with "simple features" - points, lines, and polygons. PostGIS offers functionality to compute the geometric relation between such features (whether they intersect or touch or contain each other, for example). All this is not required for the central OSM database because in that database, the only geometries that exist are nodes. While ways and relations can be used to form lines and polygons, this is a geometric interpretation that the database is fully ignorant of.

Using PostGIS in the backend would add an unnecessary layer of complexity, and the additional functionality is not useful there.

This is different in the rendering database, where OSM objects are transformed into "simple features" when imported by osm2pgsql (a misnomer really - it should be osm2postgis).

permanent link

answered 22 Oct '16, 22:27

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
accept rate: 23%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 22 Oct '16, 20:04

question was seen: 2,470 times

last updated: 22 Oct '16, 22:27

powered by OSQA