duckdb_spatial
duckdb_spatial copied to clipboard
Feature request: ST_LineLocatePoint
ST_LineLocatePoint to return a float between 0 and 1 representing the location of the closest point on a LineString to the given point, as a fraction of ST_Length length. This will complement ST_LineInterpolatePoint that returns a point interpolated along a line at a fraction of total 2D length.
Hello! This is already implemented,
DuckDB v1.4.1 (Andium) b390a7c376
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
D load spatial;
D select st_linelocatepoint('LINESTRING(0 0, 1 1, 2 2)', 'POINT(1 1)');
┌───────────────────────────────────────────────────────────────┐
│ st_linelocatepoint('LINESTRING(0 0, 1 1, 2 2)', 'POINT(1 1)') │
│ double │
├───────────────────────────────────────────────────────────────┤
│ 0.5 │
└───────────────────────────────────────────────────────────────┘
Thanks - good to know.