mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-23 00:02:38 -05:00
- Make it more obvious that the distance is in CRS units, not a percentage, on the first example - Add example that ends up with floating point coordinates - Add example that returns NULL
25 lines
960 B
Plaintext
25 lines
960 B
Plaintext
{
|
|
"name": "line_interpolate_point",
|
|
"type": "function",
|
|
"groups": ["GeometryGroup"],
|
|
"description": "Returns the point interpolated by a specified distance along a linestring geometry.",
|
|
"arguments": [{
|
|
"arg": "geometry",
|
|
"description": "a linestring geometry"
|
|
}, {
|
|
"arg": "distance",
|
|
"description": "distance along line to interpolate"
|
|
}],
|
|
"examples": [{
|
|
"expression": "geom_to_wkt(line_interpolate_point(geometry:=geom_from_wkt('LineString(0 0, 8 0)'), distance:=5))",
|
|
"returns": "'Point (5 0)'"
|
|
}, {
|
|
"expression": "geom_to_wkt(line_interpolate_point(geometry:=geom_from_wkt('LineString(0 0, 1 1, 2 0)'), distance:=2.1))",
|
|
"returns": "'Point (1.48492424 0.51507576)'"
|
|
}, {
|
|
"expression": "geom_to_wkt(line_interpolate_point(geometry:=geom_from_wkt('LineString(0 0, 1 0)'), distance:=2))",
|
|
"returns": "NULL"
|
|
}],
|
|
"tags": ["distance", "interpolated", "linestring", "point", "specified", "along"]
|
|
}
|