# How to convert latitude, longitude to geohash

**URL:** https://discuss.elastic.co/t/how-to-convert-latitude-longitude-to-geohash/201240
**Category:** Kibana
**Created:** [September 26, 2019, 1:13pm UTC](https://discuss.elastic.co/t/how-to-convert-latitude-longitude-to-geohash/201240 "2019-09-26T13:13:56Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![sahishnu.patil](https://avatars.discourse-cdn.com/v4/letter/s/8e7dd6/32.png) [@sahishnu.patil](https://discuss.elastic.co/u/sahishnu.patil)
#### Post date: [September 26, 2019, 1:13pm UTC](https://discuss.elastic.co/t/how-to-convert-latitude-longitude-to-geohash/201240/1 "2019-09-26T13:13:56Z")

</div>

While using Coordinate map visualization, Kibana asks for geo\_hash field type.  
Input data is filtered to get latitude and longitude as separate values as well as in as array.  
The error - The index pattern access\_log\* does not contain any of the following compatible field types: geo\_point.

---

<div class="post-metadata">

### Author: ![wylie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wylie/32/81794_2.png) [@wylie](https://discuss.elastic.co/u/wylie)
#### Post date: [September 26, 2019, 2:04pm UTC](https://discuss.elastic.co/t/how-to-convert-latitude-longitude-to-geohash/201240/2 "2019-09-26T14:04:40Z")

</div>

`geo_hash` is an aggregation that works only on certain field types. You need to change your.schema for those fields, for example to the `geo_point` type:

[https://www.elastic.co/guide/en/elasticsearch/reference/current/geo-point.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/geo-point.html)

Here are some links to how to change the mapping:

[https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html#update-mapping](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html#update-mapping)

---

<div class="post-metadata">

### Author: ![sahishnu.patil](https://avatars.discourse-cdn.com/v4/letter/s/8e7dd6/32.png) [@sahishnu.patil](https://discuss.elastic.co/u/sahishnu.patil)
#### Post date: [September 26, 2019, 2:56pm UTC](https://discuss.elastic.co/t/how-to-convert-latitude-longitude-to-geohash/201240/3 "2019-09-26T14:56:41Z")

</div>

Hi Wyile,  
Done with that, I forgot to implement mapping on the coordinates to geo\_point.  
Now the data type is converted to geo\_point, but the map is not displaying any values. Its just blank.

---

<div class="post-metadata">

### Author: ![wylie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wylie/32/81794_2.png) [@wylie](https://discuss.elastic.co/u/wylie)
#### Post date: [September 26, 2019, 3:00pm UTC](https://discuss.elastic.co/t/how-to-convert-latitude-longitude-to-geohash/201240/4 "2019-09-26T15:00:54Z")

</div>

It sounds like you might not have reindexed the data

---

<div class="post-metadata">

### Author: ![sahishnu.patil](https://avatars.discourse-cdn.com/v4/letter/s/8e7dd6/32.png) [@sahishnu.patil](https://discuss.elastic.co/u/sahishnu.patil)
#### Post date: [September 26, 2019, 3:28pm UTC](https://discuss.elastic.co/t/how-to-convert-latitude-longitude-to-geohash/201240/5 "2019-09-26T15:28:04Z")

</div>

No, I have reindexed the data. It displays count of geohash\_grid to be null (-)

---

<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: [October 24, 2019, 3:28pm UTC](https://discuss.elastic.co/t/how-to-convert-latitude-longitude-to-geohash/201240/6 "2019-10-24T15:28:05Z")

</div>

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