# Convert lat and long to geohash

**URL:** https://discuss.elastic.co/t/convert-lat-and-long-to-geohash/197631
**Category:** Kibana
**Created:** [September 1, 2019, 8:11pm UTC](https://discuss.elastic.co/t/convert-lat-and-long-to-geohash/197631 "2019-09-01T20:11:39Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)
#### Post date: [September 2, 2019, 12:24am UTC](https://discuss.elastic.co/t/convert-lat-and-long-to-geohash/197631/2 "2019-09-02T00:24:52Z")

</div>

Perhaps see this thread. In short you need a index template with a geo\_point data type mapping typically accomplished via an index\_template

> [@Geo\_point problems with multiple indexes and Logstash](https://discuss.elastic.co/t/geo-point-problems-with-multiple-indexes-and-logstash/197121):
>
> Hi, We have a problem loading geo\_point data, the index template, after some tests, now is configured as: location..........conflict location.lat.....number location.lon....number So, when I try to create a map visualization there is no data. We load the data from Logstash: mutate { add\_field =\> ["[geolocation][lat]", "%{lat}" ] add\_field =\> ["[geolocation][lon]", "%{lng}" ] convert =\> { "[geolocation][lat]" =\> "float" "[geolocation][lon]" =\> "float" } remove\_field =\> [ "lat", "…

and perhaps this post

> [@Geo\_point problems with multiple indexes and Logstash](https://discuss.elastic.co/t/geo-point-problems-with-multiple-indexes-and-logstash/197121/7):
>
> Yes use an index template see [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html) it is exactly for this case. It will be applied to all new indices that fit the pattern apologies I should have showed you this at first I just wasn't sure what you were trying to accomplish. it would look something like this and every new index created with the pattern will apply this mapping PUT \_template/stats { "index\_patterns": ["stats\*"], "settings": { "number\_of\_shards": 1 }, "mappings": { "properties": { "location": { "t…

---

_[View the full topic](https://discuss.elastic.co/t/convert-lat-and-long-to-geohash/197631)._
