# How to query geo data from Elastic Maps Service

**URL:** <https://discuss.elastic.co/t/how-to-query-geo-data-from-elastic-maps-service/265334>\
**Category:** Elasticsearch\
**Created:** [February 24, 2021, 11:50am UTC](https://discuss.elastic.co/t/how-to-query-geo-data-from-elastic-maps-service/265334 "2021-02-24T11:50:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zhifei](https://avatars.discourse-cdn.com/v4/letter/z/a87d85/32.png) [@Zhifei](https://discuss.elastic.co/u/Zhifei)\
**Post date:** [February 24, 2021, 11:50am UTC](https://discuss.elastic.co/t/how-to-query-geo-data-from-elastic-maps-service/265334/1 "2021-02-24T11:50:38Z")

</div>

Hi,

I found Elastic recently introduced a new brilliant feature called Elastic Maps Service, and I have tried to create Maps with it by adding Vector Layers. I wonder can I query the GeoJSON data of each of the [Vector Layers](https://maps.elastic.co/v7.4/index.html?locale=en#file/norway_counties)? My problem is:  
I have a time series of car locations in an Elastic index (and continuously ingesting new data), and I want to know which county/region defined in the GeoJSON data the car is located at each time step. What could be the most efficient way to do this?

---

<div class="post-metadata">

**Author:** ![nickpeihl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nickpeihl/32/112622_2.png) [@nickpeihl](https://discuss.elastic.co/u/nickpeihl)\
**Post date:** [February 24, 2021, 4:41pm UTC](https://discuss.elastic.co/t/how-to-query-geo-data-from-elastic-maps-service/265334/2 "2021-02-24T16:41:51Z")

</div>

Hi @Zhifei. I think [this blog post that describes geo enrichment](https://www.elastic.co/blog/how-to-map-custom-boundaries-in-kibana-with-reverse-geocoding) will be useful for you.

You can download GeoJSON files from Elastic Maps Service from [https://maps.elastic.co](https://maps.elastic.co). Then you can add those boundaries to your Elasticsearch cluster using the [GeoJSON Upload tool](https://www.elastic.co/guide/en/kibana/current/indexing-geojson-data-tutorial.html#upload-and-index-geojson-file) in Elastic Maps.

Then follow the steps in the blog post to set up Geo Enrichment of your car locations.

**Note** The boundaries offered by Elastic Maps Service are approximate and likely only useful at small scales. If your cars travel near borders, you may end up with some false positives.

Let us know if you have further questions.

---

<div class="post-metadata">

**Author:** ![Zhifei](https://avatars.discourse-cdn.com/v4/letter/z/a87d85/32.png) [@Zhifei](https://discuss.elastic.co/u/Zhifei)\
**Post date:** [February 25, 2021, 10:03am UTC](https://discuss.elastic.co/t/how-to-query-geo-data-from-elastic-maps-service/265334/3 "2021-02-25T10:03:32Z")

</div>

Thanks @nickpeihl, really helpful!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 25, 2021, 10:04am UTC](https://discuss.elastic.co/t/how-to-query-geo-data-from-elastic-maps-service/265334/4 "2021-03-25T10:04:01Z")

</div>

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