# Displaying Geo data on Tile Map

**URL:** <https://discuss.elastic.co/t/displaying-geo-data-on-tile-map/29528>\
**Category:** Logstash\
**Created:** [September 18, 2015, 12:00am UTC](https://discuss.elastic.co/t/displaying-geo-data-on-tile-map/29528 "2015-09-18T00:00:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashwintumma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ashwintumma/32/4828_2.png) [@ashwintumma](https://discuss.elastic.co/u/ashwintumma)\
**Post date:** [September 18, 2015, 12:00am UTC](https://discuss.elastic.co/t/displaying-geo-data-on-tile-map/29528/1 "2015-09-18T00:00:50Z")

</div>

I have the following logstash filter configuration, wherein the input is a JSON file which already has latitude and longitude data. When I index the data, in the document, I do find attributes of longitude, and latitude. How can I use this information for displaying points on the map? When I go to the Visualize tab, and try to select from dropdown, it says that there is no compatible type. I understand that I need to make them as geohash type. Any ideas of how can I get it working?

filter{  
json{  
source =\> "message"  
}  
geoip {  
source =\> "longitude"  
target =\> "geoip"  
add\_field =\> ["[geoip][coordinates]", "%{[geoip][longitude]}" ]  
}  
geoip {  
source =\> "latitude"  
target =\> "geoip"  
add\_field =\> ["[geoip][coordinates]", "%{[geoip][latitude]}" ]  
}  
mutate {  
convert =\> ["[geoip][coordinates]", "float"]  
}

}  
output {  
elasticsearch {  
protocol =\> "http"  
index =\> "my\_business"  
}  
stdout { }  
}

---

<div class="post-metadata">

**Author:** ![Joshua\_Rich](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joshua_rich/32/44953_2.png) [@Joshua\_Rich](https://discuss.elastic.co/u/Joshua_Rich)\
**Post date:** [September 18, 2015, 1:34am UTC](https://discuss.elastic.co/t/displaying-geo-data-on-tile-map/29528/2 "2015-09-18T01:34:35Z")

</div>

The geoip filter is only needed when you want to enrich an event with geo data by locating the IP address. If you've already got geo points, you don't need to use it. With the default logstash template, you'll need to stick your latitude and longitude values into the `[geoip][latitude]` and `[geoip][longitude]` fields and/or the `[geoip][location]` field. Say your existing fields are `lat` and `lon`, you can insert them correctly with the following `mutate` filter:

```auto
    mutate {
        convert => {
            "lat" => "float"
            "lon" => "float"
        }
        add_field => {
            "[geoip][location]" => ["%{lon}", "%{lat}"]
            "[geoip][latitude]" => "%{lat}"
            "[geoip][longitude]" => "%{lon}"
        }

```

Ideally however, you should probably either override the default Logstash index template or create a new template which defines your existing field names as the _geo\_point_ type, then you only need to do the float conversion above and the fields should be usable as-is in Kibana.

---

<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 6, 2017, 5:28am UTC](https://discuss.elastic.co/t/displaying-geo-data-on-tile-map/29528/3 "2017-07-06T05:28:45Z")

</div>


