8 # let's factorize default values used by layers
12 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"
19 srs: "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"
26 extent: -20037508,-20037508,20037508,20037508
36 srs: +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over
48 file: https://osmdata.openstreetmap.de/download/simplified-land-polygons-complete-3857.zip
57 file: https://osmdata.openstreetmap.de/download/land-polygons-split-3857.zip
69 way, way_area AS area, COALESCE(landuse, leisure, "natural", highway, amenity, tourism) AS type, tags->'landfill:type' as landfill_type
73 way_area > 100000 ORDER BY way_area DESC
76 extent_from_subquery: 'true'
83 ( SELECT way, way_area AS area, COALESCE(landuse, leisure, "natural",
84 highway, amenity, tourism) AS type, tags->'landfill:type' as
85 landfill_type FROM planet_osm_polygon WHERE way_area > 10000 AND
86 COALESCE(landuse, leisure, "natural", highway, amenity, tourism) IS NOT NULL
87 ORDER BY way_area DESC
90 extent_from_subquery: 'true'
97 ( SELECT way, way_area AS area, COALESCE(landuse, leisure, "natural", highway, amenity, tourism) AS type, tags->'landfill:type' as landfill_type
98 FROM planet_osm_polygon
99 WHERE COALESCE(landuse, leisure, "natural", highway, amenity, tourism) IS NOT NULL
100 ORDER BY way_area DESC) AS data
102 extent_from_subquery: 'true'
108 file: DEM/data/hillshade.vrt
111 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
114 - geometry: linestring
118 file: DEM/data/contour-25m.shp
121 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
129 ( SELECT way, waterway AS type,
131 CASE WHEN intermittent IN ('yes') OR tags@> hstore('seasonal','yes') THEN
134 ELSE 'no' END AS seasonal
138 WHERE waterway IN ('river', 'canal')) as h2olow
140 extent_from_subquery: 'true'
146 ( SELECT way, waterway AS type,
148 CASE WHEN intermittent IN ('yes') OR tags@> hstore('seasonal','yes') THEN
151 ELSE 'no' END AS seasonal
155 WHERE waterway IN ('river', 'canal', 'stream')) as h2o
162 ( SELECT way, waterway AS type,
164 CASE WHEN intermittent IN ('yes') OR tags@> hstore('seasonal','yes') THEN
167 ELSE 'no' END AS seasonal
171 WHERE waterway IN ('river', 'canal', 'stream', 'ditch', 'drain')) as h2o
173 extent_from_subquery: 'true'
180 ( SELECT way, "natural" AS type, way_area AS area
181 FROM planet_osm_polygon
182 WHERE ("natural" IN ('water', 'pond')
183 OR waterway IN ('basin', 'canal', 'mill_pond', 'pond', 'riverbank'))
187 extent_from_subquery: 'true'
194 ( SELECT way, "natural" AS type, way_area AS area
195 FROM planet_osm_polygon
196 WHERE ("natural" IN ('water', 'pond')
197 OR waterway IN ('basin', 'canal', 'mill_pond', 'pond', 'riverbank'))
201 extent_from_subquery: 'true'
208 ( SELECT way, way_area AS area
209 FROM planet_osm_polygon
210 WHERE "natural" IN ('water', 'pond')
211 OR waterway IN ('basin', 'canal', 'mill_pond', 'pond', 'riverbank', 'dock')
214 extent_from_subquery: 'true'
216 - id: landuse_overlays
221 ( SELECT way, way_area AS area, COALESCE(leisure) AS type
222 FROM planet_osm_polygon
223 WHERE leisure = 'nature_reserve'
224 ORDER BY way_area DESC
227 extent_from_subquery: 'true'
235 ST_Intersection(way, !bbox!) AS way, admin_level::integer,
236 CASE WHEN tags->'maritime'='yes' THEN 'yes' ELSE 'no' END AS maritime
240 "boundary" = 'administrative'
241 AND admin_level IN ('1','2','3','4', '5', '6', '7', '8', '9', '10')
242 AND "boundary" IS NOT NULL
248 extent_from_subquery: 'true'
256 ST_Intersection(way, !bbox!) AS way, admin_level::integer,
257 CASE WHEN tags->'maritime'='yes' THEN 'yes' ELSE 'no' END AS maritime
261 "boundary" = 'administrative'
262 AND admin_level IN ('1','2','3','4', '5', '6', '7', '8')
263 AND "boundary" IS NOT NULL
269 extent_from_subquery: 'true'
277 way, admin_level::integer,
278 CASE WHEN tags->'maritime'='yes' THEN 'yes' ELSE 'no' END AS maritime
282 "boundary" = 'administrative'
283 AND admin_level IN ('1','2','3','4')
284 AND "boundary" IS NOT NULL
289 extent_from_subquery: 'true'
297 way, CASE WHEN amenity IS NOT NULL or shop IS NOT NULL THEN 'yes' ELSE 'no' END AS poi, building AS type
301 building NOT IN ('0','false', 'no')
304 extent_from_subquery: 'true'
310 table: "( SELECT way, aeroway AS type, tunnel FROM planet_osm_polygon WHERE aeroway IN ('apron', 'runway', 'taxiway')) AS data"
312 extent_from_subquery: 'true'
319 ( SELECT way, aeroway AS type, tunnel FROM planet_osm_line
320 WHERE aeroway IN ('apron', 'runway', 'taxiway')
323 extent_from_subquery: 'true'
325 - id: turning_circle_case
329 table: "( SELECT way \n FROM planet_osm_point \n WHERE highway = 'turning_circle'\n) AS data"
331 extent_from_subquery: 'true'
339 way, name, access, construction, stratum, type,
341 WHEN smoothness IN ('bad', 'very_bad', 'horrible', 'very_horrible') THEN 'bad'
345 WHEN surface IN ('paved', 'paving_stones', 'asphalt', 'concrete') THEN 'paved'
346 WHEN (surface IS NULL AND type IN ('trunk', 'trunk_link', 'motorway', 'motorway_link', 'primary', 'primary_link', 'secondary', 'secondary_link', 'tertiary', 'tertiary_link')) THEN 'paved'
350 WHEN tunnel IS NOT NULL AND tunnel!='no' THEN 'tunnel'
351 WHEN bridge IS NOT NULL AND bridge!='no' THEN 'bridge'
352 WHEN ford IS NOT NULL AND ford!='no' THEN 'ford'
356 WHEN type IN ('motorway', 'trunk', 'trunk_link') THEN 'motorway'
357 WHEN type ~ E'\\w+_link$' THEN regexp_replace(type, '_link', '')
358 WHEN type IN ('unclassified', 'road', 'service') THEN 'standard'
359 WHEN type IN ('residential', 'living_street') THEN 'urban'
360 WHEN type IN ('path', 'cycleway', 'footway', 'pedestrian', 'steps', 'bridleway') THEN 'noauto'
365 way, name, bridge, access, surface, tunnel, tags->'smoothness' AS smoothness, tags->'ford' AS ford, layer, tags->'narrow' AS narrow, construction,
367 WHEN layer ~ E'^-?\\d{1,4}$' THEN layer::integer
371 WHEN highway='construction' AND construction IS NOT NULL THEN construction
375 WHEN highway IN ('trunk', 'motorway') THEN 1
376 WHEN highway IN ('primary', 'secondary', 'tertiary') THEN 10
377 WHEN highway IN ('tertiary') THEN 100
386 stratum, prio DESC, z_order
389 a.type!='construction' and (a.construction!='yes' OR a.construction IS NULL)
392 extent_from_subquery: 'true'
398 table: "( SELECT way, route, name, z_order FROM planet_osm_line WHERE route IS NOT NULL AND route='ferry' ORDER BY z_order) as ferry"
400 extent_from_subquery: 'true'
406 table: "( SELECT way, tunnel, bridge, railway, service, CASE WHEN railway in ('spur','siding') or (railway='rail' and service in ('spur','siding','yard')) THEN 'yard' WHEN railway='disused' THEN 'disused' WHEN railway='rail' THEN 'main' ELSE 'other' END AS type FROM planet_osm_line WHERE railway IS NOT NULL AND railway!='abandoned' AND railway!='dismantled' AND railway!='razed' AND railway!='historic' ORDER BY z_order) as rail"
408 extent_from_subquery: 'true'
415 ( SELECT way, highway AS type
417 FROM planet_osm_roads
419 WHERE highway IN ('motorway', 'trunk', 'primary', 'secondary',
420 'motorway_link', 'trunk_link')
424 extent_from_subquery: 'true'
431 ( SELECT way, highway AS type, bridge, tunnel
432 FROM planet_osm_roads
433 WHERE highway IN ('motorway', 'trunk')
436 extent_from_subquery: 'true'
438 - id: turning_circle_fill
442 table: "( SELECT way \n FROM planet_osm_point\n WHERE highway = 'turning_circle'\n) AS data"
444 extent_from_subquery: 'true'
451 table: '(select way, barrier from planet_osm_line where barrier is not null) as data'
453 extent_from_subquery: 'true'
462 way,barrier,"natural"
466 barrier IS NOT NULL OR "natural"='hedge'
469 extent_from_subquery: 'true'
476 table: "(SELECT way, power AS type, tags->'generator:source' AS source, name FROM planet_osm_polygon WHERE power IS NOT NULL) as data"
478 extent_from_subquery: 'true'
484 table: "(SELECT way, power AS type, tags->'generator:source' AS source, name FROM planet_osm_line WHERE power IS NOT NULL) as data"
486 extent_from_subquery: 'true'
493 table: "(SELECT way, power AS type, tags->'generator:source' AS source, name FROM planet_osm_point WHERE power IS NOT NULL) as data"
495 extent_from_subquery: 'true'
502 table: "(select way,name,CASE WHEN tags ? 'iata' THEN 'airport' WHEN aeroway='aerodrome' THEN 'airfield' ELSE null END AS aeroway FROM planet_osm_point WHERE aeroway='aerodrome') as data"
504 extent_from_subquery: 'true'
511 table: "(select way,name,CASE WHEN tags ? 'iata' THEN 'airport' WHEN aeroway='aerodrome' THEN 'airfield' ELSE null END AS aeroway FROM planet_osm_polygon WHERE aeroway='aerodrome') as data"
513 extent_from_subquery: 'true'
522 way, name, COALESCE(amenity, leisure, tags->'healthcare', shop, tourism, office, highway, tags->'emergency', barrier) AS main, man_made, religion,
523 CASE WHEN shop IS NOT NULL AND shop!='no' THEN shop ELSE NULL END AS shop,
524 tags->'craft' as craft, tags->'pump' as pump, tags->'drinking_water' as drinking_water, "tower:type", power, tags->'content' AS content, lower(operator) AS operator
528 amenity IS NOT NULL OR shop IS NOT NULL OR tags ? 'craft' OR tags ? 'healthcare'
529 OR tourism IN ('alpine_hut','camp_site','caravan_site','guest_house','hostel','hotel','motel','museum','viewpoint','bed_and_breakfast','information','chalet')
530 OR highway IN ('bus_stop','traffic_signals','ford', 'street_lamp')
531 OR man_made IN ('mast','water_tower', 'tower', 'water_well', 'watermill', 'storage_tank')
532 OR historic IN ('memorial','archaeological_site')
533 OR leisure IN ('playground','slipway', 'beach_resort')
534 OR office IN ('ngo', 'government') OR tags @> hstore ('emergency', 'fire_hydrant')
535 OR power IN ('generator', 'sub_station', 'tower', 'pole') OR barrier IN ('border_control')
538 extent_from_subquery: 'true'
547 way, name, COALESCE(amenity, leisure, tags->'healthcare', shop, tourism, office, highway, tags->'emergency', barrier) AS main, man_made, religion,
548 CASE WHEN shop IS NOT NULL AND shop!='no' THEN shop ELSE NULL END AS shop,
549 tags->'craft' as craft, tags->'pump' as pump, tags->'drinking_water' as drinking_water, "tower:type",
550 power, tags->'content' AS content, lower(operator) AS operator
554 amenity IS NOT NULL OR shop IS NOT NULL OR tags ? 'healthcare'
555 OR tourism IN ('alpine_hut','camp_site','caravan_site','guest_house','hostel','hotel','motel','museum','viewpoint','bed_and_breakfast','information','chalet')
556 OR highway IN ('bus_stop','traffic_signals') OR historic in ('memorial','archaeological_site') OR leisure='playground'
557 OR power IN ('plant', 'sub_station') OR office IN ('ngo', 'government')
560 extent_from_subquery: 'true'
566 table: "( SELECT way, CASE WHEN place='country' THEN 1 WHEN capital='yes' AND admin_level='2' THEN 10 WHEN place='state' THEN 20 WHEN place='city' THEN 21 WHEN place='town' THEN 30 ELSE 100 END as prio, place AS type, name, z_order, CASE WHEN population ~ E'^\\d{1,9}$' THEN population::integer ELSE NULL END AS population, CASE WHEN capital='yes' AND admin_level='2' THEN 'country' ELSE NULL END AS is_capital FROM planet_osm_point WHERE place in ('country', 'state', 'city', 'town') AND place IS NOT NULL ORDER BY prio, population DESC NULLS LAST) AS data"
568 extent_from_subquery: 'true'
574 table: "( SELECT way, CASE WHEN place='country' THEN 1 WHEN capital='yes' AND admin_level='2' THEN 10 WHEN place='state' THEN 20 WHEN place='town' THEN 30 WHEN place='village' THEN 40 ELSE 100 END as prio, place AS type, name, z_order, CASE WHEN population ~ E'^\\d{1,9}$' THEN population::integer ELSE NULL END AS population, CASE WHEN capital='yes' AND admin_level='2' THEN 'country' ELSE NULL END AS is_capital FROM planet_osm_point WHERE place in ('country', 'state', 'city', 'town', 'village', 'hamlet', 'suburb', 'neighbourhood', 'locality') AND place IS NOT NULL ORDER BY prio, population DESC NULLS LAST) AS data"
576 extent_from_subquery: 'true'
582 table: '( SELECT COALESCE(landuse, leisure, "natural", highway, amenity, tourism) AS type, name, way_area AS area, ST_PointOnSurface(way) AS way FROM planet_osm_polygon WHERE name IS NOT NULL AND (landuse IS NOT NULL OR leisure IS NOT NULL OR "natural" IS NOT NULL) AND way && !bbox! AND ST_IsValid(way) ORDER BY area DESC) AS data'
584 extent_from_subquery: 'true'
590 table: "( SELECT way, highway AS type, name, ref, CASE WHEN oneway IN ('yes', '-1') THEN oneway ELSE 'no' END AS oneway, CHAR_LENGTH(ref) AS reflen FROM planet_osm_line WHERE highway IN ('motorway', 'trunk') AND (name IS NOT NULL OR ref IS NOT NULL)) AS data"
592 extent_from_subquery: 'true'
598 table: "( SELECT way, highway AS type, name, CASE WHEN oneway IN ('yes', '-1') THEN oneway ELSE 'no' END AS oneway FROM planet_osm_line WHERE (name IS NOT NULL OR oneway IN ('yes', '-1')) AND highway IN ('primary', 'secondary', 'tertiary')) AS data"
600 extent_from_subquery: 'true'
602 - id: minorroad_label
607 ( SELECT way, highway AS type, name, CASE WHEN oneway IN ('yes', '-1')
608 THEN oneway ELSE 'no' END AS oneway FROM planet_osm_line WHERE (name IS
609 NOT NULL OR oneway IN ('yes', '-1')) AND highway IN ('residential',
610 'unclassified', 'road', 'living_street', 'unknown')
614 extent_from_subquery: 'true'
616 - id: admin-label-5-10
622 ST_Intersection(p.way, !bbox!) AS way, name, cast(regexp_replace(admin_level,'[^0-9]','','g') AS integer) AS admin_level
626 ST_Intersects(p.way,!bbox!) AND not ST_Covers(p.way, !bbox!)
627 AND boundary='administrative' AND admin_level IN ('5', '6', '7', '8', '9', '10')
632 extent_from_subquery: 'true'
634 - id: admin-label-1-4
640 ST_Intersection(p.way, !bbox!) AS way, name, cast(regexp_replace(admin_level,'[^0-9]','','g') AS integer) AS admin_level
644 ST_Intersects(p.way, !bbox!) AND not ST_Covers(p.way, !bbox!)
645 AND boundary='administrative' AND admin_level IN ('0', '2', '3', '4')
650 extent_from_subquery: 'true'
656 table: "( SELECT way, waterway AS type, name\n FROM planet_osm_line\n WHERE waterway IN ('canal', 'river', 'stream') \n AND name IS NOT NULL\n) AS data"
658 extent_from_subquery: 'true'
660 - id: natural_point_label
666 way, "natural" AS type, name,
667 CASE WHEN ele ~ E'^\\d{1,5}$' THEN ele::integer ELSE null END as ele
671 "natural" IS NOT NULL AND "natural" IN ('peak', 'bay', 'volcano')
672 ORDER BY ele DESC NULLS LAST
675 extent_from_subquery: 'true'
681 table: " (select way,\"addr:housenumber\" AS housenumber, CASE WHEN \"addr:housenumber\" ~ E'^\\d+$' AND mod(\"addr:housenumber\"::bigint, 5) IN (0, 1) THEN 'yes' ELSE 'no' END AS mod5 FROM planet_osm_polygon WHERE \"addr:housenumber\" IS NOT NULL AND building IS NOT NULL UNION SELECT way,\"addr:housenumber\" AS housenumber, CASE WHEN \"addr:housenumber\" ~ E'^\\d+$' AND mod(\"addr:housenumber\"::bigint, 5) IN (0, 1) THEN 'yes' ELSE 'no' END AS mod5 FROM planet_osm_point WHERE \"addr:housenumber\" IS NOT NULL) as data"
683 extent_from_subquery: 'true'
687 attribution: 'Data © OpenStreetMap (and) contributors under ODbL 1.0'
690 compareUrl: 'http://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png'