File: gettopogeomelements.sql

package info (click to toggle)
postgis 2.5.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 75,792 kB
  • sloc: ansic: 139,314; sql: 136,281; xml: 48,954; sh: 4,906; perl: 4,509; makefile: 2,897; python: 1,198; yacc: 441; cpp: 305; lex: 132
file content (27 lines) | stat: -rw-r--r-- 676 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
set client_min_messages to WARNING;

\i load_topology.sql
\i load_features.sql

SELECT lid, tid, GetTopoGeomElements('city_data', lid, tid)
FROM (
 SELECT DISTINCT layer_id as lid, topogeo_id as tid
 FROM city_data.relation
) as f
order by 1, 2, 3;

SELECT lid, tid, 'ARY', GetTopoGeomElementArray('city_data', lid, tid)
FROM (
 SELECT DISTINCT layer_id as lid, topogeo_id as tid
 FROM city_data.relation
) as f
order by 1, 2;

-- See http://trac.osgeo.org/postgis/ticket/2060
SELECT 't2060', feature_name, GetTopoGeomElementArray(feature)
FROM features.land_parcels
ORDER BY feature_name;

-- clean up
SELECT topology.DropTopology('city_data');
DROP SCHEMA features CASCADE;