Changes between Version 3 and Version 4 of UsersWikiSplitPolygonWithPoints
- Timestamp:
- 04/27/13 14:21:49 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
UsersWikiSplitPolygonWithPoints
v3 v4 42 42 43 43 Linear Referencing function st_line_interpolate_point() and st_line_substring() will be used to first locate all points along their respective Linestrings, then cut linestrings based on these locations. 44 44 45 In the first CTE, an union is performed to generate the 0 and 1 line fractions, that are necessary to correctly split linestrings. 46 45 47 To identify each point location for a Linestring, we use the rank() windowing function to generate a ascending id for each successive point location. 48 46 49 Then, a self join of the table will be used to select the 2 locations to give to st_line_substring 47 50 … … 69 72 where loc2.idx = loc1.idx+1; 70 73 }}} 74 75 Splitting is very fast. 76 77 Nicolas Ribot.