elasticsearch/docs/reference/esql/functions/spatial-functions.asciidoc
Craig Taverner 8d93a934f6
Add two new OGC functions ST_X and ST_Y (#105768)
* Add two new OGC functions ST_X and ST_Y

Recently Nik did work that involved extracting the X and Y coordinates from geo_point data using `to_string(field)` followed by a DISSECT command to re-parse the string to get the X and Y coordinates.

This is much more efficiently achieved using existing known OGC functions `ST_X` and `ST_Y`.

* Update docs/changelog/105768.yaml

* Fixed invalid changelog yaml

* Fixed mixed cluster tests

* Fixed tests and added docs

* Removed false impression that these functions were different for geo/cartesian

With the use of WKB as the core type in the compute engine, many spatial functions are actually the same between these two types, so we should not give the impression they are different.

* Code review comments and reduced object creation.

* Revert temporary StringUtils hack, and fix bug in x/y extraction from WKB

* Revert object creation reduction

* Fixed mistakes in documentation
2024-03-06 11:19:54 +01:00

16 lines
285 B
Text

[[esql-spatial-functions]]
==== {esql} spatial functions
++++
<titleabbrev>Spatial functions</titleabbrev>
++++
{esql} supports these spatial functions:
// tag::spatial_list[]
* <<esql-st_x>>
* <<esql-st_y>>
// end::spatial_list[]
include::st_x.asciidoc[]
include::st_y.asciidoc[]