# Generating geo\_point based on a couple float

**URL:** <https://discuss.elastic.co/t/generating-geo-point-based-on-a-couple-float/210045>\
**Category:** Logstash\
**Created:** [December 1, 2019, 4:27am UTC](https://discuss.elastic.co/t/generating-geo-point-based-on-a-couple-float/210045 "2019-12-01T04:27:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Claudio\_Grasso](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/claudio_grasso/32/58578_2.png) [@Claudio\_Grasso](https://discuss.elastic.co/u/Claudio_Grasso)\
**Post date:** [December 1, 2019, 4:27am UTC](https://discuss.elastic.co/t/generating-geo-point-based-on-a-couple-float/210045/1 "2019-12-01T04:27:17Z")

</div>

Hi guys,

I need to import a MySQL table into ES where the table has one longitud and one longitud rows. It is pretty much the same use case as the one described in:

> [@Geo\_point and geohash in logstash](https://discuss.elastic.co/t/geo-point-and-geohash-in-logstash/202880):
>
> Hi, I am trying to use coordinate maps in kibana for my visualization. I mutate my longitude and latitude fields with rename and convert to float, but when i tried in Kibana, it showing no compactible field geo\_point. Logstash: input { file { path =\> "G:/Transit/\*.csv" start\_position =\> "beginning" sincedb\_path =\> "F:\ELKstack\logstash\data\plugins\inputs\file\transit.txt" } } filter { csv { separator =\> "," columns =\> ["Unit#","Unit Name","Add1","City","Pr","Pcode","Country","Te…

so I followed the same steps and I obtained a field:

```
  "Location": {
    "properties": {
      "lat": {
        "type": "float"
      },
      "lon": {
        "type": "float"
      }
    }
  },

```

So far so good. Now I'm trying to convert that structure into a geo\_point. According to the mentioned post, the solution is to include in the index template:

"mappings": {  
"properties": {  
"location": {  
"type": "geo\_point"  
}  
}  
}

Well, I'm driving nuts to try to do it, without success. If I import data and then try to apply the mapping in the console I get an error resource\_already\_exists\_exception and if I define the mapping in the console and then do the import I also get an error (Rejecting mapping update to [gooddriver\_positions] as the final mapping would have more than 1 type: [\_doc, positions]"}}}}).gooddriver\_positions being my table.

I guess I should tell ES that the mapping is meant to be applied just to that field and to use the defaults for the others but I do not find the way to do it.  
Can somebody give me a hand and tell me the steps I should follow?

Thanks in anticipation,

```
Claudio

```

---

<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:** [December 29, 2019, 4:27am UTC](https://discuss.elastic.co/t/generating-geo-point-based-on-a-couple-float/210045/2 "2019-12-29T04:27:18Z")

</div>

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