# Latitude and Longitude Field conversion to Geo Point

**URL:** <https://discuss.elastic.co/t/latitude-and-longitude-field-conversion-to-geo-point/72365>\
**Category:** Kibana\
**Created:** [January 21, 2017, 11:56am UTC](https://discuss.elastic.co/t/latitude-and-longitude-field-conversion-to-geo-point/72365 "2017-01-21T11:56:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Praveen\_Kumar\_Maurya](https://avatars.discourse-cdn.com/v4/letter/p/c0e974/32.png) [@Praveen\_Kumar\_Maurya](https://discuss.elastic.co/u/Praveen_Kumar_Maurya)\
**Post date:** [January 21, 2017, 11:56am UTC](https://discuss.elastic.co/t/latitude-and-longitude-field-conversion-to-geo-point/72365/1 "2017-01-21T11:56:49Z")

</div>

Hi ,

I have uploaded my data file using logstash. Logstash successfully uploaded the following data like PoS, Cityname, Lattitude and Longitude. Now my problem is how to create index so that I can visualise them on Geo Map. My data is of 2Gb and it is daily updating.

LogStash's config file:

> input {  
> file {  
> path =\> "F:/POS.txt"  
> start\_position =\> "beginning"  
> sincedb\_path =\> "/dev/null"  
> type =\> "pos"  
> }  
> }  
> filter {  
> csv {  
> separator =\> "|"  
> #"Name","POS","CityName", "Latitude","Longitude", "Date"  
> columns =\> ["Name","POS","CityName", "Latitude","Longitude", "Date"]  
> }  
> }  
> output {  
> elasticsearch {  
> action =\> "index"  
> hosts =\> "[http://localhost:9200](http://localhost:9200)"  
> index =\> "pos"  
> }  
> stdout {}  
> }

and I have to visualise it on Kibana's **Geo Map**. Please help me in this regard.

---

<div class="post-metadata">

**Author:** ![tylersmalley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tylersmalley/32/8833_2.png) [@tylersmalley](https://discuss.elastic.co/u/tylersmalley)\
**Post date:** [January 23, 2017, 10:27pm UTC](https://discuss.elastic.co/t/latitude-and-longitude-field-conversion-to-geo-point/72365/2 "2017-01-23T22:27:28Z")

</div>

Hi Praveen,

The datatype needs to be of geotype, you can read more about it [here](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/geo-point.html).

Here is an example:

```auto
PUT discuss_72365
{
  "mappings": {
    "locations": {
      "properties": {
        "location": {
          "type": "geo_point"
        }
      }
    }
  }
}

PUT discuss_72365/locations/1
{
  "location": [-71.34, 41.12] 
}

```

After this, I can then add my index pattern to Kibana and create a timemap visualization on the location field.

Can you check the mapping and let me know what it is?

`GET /pos/_mapping`

It also appears there is a geoIP filter for Logstash: [https://www.elastic.co/guide/en/logstash/current/plugins-filters-geoip.html](https://www.elastic.co/guide/en/logstash/current/plugins-filters-geoip.html)

---

<div class="post-metadata">

**Author:** ![Praveen\_Kumar\_Maurya](https://avatars.discourse-cdn.com/v4/letter/p/c0e974/32.png) [@Praveen\_Kumar\_Maurya](https://discuss.elastic.co/u/Praveen_Kumar_Maurya)\
**Post date:** [January 25, 2017, 6:35pm UTC](https://discuss.elastic.co/t/latitude-and-longitude-field-conversion-to-geo-point/72365/3 "2017-01-25T18:35:15Z")

</div>

Thanks @tsmalley but i am able to resolve the issue with the following link:

> <https://stackoverflow.com/questions/38002897/creating-a-geopoint-object-from-csv-latitude-and-longitude-columns-in-logstash>

It was my mistake and rectify according to the answer given there. It works like a charm.

---

<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:** [February 22, 2017, 6:35pm UTC](https://discuss.elastic.co/t/latitude-and-longitude-field-conversion-to-geo-point/72365/4 "2017-02-22T18:35:46Z")

</div>

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