# Unable to convert to geopoint

**URL:** <https://discuss.elastic.co/t/unable-to-convert-to-geopoint/90002>\
**Category:** Logstash\
**Created:** [June 19, 2017, 11:08pm UTC](https://discuss.elastic.co/t/unable-to-convert-to-geopoint/90002 "2017-06-19T23:08:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![potatoshane](https://avatars.discourse-cdn.com/v4/letter/p/49beb7/32.png) [@potatoshane](https://discuss.elastic.co/u/potatoshane)\
**Post date:** [June 19, 2017, 11:08pm UTC](https://discuss.elastic.co/t/unable-to-convert-to-geopoint/90002/1 "2017-06-19T23:08:20Z")

</div>

Hello,

I am currently using the geoip filter to generate geopoints. However, when it is fed into Elasticsearch, the type for geoip.location is number, which I am assuming is float. I need it to be geo\_point in order to visualize it on the map.

> This is the filter I am using  
> geoip {  
> source =\> "src\_ip"  
> add\_tag =\> ["geoip\_success"]  
> }

This is my template

> ```
> {
> "logstash": {
> "order": 0,
> "version": 50001,
> "template": "logstash-*",
> "settings": {
> "index": {
> "refresh_interval": "5s"
> }
> },
> "mappings": {
> "_default_": {
> "dynamic_templates": [
> {
> "message_field": {
> "path_match": "message",
> "mapping": {
> "norms": false,
> "type": "text"
> },
> "match_mapping_type": "string"
> }
> },
> {
> "string_fields": {
> "mapping": {
> "norms": false,
> "type": "text",
> "fields": {
> "keyword": {
> "type": "keyword"
> }
> }
> },
> "match_mapping_type": "string",
> "match": "*"
> }
> }
> ],
> "_all": {
> "norms": false,
> "enabled": true
> },
> "properties": {
> "@timestamp": {
> "include_in_all": false,
> "type": "date"
> },
> "geoip": {
> "dynamic": true,
> "properties": {
> "ip": {
> "type": "ip"
> },
> "latitude": {
> "type": "half_float"
> },
> "location": {
> "type": "geo_point"
> },
> "longitude": {
> "type": "half_float"
> }
> }
> },
> "@version": {
> "include_in_all": false,
> "type": "keyword"
> }
> }
> }
> },
> "aliases": {}
> }
> }
> 
> ```

I added the following but it's still not showing up as geo\_point

> ```
> mutate {
> add_field => { "[geoip][location]" => "%{longitude}" }
> add_field => { "[geoip][location]" => "%{latitude}" }
> }
> 
> ```

In my mapping, I see this

> "latitude": {  
> "type": "float"  
> },  
> "location": {  
> "type": "float"  
> },  
> "longitude": {  
> "type": "float"  
> },

I have deleted both my templates and index multiple times to try to get it to work, but nothing so far.

Help is appreciated.

Thanks

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 19, 2017, 11:26pm UTC](https://discuss.elastic.co/t/unable-to-convert-to-geopoint/90002/2 "2017-06-19T23:26:26Z")

</div>

[https://www.elastic.co/blog/geoip-in-the-elastic-stack](https://www.elastic.co/blog/geoip-in-the-elastic-stack) has a bunch of troubleshooting steps that might be handy

---

<div class="post-metadata">

**Author:** ![potatoshane](https://avatars.discourse-cdn.com/v4/letter/p/49beb7/32.png) [@potatoshane](https://discuss.elastic.co/u/potatoshane)\
**Post date:** [June 19, 2017, 11:35pm UTC](https://discuss.elastic.co/t/unable-to-convert-to-geopoint/90002/3 "2017-06-19T23:35:34Z")

</div>

I initially followed this blog post, but it didn't work. Which is why I started to look into my templates, mappings, etc...

---

<div class="post-metadata">

**Author:** ![potatoshane](https://avatars.discourse-cdn.com/v4/letter/p/49beb7/32.png) [@potatoshane](https://discuss.elastic.co/u/potatoshane)\
**Post date:** [June 20, 2017, 1:06am UTC](https://discuss.elastic.co/t/unable-to-convert-to-geopoint/90002/4 "2017-06-20T01:06:17Z")

</div>

I have just modified my filter to follow exactly like the blog again, but as shown below, it is still showing up as numeric, and not geo\_point. Which makes no sense to me especially if my template matches the one in the blog.

 ![](https://us1.discourse-cdn.com/elastic/original/3X/0/6/06b056cb442402d7bb9b17d73bea876e6293930c.png)

---

<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:** [July 18, 2017, 1:06am UTC](https://discuss.elastic.co/t/unable-to-convert-to-geopoint/90002/5 "2017-07-18T01:06:44Z")

</div>

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