Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
More descriptive function help for area/length/perimeter functions
...which better clarify how project ellipsoid and unit settings are
respected by the functions
  • Loading branch information
nyalldawson committed Feb 23, 2016
1 parent fad0b1d commit c23e309
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion resources/function_help/json/$area
@@ -1,6 +1,6 @@
{
"name": "$area",
"type": "function",
"description": "Returns the area of the current feature.",
"description": "Returns the area of the current feature. The area calculated by this function respects both the current project's ellipsoid setting and area unit settings. Eg, if an ellipsoid has been set for the project then the calculated area will be ellipsoidal, and if no ellipsoid is set then the calculated area will be planimetric.",
"examples": [ { "expression":"$area", "returns":"42"}]
}
2 changes: 1 addition & 1 deletion resources/function_help/json/$length
@@ -1,7 +1,7 @@
{
"name": "$length",
"type": "function",
"description": "Returns the length of a linestring. If you need the length of a border of a polygon, use $perimeter instead.",
"description": "Returns the length of a linestring. If you need the length of a border of a polygon, use $perimeter instead. The length calculated by this function respects both the current project's ellipsoid setting and distance unit settings. Eg, if an ellipsoid has been set for the project then the calculated length will be ellipsoidal, and if no ellipsoid is set then the calculated length will be planimetric.",
"examples": [
{ "expression":"$length", "returns":"42.4711"}
]
Expand Down
2 changes: 1 addition & 1 deletion resources/function_help/json/$perimeter
@@ -1,7 +1,7 @@
{
"name": "$perimeter",
"type": "function",
"description": "Returns the perimeter length of the current feature.",
"description": "Returns the perimeter length of the current feature. The perimeter calculated by this function respects both the current project's ellipsoid setting and distance unit settings. Eg, if an ellipsoid has been set for the project then the calculated perimeter will be ellipsoidal, and if no ellipsoid is set then the calculated perimeter will be planimetric.",
"examples": [ { "expression":"$perimeter", "returns":"42"}
]
}
2 changes: 1 addition & 1 deletion resources/function_help/json/area
@@ -1,7 +1,7 @@
{
"name": "area",
"type": "function",
"description": "Returns the area of a geometry polygon object. Calculations are in the Spatial Reference System of this geometry.",
"description": "Returns the area of a geometry polygon object. Calculations are always planimetric in the Spatial Reference System (SRS) of this geometry, and the units of the returned area will match the units for the SRS. This differs from the calculations performed by the $area function, which will perform ellipsoidal calculations based on the project's ellipsoid and area unit settings.",
"arguments": [ {"arg":"geometry","description":"polygon geometry object"}],
"examples": [ { "expression":"area(geom_from_wkt('POLYGON((0 0, 4 0, 4 2, 0 2, 0 0))'))", "returns":"8.0"}]
}
Expand Down
2 changes: 1 addition & 1 deletion resources/function_help/json/length
Expand Up @@ -9,7 +9,7 @@
"examples": [ { "expression":"length('hello')", "returns":"5"} ] },
{
"variant": "Geometry variant",
"variant_description": "Calculate the length of a geometry line object. Calculations are in the Spatial Reference System of this geometry.",
"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.",
"arguments": [ {"arg":"geometry","description":"line geometry object"}],
"examples": [ { "expression":"length(geom_from_wkt('LINESTRING(0 0, 4 0)'))", "returns":"4.0"}]
}]
Expand Down
2 changes: 1 addition & 1 deletion resources/function_help/json/perimeter
@@ -1,7 +1,7 @@
{
"name": "perimeter",
"type": "function",
"description": "Returns the perimeter of a geometry polygon object. Calculations are in the Spatial Reference System of this geometry.",
"description": "Returns the perimeter of a geometry polygon object. Calculations are always planimetric in the Spatial Reference System (SRS) of this geometry, and the units of the returned perimeter will match the units for the SRS. This differs from the calculations performed by the $perimeter function, which will perform ellipsoidal calculations based on the project's ellipsoid and distance unit settings.",
"arguments": [ {"arg":"geometry","description":"polygon geometry object"}],
"examples": [ { "expression":"perimeter(geom_from_wkt('POLYGON((0 0, 4 0, 4 2, 0 2, 0 0))'))", "returns":"12.0"}]
}
Expand Down

0 comments on commit c23e309

Please sign in to comment.