# Maps : how to join locations with polygons and counting

**URL:** <https://discuss.elastic.co/t/maps-how-to-join-locations-with-polygons-and-counting/223362>\
**Category:** Kibana\
**Tags:** maps\
**Created:** [March 12, 2020, 3:01pm UTC](https://discuss.elastic.co/t/maps-how-to-join-locations-with-polygons-and-counting/223362 "2020-03-12T15:01:16Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jsanz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsanz/32/53734_2.png) [@jsanz](https://discuss.elastic.co/u/jsanz)\
**Post date:** [March 12, 2020, 3:24pm UTC](https://discuss.elastic.co/t/maps-how-to-join-locations-with-polygons-and-counting/223362/2 "2020-03-12T15:24:32Z")

</div>

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](https://www.elastic.co/guide/en/elasticsearch/reference/current/geo-match-enrich-policy-type.html) 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](https://discuss.elastic.co/t/check-if-vehicle-is-driving-on-water/205862).

Hope it helps.

---

_[View the full topic](https://discuss.elastic.co/t/maps-how-to-join-locations-with-polygons-and-counting/223362)._
