Skip to content

Commit

Permalink
Restore rendering of bridges
Browse files Browse the repository at this point in the history
  • Loading branch information
matthijsmelissen committed Sep 22, 2014
1 parent 15e5c0e commit 7dc09c5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,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 FROM (\n (SELECT \n way, prio, \n ('highway_' || (CASE WHEN substr(highway, length(highway)-3, 4) = 'link' THEN substr(highway, 0, length(highway)-4) ELSE highway END)) AS feature, \n horse, foot, bicycle, tracktype, \n CASE WHEN access IN ('destination') THEN 'destination'::text \n WHEN access IN ('no', 'private') THEN 'no'::text \n ELSE NULL \n END AS access, \n construction, \n CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text \n ELSE 'INT-normal'::text \n END AS service, \n CASE WHEN oneway IN ('yes', '-1') AND highway IN ('motorway', 'motorway_link', 'trunk', 'trunk_link', 'primary', 'primary_link', 'secondary', 'secondary_link', 'tertiary', 'tertiary_link', 'residential', 'unclassified', 'road', 'service', 'pedestrian', 'raceway', 'living_street', 'construction') THEN oneway \n ELSE NULL \n END AS oneway,\n CASE WHEN substr(highway, length(highway)-3, 4) = 'link' THEN 'yes' \n ELSE 'no' END AS link, \n CASE WHEN layer IS NULL THEN '0' \n ELSE layer \n END AS layernotnull \n FROM planet_osm_line \n JOIN (VALUES \n ('highway_motorway', 380), \n ('highway_trunk', 370), \n ('highway_primary', 360), \n ('highway_secondary', 350), \n ('highway_tertiary', 340), \n ('highway_residential', 330), \n ('highway_unclassified', 330), \n ('highway_road', 330), \n ('highway_living_street', 320), \n ('highway_pedestrian', 310), \n ('highway_raceway', 300), \n ('highway_motorway_link', 240), \n ('highway_trunk_link', 230), \n ('highway_primary_link', 220), \n ('highway_secondary_link', 210), \n ('highway_tertiary_link', 200),\n ('highway_service', 150), \n ('highway_track', 110), \n ('highway_path', 100), \n ('highway_footway', 100), \n ('highway_bridleway', 100), \n ('highway_cycleway', 100),\n ('highway_steps', 100), \n ('highway_platform', 90), \n ('highway_proposed', 20), \n ('highway_construction', 10)\n ) AS ordertable (feature, prio) \n ON ('highway_' || planet_osm_line.highway) = ordertable.feature \n WHERE (tunnel = 'yes' OR tunnel = 'building_passage' OR covered = 'yes')) \n UNION ALL\n (SELECT \n way, prio, \n COALESCE(('railway_' || (CASE WHEN railway = 'preserved' AND service IN ('spur', 'siding', 'yard') THEN 'INT-preserved-ssy'::text WHEN (railway = 'rail' AND service IN ('spur', 'siding', 'yard')) THEN 'INT-spur-siding-yard' ELSE railway END)),\n ('aeroway_' || aeroway)) AS feature,\n horse, foot, bicycle, tracktype,\n CASE WHEN access IN ('destination') THEN 'destination'::text \n WHEN access IN ('no', 'private') THEN 'no'::text \n ELSE NULL END AS access,\n construction,\n CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text ELSE 'INT-normal'::text END AS service, \n NULL AS oneway, \n 'no' AS link,\n CASE WHEN layer IS NULL THEN '0' ELSE layer END AS layernotnull \n FROM planet_osm_line \n JOIN (VALUES \n ('railway_rail', 430), \n ('railway_spur', 430), \n ('railway_siding', 430), \n ('railway_subway', 420), \n ('railway_narrow_gauge', 420), \n ('railway_light_rail', 420), \n ('railway_preserved', 420), \n ('railway_funicular', 420), \n ('railway_monorail', 420), \n ('railway_miniature', 420), \n ('railway_turntable', 420), \n ('railway_tram', 410), \n ('railway_disused', 400), \n ('railway_construction', 400), \n ('aeroway_runway', 60), \n ('aeroway_taxiway', 50), \n ('railway_platform', 90)\n ) AS ordertable (feature, prio) \n ON COALESCE(('railway_' || planet_osm_line.railway), ('aeroway_' || planet_osm_line.aeroway)) = ordertable.feature\n WHERE bridge IN ('yes', 'viaduct')\n )) AS features \n ORDER BY layernotnull, prio\n) AS bridges",
"table": "(SELECT * \n FROM (\n (SELECT \n way, prio, \n ('highway_' || (CASE WHEN substr(highway, length(highway)-3, 4) = 'link' THEN substr(highway, 0, length(highway)-4) ELSE highway END)) AS feature, \n horse, foot, bicycle, tracktype, \n CASE WHEN access IN ('destination') THEN 'destination'::text \n WHEN access IN ('no', 'private') THEN 'no'::text \n ELSE NULL \n END AS access, \n construction, \n CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text \n ELSE 'INT-normal'::text \n END AS service, \n CASE WHEN oneway IN ('yes', '-1') AND highway IN ('motorway', 'motorway_link', 'trunk', 'trunk_link', 'primary', 'primary_link', 'secondary', 'secondary_link', 'tertiary', 'tertiary_link', 'residential', 'unclassified', 'road', 'service', 'pedestrian', 'raceway', 'living_street', 'construction') THEN oneway \n ELSE NULL \n END AS oneway,\n CASE WHEN substr(highway, length(highway)-3, 4) = 'link' THEN 'yes' \n ELSE 'no' END AS link, \n CASE WHEN layer IS NULL THEN '0' \n ELSE layer \n END AS layernotnull \n FROM planet_osm_line \n JOIN (VALUES \n ('highway_motorway', 380), \n ('highway_trunk', 370), \n ('highway_primary', 360), \n ('highway_secondary', 350), \n ('highway_tertiary', 340), \n ('highway_residential', 330), \n ('highway_unclassified', 330), \n ('highway_road', 330), \n ('highway_living_street', 320), \n ('highway_pedestrian', 310), \n ('highway_raceway', 300), \n ('highway_motorway_link', 240), \n ('highway_trunk_link', 230), \n ('highway_primary_link', 220), \n ('highway_secondary_link', 210), \n ('highway_tertiary_link', 200),\n ('highway_service', 150), \n ('highway_track', 110), \n ('highway_path', 100), \n ('highway_footway', 100), \n ('highway_bridleway', 100), \n ('highway_cycleway', 100),\n ('highway_steps', 100), \n ('highway_platform', 90), \n ('highway_proposed', 20), \n ('highway_construction', 10)\n ) AS ordertable (feature, prio) \n ON ('highway_' || planet_osm_line.highway) = ordertable.feature \n WHERE bridge IN ('yes', 'viaduct')\n ) \n UNION ALL\n (SELECT \n way, prio, \n COALESCE(('railway_' || (CASE WHEN railway = 'preserved' AND service IN ('spur', 'siding', 'yard') THEN 'INT-preserved-ssy'::text WHEN (railway = 'rail' AND service IN ('spur', 'siding', 'yard')) THEN 'INT-spur-siding-yard' ELSE railway END)),\n ('aeroway_' || aeroway)) AS feature,\n horse, foot, bicycle, tracktype,\n CASE WHEN access IN ('destination') THEN 'destination'::text \n WHEN access IN ('no', 'private') THEN 'no'::text \n ELSE NULL END AS access,\n construction,\n CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text ELSE 'INT-normal'::text END AS service, \n NULL AS oneway, \n 'no' AS link,\n CASE WHEN layer IS NULL THEN '0' ELSE layer END AS layernotnull \n FROM planet_osm_line \n JOIN (VALUES \n ('railway_rail', 430), \n ('railway_spur', 430), \n ('railway_siding', 430), \n ('railway_subway', 420), \n ('railway_narrow_gauge', 420), \n ('railway_light_rail', 420), \n ('railway_preserved', 420), \n ('railway_funicular', 420), \n ('railway_monorail', 420), \n ('railway_miniature', 420), \n ('railway_turntable', 420), \n ('railway_tram', 410), \n ('railway_disused', 400), \n ('railway_construction', 400), \n ('aeroway_runway', 60), \n ('aeroway_taxiway', 50), \n ('railway_platform', 90)\n ) AS ordertable (feature, prio) \n ON COALESCE(('railway_' || planet_osm_line.railway), ('aeroway_' || planet_osm_line.aeroway)) = ordertable.feature\n WHERE bridge IN ('yes', 'viaduct')\n )) AS features \n ORDER BY layernotnull, prio\n) AS bridges",
"geometry_field": "way",
"type": "postgis",
"key_field": "",
Expand Down
3 changes: 2 additions & 1 deletion project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,8 @@ Layer:
('highway_construction', 10)
) AS ordertable (feature, prio)
ON ('highway_' || planet_osm_line.highway) = ordertable.feature
WHERE (tunnel = 'yes' OR tunnel = 'building_passage' OR covered = 'yes'))
WHERE bridge IN ('yes', 'viaduct')
)
UNION ALL
(SELECT
way, prio,
Expand Down

0 comments on commit 7dc09c5

Please sign in to comment.