# Converting String to Geo Point

**URL:** <https://discuss.elastic.co/t/converting-string-to-geo-point/42422>\
**Category:** Logstash\
**Created:** [February 22, 2016, 6:57pm UTC](https://discuss.elastic.co/t/converting-string-to-geo-point/42422 "2016-02-22T18:57:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wayne\_Taylor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wayne_taylor/32/45984_2.png) [@Wayne\_Taylor](https://discuss.elastic.co/u/Wayne_Taylor)\
**Post date:** [February 22, 2016, 6:57pm UTC](https://discuss.elastic.co/t/converting-string-to-geo-point/42422/1 "2016-02-22T18:57:58Z")

</div>

Hi All,

I was able to get my data imported from JDBC into Elasticsearch and can query using Kibana.  
However, the geo data is being imported as a string. Please could I get some help in converting it.

Below is a snapshot of my config:

filter{  
translate {  
field =\> "destination\_airport\_code"  
dictionary\_path =\> "geocord.yaml"  
fallback =\> "unknown"  
destination=\> "airport"  
}

mutate {

```
add_field => { "[origin_location][location]"=>"%{airport}"}	
}

```

}

My geocord.yaml file looks like:  
"AYGA": "-6.081689,145.391881"  
"AYMD": "-5.207083,145.7887"  
"AYMH": "-5.826789,144.295861"  
"AYNZ": "-6.569828,146.726242"

Thanks in advance

---

<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:** [February 22, 2016, 6:59pm UTC](https://discuss.elastic.co/t/converting-string-to-geo-point/42422/2 "2016-02-22T18:59:52Z")

</div>

Adjust your index template so that the `airport` field is mapped as geo\_point (there's an example in the default template). Also, make sure that the lat/lon string can be parsed as geo\_point on the ES side. The documentation lists the supported formats.

---

<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, 5:10am UTC](https://discuss.elastic.co/t/converting-string-to-geo-point/42422/3 "2017-07-06T05:10:17Z")

</div>


