Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- with union_geom as (
- SELECT ST_Union(ST_Multi(the_geom)) as the_geom
- FROM таблица
- WHERE is_deleted is false
- AND branch_id in (select branch_id from таблица where name in ('Санкт-Петербург','Санкт-Петербург Область'))
- ),
- dump_geom as (
- SELECT (ST_Dump(the_geom)).geom as the_geom
- FROM union_geom
- ),
- simple_geom as (
- SELECT ST_Simplify(ST_SetSRID(ST_MakePolygon(ST_ExteriorRing(the_geom)), 4326), 0.0005) as the_geom
- FROM dump_geom
- )
- SELECT st_astext(ST_Union(ST_Difference(cast(st_buffer(cast(the_geom as geography), 10000) as geometry), the_geom))) as the_geom FROM simple_geom
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement