File: st_removeisoedge.sql

package info (click to toggle)
postgis 3.3.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 87,748 kB
  • sloc: ansic: 158,671; sql: 91,546; xml: 54,004; cpp: 12,339; sh: 5,187; perl: 5,100; makefile: 3,085; python: 1,205; yacc: 447; lex: 151; javascript: 6
file content (40 lines) | stat: -rw-r--r-- 1,219 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
37
38
39
40
\set VERBOSITY terse
set client_min_messages to ERROR;

-- Import city_data
\i :top_builddir/topology/test/load_topology.sql

CREATE TABLE city_data.f_lin(id serial primary key);
SELECT NULL FROM AddTopoGeometryColumn('city_data', 'city_data', 'f_lin', 'tg', 'LINE');
CREATE TABLE city_data.f_mix(id serial primary key);
SELECT NULL FROM AddTopoGeometryColumn('city_data', 'city_data', 'f_mix', 'tg', 'COLLECTION');

BEGIN;
INSERT INTO city_data.f_lin(tg) VALUES(
  topology.CreateTopoGeom(
    'city_data', -- Topology name
    2, -- Topology geometry type (line)
    1, -- TG_LAYER_ID for this topology (from topology.layer)
    '{{25,2}}'
  )
);
SELECT '#3248.line', topology.ST_RemoveIsoEdge('city_data', 25);
ROLLBACK;

BEGIN;
INSERT INTO city_data.f_mix(tg) VALUES(
  topology.CreateTopoGeom(
    'city_data', -- Topology name
    4, -- Topology geometry type (collection)
    2, -- TG_LAYER_ID for this topology (from topology.layer)
    '{{25,2}}'
  )
);
SELECT '#3248.collection', topology.ST_RemoveIsoEdge('city_data', 25);
ROLLBACK;

SELECT 'non-iso', topology.ST_RemoveIsoEdge('city_data', 1);
SELECT 'iso', topology.ST_RemoveIsoEdge('city_data', 25);

SELECT NULL FROM topology.DropTopology('city_data');