2015-06-11 12:02:27 +10:00
{
2015-09-20 17:12:43 +02:00
"name": "length",
"type": "function",
2020-07-02 01:46:48 +01:00
"groups": ["String", "GeometryGroup"],
Clean up and extend expression geometry functions:
- New expression functions for area(geom), perimeter(geom),
point_n(geom), start_point(geom), end_point(geom), make_point(x,y)
- Add new variant to length() function which takes a geometry object,
allows for length(geom) evaluation.
- Rename x_at, y_at to $x_at, $y_at (alias old names) to reflect that
these only work on current feature geometry
- Add x(geom), y(geom) functions which return x and y coordinate
for point geometries or centroid x/y for non-point geometries
(fix #11008)
2015-09-18 05:41:38 +10:00
"description": "Returns the number of characters in a string or the length of a geometry linestring.",
"variants": [
{ "variant": "String variant",
"variant_description": "Returns the number of characters in a string.",
"arguments": [ {"arg":"string","description":"string to count length of"} ],
"examples": [ { "expression":"length('hello')", "returns":"5"} ] },
{
"variant": "Geometry variant",
2016-02-23 11:27:26 +11:00
"variant_description": "Calculate the length of a geometry line object. Calculations are always planimetric in the Spatial Reference System (SRS) of this geometry, and the units of the returned length will match the units for the SRS. This differs from the calculations performed by the $length function, which will perform ellipsoidal calculations based on the project's ellipsoid and distance unit settings.",
Clean up and extend expression geometry functions:
- New expression functions for area(geom), perimeter(geom),
point_n(geom), start_point(geom), end_point(geom), make_point(x,y)
- Add new variant to length() function which takes a geometry object,
allows for length(geom) evaluation.
- Rename x_at, y_at to $x_at, $y_at (alias old names) to reflect that
these only work on current feature geometry
- Add x(geom), y(geom) functions which return x and y coordinate
for point geometries or centroid x/y for non-point geometries
(fix #11008)
2015-09-18 05:41:38 +10:00
"arguments": [ {"arg":"geometry","description":"line geometry object"}],
"examples": [ { "expression":"length(geom_from_wkt('LINESTRING(0 0, 4 0)'))", "returns":"4.0"}]
}]
2015-06-11 12:02:27 +10:00
}