File: cleartopogeom.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 (36 lines) | stat: -rw-r--r-- 796 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
28
29
30
31
32
33
34
35
36
\set VERBOSITY terse
set client_min_messages to ERROR;

\i load_topology.sql
\i load_features.sql

SELECT 'relation before', count(distinct topogeo_id)
 FROM city_data.relation
 WHERE layer_id = 1;

SELECT 'feature before',
    feature_name,
    ST_IsEmpty(feature)
  FROM features.land_parcels
  WHERE feature_name = 'P1'
  ORDER BY feature_name;

SELECT 'feature during',
    feature_name,
    ST_IsEmpty(clearTopoGeom(feature))
  FROM features.land_parcels
  WHERE feature_name = 'P1'
  ORDER BY feature_name;

SELECT 'feature after',
    feature_name,
    ST_IsEmpty(feature)
  FROM features.land_parcels
  WHERE feature_name = 'P1'
  ORDER BY feature_name;

SELECT 'relation after', count(distinct topogeo_id)
 FROM city_data.relation
 WHERE layer_id = 1;

select droptopology('city_data');