Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add multi-argument distance #311

Merged
merged 3 commits into from
May 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _sections/30-bindings.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ For convenience, the functions are categorized based on their main usage. Some f
<a id="fn:indexed-repeat" href="#fn:indexed-repeat">`indexed-repeat(node-set arg, node-set repeat1, number index1, [node-set repeatN, number indexN]{0,2})`</a> | string | Returns a single node value from a node-set by selecting the 1-based index of a repeat node-set that this node is a child of. It does this up to 3 repeat levels deep. E.g. `indexed-repeat(//node, /path/to/repeat, //index1, /path/to/repeat/nested-repeat, //index2)` is meant to be a shortcut for `//repeat[position()=//index1]/nested-repeat[position()=index2]/node` in native XPath syntax.
<a id="fn:Geographic-Functions" href="#fn:Geographic-Functions">**Geographic Functions**</a>|||
<a id="fn:area" href="#fn:area">`area(node-set ns|geoshape gs)`</a> | number | Returns the calculated area in m2 of either a node-set of geopoints or a geoshape value (not a combination of both) on Earth. It takes into account the circumference of the Earth around the Equator but does not take altitude into account.
<a id="fn:distance" href="#fn:distance">`distance(node-set ns|geoshape gs|geotrace gt)`</a> | number | Returns the distance in meters of either a node-set of geopoints or a single geoshape value or a single geotrace value (not a combination of these) on Earth, in the sequence provided by the points in the parameter. It takes into account the circumference of the Earth around the Equator and does not take altitude into account.
<a id="fn:distance" href="#fn:distance">`distance(node-set ns|geoshape gs|geotrace gt|(geopoint|string) arg*)`</a> | number | Returns the total distance in meters of all line segments represented either by a single node-set of geopoints or a single geoshape value or a single geotrace value or a sequence of geopoint values (not a combination of these) on Earth. It uses the [spherical law of cosines](https://www.movable-type.co.uk/scripts/latlong.html) to take the circumference of the Earth around the Equator into account and does not take altitude into account. The line segment distances are computed in the order that the points are provided and then added together. The multiple-argument variant can take a combination of literal string geopoint values and references to geopoint nodes.
<a id="fn:base64-decode" href="#fn:base64-decode">`base64-decode(base64Binary input)`| `string` | Interprets the contents of the base64Binary value as a sequence of bytes representing a UTF-8 character string and returns the corresponding string.

### Metadata
Expand Down