Changes between Version 5 and Version 6 of UsersWikiLinearRefFunctions


Ignore:
Timestamp:
Aug 5, 2020, 2:45:11 PM (4 years ago)
Author:
mdavis
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • UsersWikiLinearRefFunctions

    v5 v6  
    3838**Example 1: show the segment record returned**
    3939
     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
    4043{{{
    4144SELECT ST_LineLocateSegment( 'LINESTRING (0 0, 10 10, 20 20, 30 30)'::geometry,
     
    4750WITH data(id, line) AS (VALUES
    4851    ( 1, 'LINESTRING (0 0, 10 10, 20 20, 30 30)'::geometry )
    49 ),
    50 loc AS (
    51   SELECT id, line, index, geom AS pt
    52     FROM data CROSS JOIN ST_LineLocateSegment( data.line, 'POINT(15 15.1)'::geometry )
    5352)
    54 SELECT id, ST_AsText( ST_AddPoint( line, pt, index ) ) FROM loc;
     53SELECT id, ST_AddPoint( data.line, geom, index )
     54  FROM data CROSS JOIN ST_LineLocateSegment( data.line, 'POINT(15 15.1)'::geometry );
    5555}}}
    5656