File: node.sql

package info (click to toggle)
postgis 2.3.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 58,660 kB
  • ctags: 10,181
  • sloc: ansic: 132,858; sql: 131,148; xml: 46,460; sh: 4,832; perl: 4,476; makefile: 2,749; python: 1,198; yacc: 442; lex: 131
file content (16 lines) | stat: -rw-r--r-- 433 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
-- Node two crossing lines
select 't1', st_asewkt(st_node(
'SRID=10;MULTILINESTRING((0 0, 10 0),(5 -5, 5 5))'
));

-- Node two overlapping lines
select 't2', st_asewkt(st_node(
'SRID=10;MULTILINESTRING((0 0, 10 0, 20 0),(25 0, 15 0, 8 0))'
));

-- Node a self-intersecting line
-- NOTE: requires GEOS 3.3.2
-- See http://trac.osgeo.org/geos/ticket/482
select 't3', st_asewkt(st_node(
'SRID=10;LINESTRING(0 0, 10 10, 0 10, 10 0)'
));