You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
==== Geo Centroid Aggregation on `geo_shape` fields
151
+
152
+
The centroid metric for geo-shapes is more nuanced than for points. The centroid of a specific aggregation bucket
153
+
containing shapes is the centroid of the highest-dimensionality shape type in the bucket. For example, if a bucket contains
154
+
shapes comprising of polygons and lines, then the lines do not contribute to the centroid metric. Each type of shape's
155
+
centroid is calculated differently. Envelopes and circles ingested via the <<ingest-circle-processor>> are treated
156
+
as polygons.
157
+
158
+
|===
159
+
|Geometry Type | Centroid Calculation
160
+
161
+
|[Multi]Point
162
+
|equally weighted average of all the coordinates
163
+
164
+
|[Multi]LineString
165
+
|a weighted average of all the centroids of each segment, where the weight of each segment is its length in degrees
166
+
167
+
|[Multi]Polygon
168
+
|a weighted average of all the centroids of all the triangles of a polygon where the triangles are formed by every two consecutive vertices and the starting-point.
169
+
holes have negative weights. weights represent the area of the triangle in deg^2 calculated
170
+
171
+
|GeometryCollection
172
+
|The centroid of all the underlying geometries with the highest dimension. If Polygons and Lines and/or Points, then lines and/or points are ignored.
0 commit comments