Changes between Version 5 and Version 6 of UsersWikiLinearRefFunctions
- Timestamp:
- 08/05/20 14:45:11 (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
UsersWikiLinearRefFunctions
v5 v6 38 38 **Example 1: show the segment record returned** 39 39 40 * Note how the ST_LineLocateSegment function in the JOIN can reference the preceding table in the join 41 (functions cause an implicit LATERAL join). 42 40 43 {{{ 41 44 SELECT ST_LineLocateSegment( 'LINESTRING (0 0, 10 10, 20 20, 30 30)'::geometry, … … 47 50 WITH data(id, line) AS (VALUES 48 51 ( 1, 'LINESTRING (0 0, 10 10, 20 20, 30 30)'::geometry ) 49 ),50 loc AS (51 SELECT id, line, index, geom AS pt52 FROM data CROSS JOIN ST_LineLocateSegment( data.line, 'POINT(15 15.1)'::geometry )53 52 ) 54 SELECT id, ST_AsText( ST_AddPoint( line, pt, index ) ) FROM loc; 53 SELECT id, ST_AddPoint( data.line, geom, index ) 54 FROM data CROSS JOIN ST_LineLocateSegment( data.line, 'POINT(15 15.1)'::geometry ); 55 55 }}} 56 56