Skip to content

Commit

Permalink
Stop boundary linestrings from relations being used
Browse files Browse the repository at this point in the history
osm2pgsql will create linestrings for relations in planet_osm_roads (and
potentially planet_osm_line for incomplete/broken relations)

This leads to two problems

* Duplication of the lines when a boundary is complete and does not adjoin
another administrative area

* Overlapping lines

Fixes gravitystorm#344

This makes boundary lines substantially lighter as there are no longer many many
lines stacked on top of each other.
  • Loading branch information
pnorman committed Feb 21, 2014
1 parent 696b43e commit 23065d1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions project.mml
Expand Up @@ -975,7 +975,7 @@
],
"Datasource": {
"type": "postgis",
"table": "(select way,admin_level\n from planet_osm_roads\n where \"boundary\"='administrative'\n and admin_level in ('0','1','2','3','4')\n ) as admin_01234",
"table": "(select way,admin_level\n from planet_osm_roads\n where \"boundary\"='administrative'\n and admin_level in ('0','1','2','3','4')\n and osm_id > 0\n ) as admin_01234",
"extent": "-20037508,-19929239,20037508,19929239",
"key_field": "",
"geometry_field": "way",
Expand All @@ -998,7 +998,7 @@
],
"Datasource": {
"type": "postgis",
"table": "(select way,admin_level\n from planet_osm_roads\n where \"boundary\"='administrative'\n and admin_level in ('5','6','7','8')\n ) as admin_5678",
"table": "(select way,admin_level\n from planet_osm_roads\n where \"boundary\"='administrative'\n and admin_level in ('5','6','7','8')\n and osm_id > 0\n ) as admin_5678",
"extent": "-20037508,-19929239,20037508,19929239",
"key_field": "",
"geometry_field": "way",
Expand All @@ -1021,7 +1021,7 @@
],
"Datasource": {
"type": "postgis",
"table": "(select way,admin_level\n from planet_osm_roads\n where \"boundary\"='administrative'\n and (admin_level is null or admin_level not in ('0','1','2','3','4','5','6','7','8'))\n ) as admin_other",
"table": "(select way,admin_level\n from planet_osm_roads\n where \"boundary\"='administrative'\n and (admin_level is null or admin_level not in ('0','1','2','3','4','5','6','7','8'))\n and osm_id > 0\n ) as admin_other",
"extent": "-20037508,-19929239,20037508,19929239",
"key_field": "",
"geometry_field": "way",
Expand Down

0 comments on commit 23065d1

Please sign in to comment.