[discrete]
[[esql-agg-st-centroid]]
=== `ST_CENTROID_AGG`

experimental::[]

Calculate the spatial centroid over a field with spatial point geometry type.

[source.merge.styled,esql]
----
include::{esql-specs}/spatial.csv-spec[tag=st_centroid_agg-airports]
----
[%header.monospaced.styled,format=dsv,separator=|]
|===
include::{esql-specs}/spatial.csv-spec[tag=st_centroid_agg-airports-result]
|===

Supported types:

[%header.monospaced.styled,format=dsv,separator=|]
|===
v | result
geo_point | geo_point
cartesian_point | cartesian_point
|===
