Skip to content

Commit

Permalink
clarify point.distance function (#1064)
Browse files Browse the repository at this point in the history
  • Loading branch information
JPryce-Aklundh authored Oct 15, 2024
1 parent c0be0b4 commit 942baab
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,9 @@ Either the pattern already exists, or it needs to be created.
| Returns a 2D or 3D point object, given two or respectively three coordinate values in the Cartesian coordinate system or WGS 84 geographic coordinate system.

| xref:functions/spatial.adoc#functions-point-distance[`point.distance()`]
| Returns a `FLOAT` representing the geodesic distance between any two points in the same CRS.
| Returns a `FLOAT` representing the distance between any two points in the same CRS.
If the points are in the WGS 84 CRS, the function returns the geodesic distance (i.e., the shortest path along the curved surface of the Earth).
If the points are in a Cartesian CRS, the function returns the Euclidean distance (i.e., the shortest straight-line distance in a flat, planar space).

| xref:functions/spatial.adoc#functions-point-withinBBox[`point.withinBBox()`]
| Returns true if the provided point is within the bounding box defined by the two provided points.
Expand Down
4 changes: 3 additions & 1 deletion modules/ROOT/pages/functions/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,9 @@ These functions are used to specify 2D or 3D points in a geographic or cartesian

1.1+| xref::functions/spatial.adoc#functions-distance[`point.distance()`]
| `point.distance(from :: POINT, to :: POINT) :: FLOAT`
| Returns a `FLOAT` representing the geodesic distance between any two points in the same CRS.
| Returns a `FLOAT` representing the distance between any two points in the same CRS.
If the points are in the WGS 84 CRS, the function returns the geodesic distance (i.e., the shortest path along the curved surface of the Earth).
If the points are in a Cartesian CRS, the function returns the Euclidean distance (i.e., the shortest straight-line distance in a flat, planar space).

1.1+| xref::functions/spatial.adoc#functions-withinBBox[`point.withinBBox()`]
| `point.withinBBox(point :: POINT, lowerLeft :: POINT, upperRight :: POINT) :: BOOLEAN`
Expand Down
4 changes: 3 additions & 1 deletion modules/ROOT/pages/functions/spatial.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,9 @@ If `null` is provided as the argument, `null` is returned.
.Details
|===
| *Syntax* 3+| `point.distance(from, to)`
| *Description* 3+| Returns a `FLOAT` representing the geodesic distance between any two points in the same CRS.
| *Description* 3+| Returns a `FLOAT` representing the distance between any two points in the same CRS.
If the points are in the WGS 84 CRS, the function returns the geodesic distance (i.e., the shortest path along the curved surface of the Earth).
If the points are in a Cartesian CRS, the function returns the Euclidean distance (i.e., the shortest straight-line distance in a flat, planar space).
.3+| *Arguments* | *Name* | *Type* | *Description*
| `from` | `POINT` | A start point.
| `to` | `POINT` | An end point in the same CRS as the start point.
Expand Down

0 comments on commit 942baab

Please sign in to comment.