Skip to content

Commit

Permalink
Merge branch 'remove_z_order' of https://github.com/pnorman/openstree…
Browse files Browse the repository at this point in the history
…tmap-carto

Conflicts:
	project.mml
  • Loading branch information
matthijsmelissen committed Jul 19, 2015
2 parents ec3fbdc + 170c498 commit bf50539
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over",
"Datasource": {
"extent": "-20037508,-20037508,20037508,20037508",
"table": "(SELECT\n way, name, way_pixels,\n COALESCE(wetland, landuse, \"natural\") AS feature\n FROM (SELECT\n way, COALESCE(name, '') AS name,\n ('landuse_' || (CASE WHEN landuse IN ('forest') THEN landuse ELSE NULL END)) AS landuse,\n ('natural_' || (CASE WHEN \"natural\" IN ('wood', 'sand', 'scree', 'shingle', 'bare_rock') THEN \"natural\" ELSE NULL END)) AS \"natural\",\n ('wetland_' || (CASE WHEN \"natural\" IN ('wetland', 'mud') THEN (CASE WHEN \"natural\" IN ('mud') THEN \"natural\" ELSE wetland END) ELSE NULL END)) AS wetland,\n way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels\n FROM planet_osm_polygon\n WHERE (landuse IN ('forest')\n OR \"natural\" IN ('wood', 'wetland', 'mud', 'sand', 'scree', 'shingle', 'bare_rock'))\n AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real\n AND building IS NULL\n ORDER BY z_order, way_area DESC\n ) AS features\n) AS landcover_low_zoom",
"table": "(SELECT\n way, name, way_pixels,\n COALESCE(wetland, landuse, \"natural\") AS feature\n FROM (SELECT\n way, COALESCE(name, '') AS name,\n ('landuse_' || (CASE WHEN landuse IN ('forest') THEN landuse ELSE NULL END)) AS landuse,\n ('natural_' || (CASE WHEN \"natural\" IN ('wood', 'sand', 'scree', 'shingle', 'bare_rock') THEN \"natural\" ELSE NULL END)) AS \"natural\",\n ('wetland_' || (CASE WHEN \"natural\" IN ('wetland', 'mud') THEN (CASE WHEN \"natural\" IN ('mud') THEN \"natural\" ELSE wetland END) ELSE NULL END)) AS wetland,\n way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels\n FROM planet_osm_polygon\n WHERE (landuse IN ('forest')\n OR \"natural\" IN ('wood', 'wetland', 'mud', 'sand', 'scree', 'shingle', 'bare_rock'))\n AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real\n AND building IS NULL\n ORDER BY CASE WHEN layer~E'^-?\\\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END, way_area DESC\n ) AS features\n) AS landcover_low_zoom",
"geometry_field": "way",
"type": "postgis",
"key_field": "",
Expand All @@ -126,7 +126,7 @@
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over",
"Datasource": {
"extent": "-20037508,-20037508,20037508,20037508",
"table": "(SELECT\n way, name, religion, way_pixels,\n COALESCE(aeroway, amenity, wetland, landuse, leisure, military, \"natural\", power, tourism, highway, railway) AS feature\n FROM (SELECT\n way, COALESCE(name, '') AS name,\n ('aeroway_' || (CASE WHEN aeroway IN ('apron', 'aerodrome') THEN aeroway ELSE NULL END)) AS aeroway,\n ('amenity_' || (CASE WHEN amenity IN ('parking', 'bicycle_parking', 'university', 'college', 'school', 'hospital', 'kindergarten', 'grave_yard', 'prison', 'place_of_worship', 'clinic') THEN amenity ELSE NULL END)) AS amenity,\n ('landuse_' || (CASE WHEN landuse IN ('quarry', 'vineyard', 'orchard', 'cemetery', 'residential', 'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farm', 'farmland', 'greenhouse_horticulture', 'recreation_ground', 'conservation', 'village_green', 'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill', 'construction') THEN landuse ELSE NULL END)) AS landuse,\n ('leisure_' || (CASE WHEN leisure IN ('swimming_pool', 'playground', 'park', 'recreation_ground', 'common', 'garden', 'golf_course', 'miniature_golf', 'picnic_table', 'sports_centre', 'stadium', 'pitch', 'track') THEN leisure ELSE NULL END)) AS leisure,\n ('military_' || (CASE WHEN military IN ('danger_area') THEN military ELSE NULL END)) AS military,\n ('natural_' || (CASE WHEN \"natural\" IN ('beach', 'heath', 'grassland', 'wood', 'sand', 'scree', 'shingle', 'bare_rock', 'scrub') THEN \"natural\" ELSE NULL END)) AS \"natural\",\n ('wetland_' || (CASE WHEN \"natural\" IN ('wetland', 'marsh', 'mud') THEN (CASE WHEN \"natural\" IN ('marsh', 'mud') THEN \"natural\" ELSE wetland END) ELSE NULL END)) AS wetland,\n ('power_' || (CASE WHEN power IN ('station', 'sub_station', 'substation', 'generator') THEN power ELSE NULL END)) AS power,\n ('tourism_' || (CASE WHEN tourism IN ('attraction', 'camp_site', 'caravan_site', 'picnic_site') THEN tourism ELSE NULL END)) AS tourism,\n ('highway_' || (CASE WHEN highway IN ('services', 'rest_area') THEN highway ELSE NULL END)) AS highway,\n ('railway_' || (CASE WHEN railway = 'station' THEN railway ELSE NULL END)) AS railway,\n CASE WHEN religion IN ('christian', 'jewish') THEN religion ELSE 'INT-generic'::text END AS religion,\n way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels\n FROM planet_osm_polygon\n WHERE (landuse IS NOT NULL\n OR leisure IS NOT NULL\n OR aeroway IN ('apron', 'aerodrome')\n OR amenity IN ('parking', 'bicycle_parking', 'university', 'college', 'school', 'hospital', 'kindergarten', 'grave_yard', 'place_of_worship', 'prison', 'clinic')\n OR military IN ('danger_area')\n OR \"natural\" IN ('beach', 'heath', 'mud', 'marsh', 'wetland', 'grassland', 'wood', 'sand', 'scree', 'shingle', 'bare_rock', 'scrub')\n OR power IN ('station', 'sub_station', 'substation', 'generator')\n OR tourism IN ('attraction', 'camp_site', 'caravan_site', 'picnic_site')\n OR highway IN ('services', 'rest_area')\n OR railway = 'station')\n AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real\n ORDER BY z_order, way_area DESC\n ) AS landcover\n) AS features",
"table": "(SELECT\n way, name, religion, way_pixels,\n COALESCE(aeroway, amenity, wetland, landuse, leisure, military, \"natural\", power, tourism, highway, railway) AS feature\n FROM (SELECT\n way, COALESCE(name, '') AS name,\n ('aeroway_' || (CASE WHEN aeroway IN ('apron', 'aerodrome') THEN aeroway ELSE NULL END)) AS aeroway,\n ('amenity_' || (CASE WHEN amenity IN ('parking', 'bicycle_parking', 'university', 'college', 'school', 'hospital', 'kindergarten', 'grave_yard', 'prison', 'place_of_worship', 'clinic') THEN amenity ELSE NULL END)) AS amenity,\n ('landuse_' || (CASE WHEN landuse IN ('quarry', 'vineyard', 'orchard', 'cemetery', 'residential', 'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farm', 'farmland', 'greenhouse_horticulture', 'recreation_ground', 'conservation', 'village_green', 'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill', 'construction') THEN landuse ELSE NULL END)) AS landuse,\n ('leisure_' || (CASE WHEN leisure IN ('swimming_pool', 'playground', 'park', 'recreation_ground', 'common', 'garden', 'golf_course', 'miniature_golf', 'picnic_table', 'sports_centre', 'stadium', 'pitch', 'track') THEN leisure ELSE NULL END)) AS leisure,\n ('military_' || (CASE WHEN military IN ('danger_area') THEN military ELSE NULL END)) AS military,\n ('natural_' || (CASE WHEN \"natural\" IN ('beach', 'heath', 'grassland', 'wood', 'sand', 'scree', 'shingle', 'bare_rock', 'scrub') THEN \"natural\" ELSE NULL END)) AS \"natural\",\n ('wetland_' || (CASE WHEN \"natural\" IN ('wetland', 'marsh', 'mud') THEN (CASE WHEN \"natural\" IN ('marsh', 'mud') THEN \"natural\" ELSE wetland END) ELSE NULL END)) AS wetland,\n ('power_' || (CASE WHEN power IN ('station', 'sub_station', 'substation', 'generator') THEN power ELSE NULL END)) AS power,\n ('tourism_' || (CASE WHEN tourism IN ('attraction', 'camp_site', 'caravan_site', 'picnic_site') THEN tourism ELSE NULL END)) AS tourism,\n ('highway_' || (CASE WHEN highway IN ('services', 'rest_area') THEN highway ELSE NULL END)) AS highway,\n ('railway_' || (CASE WHEN railway = 'station' THEN railway ELSE NULL END)) AS railway,\n CASE WHEN religion IN ('christian', 'jewish') THEN religion ELSE 'INT-generic'::text END AS religion,\n way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels\n FROM planet_osm_polygon\n WHERE (landuse IS NOT NULL\n OR leisure IS NOT NULL\n OR aeroway IN ('apron', 'aerodrome')\n OR amenity IN ('parking', 'bicycle_parking', 'university', 'college', 'school', 'hospital', 'kindergarten', 'grave_yard', 'place_of_worship', 'prison', 'clinic')\n OR military IN ('danger_area')\n OR \"natural\" IN ('beach', 'heath', 'mud', 'marsh', 'wetland', 'grassland', 'wood', 'sand', 'scree', 'shingle', 'bare_rock', 'scrub')\n OR power IN ('station', 'sub_station', 'substation', 'generator')\n OR tourism IN ('attraction', 'camp_site', 'caravan_site', 'picnic_site')\n OR highway IN ('services', 'rest_area')\n OR railway = 'station')\n AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real\n ORDER BY CASE WHEN layer~E'^-?\\\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END, way_area DESC\n ) AS landcover\n) AS features",
"geometry_field": "way",
"type": "postgis",
"key_field": "",
Expand Down
4 changes: 2 additions & 2 deletions project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ Layer:
OR "natural" IN ('wood', 'wetland', 'mud', 'sand', 'scree', 'shingle', 'bare_rock'))
AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real
AND building IS NULL
ORDER BY z_order, way_area DESC
ORDER BY CASE WHEN layer~E'^-?\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END, way_area DESC
) AS features
) AS landcover_low_zoom
properties:
Expand Down Expand Up @@ -167,7 +167,7 @@ Layer:
OR highway IN ('services', 'rest_area')
OR railway = 'station')
AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real
ORDER BY z_order, way_area DESC
ORDER BY CASE WHEN layer~E'^-?\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END, way_area DESC
) AS landcover
) AS features
properties:
Expand Down

0 comments on commit bf50539

Please sign in to comment.