# Geopoint using Latitude and Longitude using Logstash

**URL:** https://discuss.elastic.co/t/geopoint-using-latitude-and-longitude-using-logstash/43857
**Category:** Logstash
**Created:** [March 9, 2016, 5:54am UTC](https://discuss.elastic.co/t/geopoint-using-latitude-and-longitude-using-logstash/43857 "2016-03-09T05:54:01Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Meenal.Luktuke](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/meenal.luktuke/32/7795_2.png) [@Meenal.Luktuke](https://discuss.elastic.co/u/Meenal.Luktuke)
#### Post date: [March 9, 2016, 5:54am UTC](https://discuss.elastic.co/t/geopoint-using-latitude-and-longitude-using-logstash/43857/1 "2016-03-09T05:54:02Z")

</div>

Hi,

I am trying to plot data on Tile Map using geo-point coordinates from ES. Logstash data will have Latitude and Longitude. I also followed [http://david.pilato.fr/blog/2015/04/28/exploring-capitaine-train-dataset/](http://david.pilato.fr/blog/2015/04/28/exploring-capitaine-train-dataset/) but still my map doesn't show any results. Below is my sample data, Logstash config and ES mapping files.

Versions:

Logstash 2.2  
ES 2.2  
Kibana 4.3

Sample Data:  
Kadoma;-18.3300064;9.90994665;Zimbabwe  
Chitungwiza;-18.0000007;1.10000321;Zimbabwe  
Harare;-17.8177896;1.04470943;Zimbabwe  
Bulawayo;-20.1699975;8.58000199;Zimbabwe

Logstash conf:  
input {  
file {  
path =\> "/home/ubuntu/Logstash\_input/country.csv"  
type =\> "countryDB"  
start\_position =\> "beginning"  
}  
}

filter {

csv {  
columns =\> [city,latitude,longitude,country]  
separator =\> ";"  
}

if [city] == "city" {  
drop { }  
} else {

```
  mutate {
      convert => { "longitude" => "float" }
      convert => { "latitude" => "float" }
  }

  mutate {
      rename => {
          "longitude" => "[location][lon]"
          "latitude" => "[location][lat]"
      }
  }

```

}  
}

output {

```
    elasticsearch { hosts => ["localhost:9200"]
    index => "countrydb"

```

}  
stdout { codec =\> rubydebug }  
}

ES Mapping:

POST /countrydb  
{  
"settings" : {  
"number\_of\_shards" : 1  
},

```
        "properties" : {
         
      "location": {
      "type": "geo_point"
    }
  }
}

```

Kibana Discover showing Lat/Lon:

 ![](https://us1.discourse-cdn.com/elastic/original/2X/c/c95bebcd3d798623f9a5d19d98a9bd5fcf0dafe8.PNG)

Tile Map showing no results:

 ![](https://us1.discourse-cdn.com/elastic/original/2X/0/0083bd2526f43fab9aa2bd5959d742844bd4ada2.PNG)

Thanks,  
Meenal

---

<div class="post-metadata">

### Author: ![Meenal.Luktuke](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/meenal.luktuke/32/7795_2.png) [@Meenal.Luktuke](https://discuss.elastic.co/u/Meenal.Luktuke)
#### Post date: [March 9, 2016, 11:11am UTC](https://discuss.elastic.co/t/geopoint-using-latitude-and-longitude-using-logstash/43857/2 "2016-03-09T11:11:01Z")

</div>

Resolved it myself. Very silly problem in ES mapping. I had missed the "type". Made changes as below and it is now visible on maps:

POST /countrydb  
{

```
"settings" : {
    "number_of_shards" : 1
},
"mappings" : {
    "countryDB": {
        
        "properties" : {
         
	"location" : { "type": "geo_point"},
	"city":{"type":"string"},
	"country":{"type":"string"}
	}
    }
}

```

}

---

<div class="post-metadata">

### Author: ![Thangaraj\_Muruganant](https://avatars.discourse-cdn.com/v4/letter/t/74df32/32.png) [@Thangaraj\_Muruganant](https://discuss.elastic.co/u/Thangaraj_Muruganant)
#### Post date: [March 15, 2017, 7:05am UTC](https://discuss.elastic.co/t/geopoint-using-latitude-and-longitude-using-logstash/43857/3 "2017-03-15T07:05:33Z")

</div>

Error in elastic search -  
**No handler found for uri [/countrydb] and method [POST]**

---

<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, 4:27am UTC](https://discuss.elastic.co/t/geopoint-using-latitude-and-longitude-using-logstash/43857/4 "2017-07-06T04:27:51Z")

</div>


