File: st_moveisonode.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 (31 lines) | stat: -rw-r--r-- 1,184 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
\set VERBOSITY terse
set client_min_messages to ERROR;

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

-- Isolated node to invalid location (coincident)
SELECT 'coincident_node', topology.ST_MoveIsoNode('city_data', 4, 'POINT(25 35)');
-- Isolated node to invalid location (edge-crossing)
SELECT 'edge-crossing', topology.ST_MoveIsoNode('city_data', 4, 'POINT(20 40)');

-- Non isolated node (is used by an edge);
SELECT 'not-isolated', topology.ST_MoveIsoNode('city_data', 3, 'POINT(25 36)');

-- Invalid point
SELECT 'invalid-new-point', topology.ST_MoveIsoNode('city_data', 4, 'MULTIPOINT(5 4)');

-- Move outside of original containing face (universal)
SELECT 'change-face-to-universal', topology.ST_MoveIsoNode('city_data', 4, 'POINT(20 41)');
-- Move outside of original containing face (universal)
SELECT 'change-face-to-other', topology.ST_MoveIsoNode('city_data', 4, 'POINT(15 37)');

-- Valid move
SELECT topology.ST_MoveIsoNode('city_data', 4, 'POINT(21 37)');
SELECT topology.ST_MoveIsoNode('city_data', 4, 'POINT(19 37)');

-- TODO: test moving the node in a different face (#3232)


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