-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request qgis#58483 from nirvn/interpolation_by_m_expression
[expression] Add line_interpolate_point_by_m and line_locate_m expressions
- Loading branch information
Showing
4 changed files
with
106 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"name": "line_interpolate_point_by_m", | ||
"type": "function", | ||
"groups": ["GeometryGroup"], | ||
"description": "Returns the point interpolated by a matching M value along a linestring geometry.", | ||
"arguments": [{ | ||
"arg": "geometry", | ||
"description": "a linestring geometry" | ||
}, { | ||
"arg": "m", | ||
"description": "an M value" | ||
}, { | ||
"arg": "use_3d_distance", | ||
"optional": true, | ||
"default": "false", | ||
"description": "controls whether 2D or 3D distances between vertices should be used during interpolation (this option is only considered for lines with z values)" | ||
}], | ||
"examples": [{ | ||
"expression": "geom_to_wkt(line_interpolate_point_by_m(geom_from_wkt('LineStringM(0 0 0, 10 10 10)'), m:=5))", | ||
"returns": "'Point (5 5)'" | ||
}], | ||
"tags": ["distance", "interpolated", "linestring", "point", "specified", "along"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"name": "line_locate_m", | ||
"type": "function", | ||
"groups": ["GeometryGroup"], | ||
"description": "Returns the distance along a linestring corresponding to the first matching interpolated M value.", | ||
"arguments": [{ | ||
"arg": "geometry", | ||
"description": "a linestring geometry" | ||
}, { | ||
"arg": "m", | ||
"description": "an M value" | ||
}, { | ||
"arg": "use_3d_distance", | ||
"optional": true, | ||
"default": "false", | ||
"description": "controls whether 2D or 3D distances between vertices should be used during interpolation (this option is only considered for lines with z values)" | ||
}], | ||
"examples": [{ | ||
"expression": "line_locate_m(geometry:=geom_from_wkt('LineStringM(0 0 0, 10 10 10)'),m:=5)", | ||
"returns": "7.07106" | ||
}], | ||
"tags": ["distance", "linestring", "interpolated", "corresponding", "along"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters