Maps : how to join locations with polygons and counting


I have a lot of boat positions in a layer.
I imported a GeoJSON map describing different zones (polygons) in an other layer.
I want to do statistics by zone. For example, display the number of boats by zone.
I did not succeed in to do it.
The only way to do a relation between two layers is to have a share key between the positions index and the geojson map index (as in the tutorial with countries and apache logs).

Is it possible in Elastic Maps 7.6 ? If no, is it in the road map ?

Thanks for your help.


Hi Arnaud

You can't do this at query time at this moment, but you can assign zone identifiers to each position at ingest time using a pipeline and the enrich processor, check this example that fits exactly the Point in Polygon use case.

It's being discussed to make this workflow actionable from Elastic Maps, but at this moment you'll need to reindex manually.

Additionally, you may find a similar workflow but more focused in real time alerting on this other post.

Hope it helps.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.