# How to process "Lat" & "Long" fields using default Logstash config and mapping to use in Kibana 4 tile map

**URL:** <https://discuss.elastic.co/t/how-to-process-lat-long-fields-using-default-logstash-config-and-mapping-to-use-in-kibana-4-tile-map/23398>\
**Category:** Elasticsearch\
**Created:** [April 25, 2015, 8:13pm UTC](https://discuss.elastic.co/t/how-to-process-lat-long-fields-using-default-logstash-config-and-mapping-to-use-in-kibana-4-tile-map/23398 "2015-04-25T20:13:45Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![Rodger\_Moore](https://avatars.discourse-cdn.com/v4/letter/r/f9ae1b/32.png) [@Rodger\_Moore](https://discuss.elastic.co/u/Rodger_Moore)\
**Post date:** [April 28, 2015, 7:42pm UTC](https://discuss.elastic.co/t/how-to-process-lat-long-fields-using-default-logstash-config-and-mapping-to-use-in-kibana-4-tile-map/23398/8 "2015-04-28T19:42:53Z")

</div>

Merci beaucoup, even in English!

Nice blog, this helps a lot 🙂

Cheers

Op dinsdag 28 april 2015 20:45:12 UTC+2 schreef David Pilato:

> Lucky you! I just blogged about it 🙂
> 
> [https://david.pilato.fr/blog/2015-04-28-exploring-capitaine-train-dataset/](http://david.pilato.fr/blog/2015/04/28/exploring-capitaine-train-dataset/)
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 28 avr. 2015 à 18:07, Rodger Moore \<[rodge...@gmail.com](mailto:rodge...@gmail.com) \<javascript:\>\>  
> a écrit :
> 
> Hi David,
> 
> Thanks again for your answer. For some reason I am doing something wrong  
> and its driving me nuts. I've tried your method but the tile map is showing  
> me no results whatsoever. How did you define your template in Elasticsearch  
> for this "location" field?
> 
> Thanks,
> 
> Rodger
> 
> Op zondag 26 april 2015 18:34:01 UTC+2 schreef David Pilato:
> 
> > It's not an issue IMO but just a default configuration.
> > 
> > FYI here is a sample config file I just used to parse some CSV data:
> > 
> > input {  
> > stdin {}  
> > }
> > 
> > filter {  
> > csv {  
> > separator =\> ";"  
> > columns =\> [  
> > "id","name","slug","uic","uic8\_sncf","longitude","latitude",  
> > "parent\_station\_id","is\_city","country",  
> > "is\_main\_station","time\_zone","is\_suggestable","sncf\_id",  
> > "sncf\_is\_enabled","idtgv\_id","idtgv\_is\_enabled",  
> > "db\_id","db\_is\_enabled","idbus\_id","idbus\_is\_enabled","ouigo\_id",  
> > "ouigo\_is\_enabled",  
> > "trenitalia\_id","trenitalia\_is\_enabled","ntv\_id","ntv\_is\_enabled",  
> > "info\_fr",  
> > "info\_en","info\_de","info\_it","same\_as"  
> > ]  
> > }
> > 
> > if [id] == "id" {  
> > drop { }  
> > } else {  
> > mutate {  
> > convert =\> { "longitude" =\> "float" }  
> > convert =\> { "latitude" =\> "float" }  
> > }
> > 
> > ```
> > mutate {
> > rename => {
> > "longitude" => "[location][lon]" 
> > "latitude" => "[location][lat]" 
> > }
> > }
> > 
> > mutate {
> > remove_field => ["message", "host", "@timestamp", "@version"]
> > }
> > 
> > ```
> > 
> > }  
> > }
> > 
> > output {
> > 
> > # stdout { codec =\> rubydebug }
> > 
> > stdout { codec =\> dots }  
> > elasticsearch {  
> > protocol =\> "http"  
> > host =\> "localhost"  
> > index =\> "sncf"  
> > index\_type =\> "gare"  
> > template =\> "sncf\_template.json"  
> > template\_name =\> "sncf"  
> > document\_id =\> "%{id}"  
> > }  
> > }
> > 
> > Hope this helps
> > 
> > Le dimanche 26 avril 2015 13:50:54 UTC+2, Rodger Moore a écrit :
> > 
> > > Hi there again!
> > > 
> > > This problem is caused by, what I believe, a bug in Logstash or  
> > > Elasticsearch. I used a very small test csv file with only 1 or 2 records  
> > > per date. The default Logstash template creates 1 index per date. For some  
> > > reason the creation of indices goes wrong when it comes to field types and  
> > > very few records per index. After I changed the index creation template in  
> > > the output config to:
> > > 
> > > output {
> > > 
> > > elasticsearch {  
> > > protocol =\> "http"  
> > > index =\> "logstash-%{+YYYY.MM}"  
> > > }  
> > > }
> > > 
> > > thus creating only 1 index per month the problem with wrong field types  
> > > was gone. If the folks from Elastic want to reproduce this, I enclosed the  
> > > config files and test file. Changed status to solved.
> > > 
> > > Cheers,
> > > 
> > > Rodger.
> > > 
> > > Op zaterdag 25 april 2015 22:13:45 UTC+2 schreef Rodger Moore:
> > > 
> > > > Hi there!
> > > > 
> > > > My question is fairly simple but I'm having trouble finding a solution.  
> > > > I have a csv file containing Lat and Lon coordinates in separate fields  
> > > > named "Latitude" and "Longitude". Most of the info I found on the net is  
> > > > focussed on GeoIP (which is great functionality btw) but besides some  
> > > > posts  
> > > > [https://groups.google.com/forum/#!topic/elasticsearch/QaI1fj74RlM](https://groups.google.com/forum/#!topic/elasticsearch/QaI1fj74RlM)in  
> > > > Google Groups I failed finding a good tutorial for this use-case.
> > > > 
> > > > What is the simplest way of getting separate Long / Lat fields into a  
> > > > geo\_point and putting these coordinates on a Tile Map in Kibana 4 using the  
> > > > default Logstash (mapping) - ES - Kibana settings? I am using logstash  
> > > > 1.4.2 | Elasticsearch 1.5.0. and Kibana 4.0.1.
> > > > 
> > > > Summary: --\> csv containing Long / Lat in separate fields --\> Logstash  
> > > > --\> ES --\> Kibana4?
> > > > 
> > > > Any help very much appreciated!
> > > > 
> > > > Cheers,
> > > > 
> > > > Rodger
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google Groups  
> > > "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send an  
> > > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > > To view this discussion on the web visit  
> > > [https://groups.google.com/d/msgid/elasticsearch/61c9e345-c997-43ac-ab58-7c753fecf0f0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/61c9e345-c997-43ac-ab58-7c753fecf0f0%40googlegroups.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/61c9e345-c997-43ac-ab58-7c753fecf0f0%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/61c9e345-c997-43ac-ab58-7c753fecf0f0%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/1b0acfd1-442a-45a2-9a67-e3df3572b6f3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/1b0acfd1-442a-45a2-9a67-e3df3572b6f3%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

_[View the full topic](https://discuss.elastic.co/t/how-to-process-lat-long-fields-using-default-logstash-config-and-mapping-to-use-in-kibana-4-tile-map/23398)._
