# Errors with geo\_point

**URL:** https://discuss.elastic.co/t/errors-with-geo-point/60904
**Category:** Logstash
**Created:** [September 19, 2016, 2:25pm UTC](https://discuss.elastic.co/t/errors-with-geo-point/60904 "2016-09-19T14:25:31Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![ThomasBorno](https://avatars.discourse-cdn.com/v4/letter/t/7cd45c/32.png) [@ThomasBorno](https://discuss.elastic.co/u/ThomasBorno)
#### Post date: [September 19, 2016, 2:25pm UTC](https://discuss.elastic.co/t/errors-with-geo-point/60904/1 "2016-09-19T14:25:31Z")

</div>

Hey,

I'm new to this platform. Been using ELK since last week. I'm encountering several problems concerning geo localisations.

I have a CSV which is made out of the following

`Name,Adress,Latitude,Longitude`

I have created an index (Test) with the following mapping

```
{
  "Test" : {
    "mappings" : {
      "partial_beacons" : {
        "properties" : {
          "latitude" : {
            "type" : "float"
          },
          "location" : {
            "type" : "geo_point"
          },
          "longitude" : {
            "type" : "float"
          }
        }
      }
    }
  }
}

```

My .conf looks like the following

```
input {
      file {
          path => "/.../*.csv"
          type => "partial_beacons"
          start_position => "beginning"
      }
}
filter {
    csv {
        columns => ["Name", "Adress", "latitude", "longitude"]
        separator => ","
    }
    mutate {
        add_field => ["location","%{latitude}"]
        add_field => ["location","%{longitude}"]
        convert => {"location" => "float"}
       }
}

output {
    elasticsearch {
        action => "index"
        hosts => "localhost"
        index => "Test"
        workers => 1
    }
 stdout {
     codec => rubydebug
     }
}

```

I have tried every solution possible on this forum. What am I doing wrong? (without the mapping the document succeeds in importing but with lat,lon as strings....

I would like to have both columns (Longitude & Latitude) together as to point it out on the map.

ES, Kibana and Logstash have been downloaded last week so we are running latest stable.

Cheers!

Thomas

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [September 19, 2016, 7:35pm UTC](https://discuss.elastic.co/t/errors-with-geo-point/60904/2 "2016-09-19T19:35:58Z")

</div>

IIRC Elasticsearch requires index names to be lowercase so I'm a bit surprised you're getting anything at all with your Test index.

Anyway, what do your documents look like in ES? Alternatively, what does your stdout output think they look like?

---

<div class="post-metadata">

### Author: ![ThomasBorno](https://avatars.discourse-cdn.com/v4/letter/t/7cd45c/32.png) [@ThomasBorno](https://discuss.elastic.co/u/ThomasBorno)
#### Post date: [September 20, 2016, 7:00am UTC](https://discuss.elastic.co/t/errors-with-geo-point/60904/3 "2016-09-20T07:00:37Z")

</div>

Hi Magnus,

You're right, I actually made a typo and my index is "test" (all lowercase).

With this method, my stdout outputs nothing. And nothing is imported into ES.

I have tried with following filter block :

```
filter {
    csv {
        columns => ["name", "adress", "latitude", "longitude"]
        separator => ","
    }
mutate {
    convert => {"latitude" => "float"}
    convert => {"longitude" => "float"}
    rename => {
            "longitude" => "[location][lon]"
            "latitude" => "[location][lat]"
    }
}
}

```

stdout outputs the following

```
{
       "message" => "name,adres,50.696324,4.0367",
      "@version" => "1",
    "@timestamp" => "2016-09-20T06:55:59.646Z",
          "host" => "ubuntu",
          "name" => "JohnSmith",
         "adress" => "Unknown",
      "location" => {
        "lon" => "4.0367",
        "lat" => "50.696324"
    }
}

```

but with the following error

```
"error"=>{"type"=>"illegal_argument_exception", "reason"=>"[location] is defined as an object in mapping [logs] but this name is already used for a field in other types"}}}, :level=>:warn}

```

Yet again, no imports in ES.

Thanks

---

<div class="post-metadata">

### Author: ![ThomasBorno](https://avatars.discourse-cdn.com/v4/letter/t/7cd45c/32.png) [@ThomasBorno](https://discuss.elastic.co/u/ThomasBorno)
#### Post date: [September 20, 2016, 7:44am UTC](https://discuss.elastic.co/t/errors-with-geo-point/60904/4 "2016-09-20T07:44:32Z")

</div>

Hi,

Further testing made me use the following

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

```

This seems to do the trick. Yet the maps don't zoom quite deep....so result is poorly shown on Kibana's Tile Map. I've heard you can zoom more with the options in kibana.yml. But can't find the option....

Magnus thank you for your help and time!

Cheers

Thomas

---

<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:37am UTC](https://discuss.elastic.co/t/errors-with-geo-point/60904/5 "2017-07-06T04:37:51Z")

</div>


