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 |
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). answered 22 Oct '16, 22:27 Frederik Ramm ♦ |