-
-
Save OnkelTem/6c224d06bd4e8e3bb061 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- id: "admin-areas-istra-text" | |
name: "admin-areas-istra-text" | |
class: "" | |
geometry: "point" | |
<<: *extents | |
Datasource: | |
<<: *osm2pgsql | |
table: |- | |
( | |
SELECT | |
ST_PointOnSurface(way) as way, | |
CASE | |
WHEN position('сельское поселение' in name) != 0 THEN trim(replace(name, 'сельское поселение', '')) || ' с.п.' | |
WHEN position('городское поселение' in name) != 0 THEN trim(replace(name, 'городское поселение', '')) || ' г.п.' | |
WHEN position('район' in name) != 0 THEN trim(replace(name, 'район', '')) || ' р-н.' | |
ELSE name | |
END as name, | |
admin_level | |
FROM planet_osm_polygon | |
WHERE osm_id IN ( | |
SELECT a8.osm_id | |
FROM planet_osm_polygon a8 JOIN planet_osm_polygon a6 | |
ON ST_Contains(a6.way, a8.way) | |
WHERE a6.osm_id = -184072 | |
AND a8.admin_level = '8' | |
AND a6.boundary = 'administrative' | |
AND a8.boundary = 'administrative') | |
) AS admin_areas_istra | |
properties: | |
minzoom: 9 | |
advanced: {} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment