# GEOPOINT not recognized

**URL:** <https://discuss.elastic.co/t/geopoint-not-recognized/146377>\
**Category:** Logstash\
**Created:** [August 28, 2018, 2:41pm UTC](https://discuss.elastic.co/t/geopoint-not-recognized/146377 "2018-08-28T14:41:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alberto\_Sironi](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@Alberto\_Sironi](https://discuss.elastic.co/u/Alberto_Sironi)\
**Post date:** [August 28, 2018, 2:41pm UTC](https://discuss.elastic.co/t/geopoint-not-recognized/146377/1 "2018-08-28T14:41:06Z")

</div>

Hi guys, i'm using logstash 6.2.4 and i have some problem to upload my longitude and latitude point in kibana.  
I red a lot regarding this issue, but i still have some doubt.

my logstash config file looks like:  
input {  
file {  
path =\> "......."  
start\_position =\> "beginning"  
sincedb\_path =\> "/dev/null"  
}  
}

filter {

```
csv {
	separator => ";"
	columns => ["cod_ibge_infeccao_7","cod_ibge_residencia","ano","mes","sexo","raca","resexame","faixa_etaria","sintomas","zona","gestante","oport_diag","oport_trat","sistema_not","sum","nome_municipio","UF","Estado","Latitude","Longitude"]

}
mutate {convert => ["cod_ibge_infeccao_7", "integer"] }
mutate {convert => ["cod_ibge_residencia", "integer"] }
mutate {convert => ["ano", "integer"] }
mutate {convert => ["mes", "integer"] }
mutate {convert => ["sexo", "string"] }
mutate {convert => ["raca", "string"] }
mutate {convert => ["resexame", "string"] }
mutate {convert => ["faixa_etaria", "string"] }
mutate {convert => ["sintomas", "string"] }
mutate {convert => ["zona", "integer"] }
mutate {convert => ["oport_diag", "string"] }
mutate {convert => ["sistema_not", "string"] }
mutate {convert => ["sum", "integer"] }
mutate {convert => ["nome_municipio", "string"] }
mutate {convert => ["UF", "string"] }
mutate {convert => ["Estado", "string"] }
mutate {convert => ["Latitude", "float"] }
mutate {convert => ["Longitude", "float"] }
mutate { rename => {"Latitude" => "[location][lat]"} }
	mutate { rename => {"Longitude" => "[location][lon]"} }
mutate { remove_field => ["host"] }

```

}

output {  
elasticsearch {  
template =\> "....../elasticsearch-template.json"  
template\_name =\> "logstash-\*"  
hosts =\> "localhost"  
index =\> "base\_geo\_prova"  
document\_type =\> "m\_geo"  
user =\> "elastic"  
password =\> "changeme"  
sniffing =\> true  
manage\_template =\> true  
}  
stdout { codec =\> "rubydebug" }

my template file looks like this one:

{  
"template" : "logstash-_",  
"settings" : {  
"index.refresh\_interval" : "5s"  
},  
"mappings" : {  
"default" : {  
"\_all" : {"enabled" : true, "omit\_norms" : true},  
"dynamic\_templates" : [ {  
"message\_field" : {  
"match" : "message",  
"match\_mapping\_type" : "string",  
"mapping" : {  
"type" : "string", "index" : "analyzed", "omit\_norms" : true,  
"fielddata" : { "format" : "disabled" }  
}  
}  
}, {  
"string\_fields" : {  
"match" : "_",  
"match\_mapping\_type" : "string",  
"mapping" : {  
"type" : "string", "index" : "analyzed", "omit\_norms" : true,  
"fielddata" : { "format" : "disabled" },  
"fields" : {  
"raw" : {"type": "string", "index" : "not\_analyzed", "ignore\_above" : 256}  
}  
}  
}  
} ],  
"properties" : {  
"@timestamp": { "type": "date" },  
"@version": { "type": "string", "index": "not\_analyzed" },  
"geoip" : {  
"dynamic": true,  
"properties" : {  
"ip": { "type": "ip" },  
"location" : { "type" : "geo\_point" },  
"latitude" : { "type" : "float" },  
"longitude" : { "type" : "float" }  
}  
},  
"location" : { "type": "geo\_point" }  
}  
}  
}  
}

When i'm trying to push my data into kibana not recognize them like geopoint.  
So after reading some post i tryied in DevTools after importing my data to mapping before my points.:

PUT base\_geo\_prova  
{  
"mappings": {  
"\_doc": {  
"properties": {  
"location": {  
"type": "geo\_point"  
}  
}  
}  
}  
}

But when i'm trying after that to import my csv tell me that index is already exist and cannot import any data.  
Can you help me regarding this issue?

Thanks a lot

Alberto

---

<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:** [August 28, 2018, 6:42pm UTC](https://discuss.elastic.co/t/geopoint-not-recognized/146377/2 "2018-08-28T18:42:51Z")

</div>

Your template applies to indexes whose name match logstash-\* but your index is named base\_geo\_prova so the template doesn't apply.

---

<div class="post-metadata">

**Author:** ![Alberto\_Sironi](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@Alberto\_Sironi](https://discuss.elastic.co/u/Alberto_Sironi)\
**Post date:** [August 28, 2018, 10:40pm UTC](https://discuss.elastic.co/t/geopoint-not-recognized/146377/3 "2018-08-28T22:40:36Z")

</div>

Thanks a lot, now i don't have anymore message error or stuff but still dosn't convert.  
1- step in kibana run in devtools:  
PUT \_template/base\_geo\_prova  
{  
"template": "stations",  
"settings": {  
"number\_of\_replicas": 1,  
"number\_of\_shards": 2  
},  
"mappings": {  
"my\_type": {  
"dynamic": "true",  
"properties": {  
"geoip": {  
"dynamic": true,  
"properties": {  
"location": {  
"type": "geo\_point"  
}  
}  
}  
}  
}  
}  
}

second step after changing in my template base\_geo\_prova i willi ngest my data in kibana.

It takes the datas but without trasforming in geo.point.  
my corrections in the output was:  
template\_name =\> "base\_geo\_prova"

and in the template of course: "template" : "base\_geo\_prova",

but still ingest the datas normally  
Any suggestions?

---

<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:** [August 29, 2018, 9:23am UTC](https://discuss.elastic.co/t/geopoint-not-recognized/146377/4 "2018-08-29T09:23:49Z")

</div>

Your template should look like this:

```nohighlight
{
  "template": "name-of-your-index",
  ...
}

```

and your elasticsearch output should look like this:

```nohighlight
elasticsearch {
  index => "name-of-your-index"
  ...
}

```

Is that what your configurations look like? I can't tell from what you write above.

---

<div class="post-metadata">

**Author:** ![Alberto\_Sironi](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@Alberto\_Sironi](https://discuss.elastic.co/u/Alberto_Sironi)\
**Post date:** [August 29, 2018, 12:20pm UTC](https://discuss.elastic.co/t/geopoint-not-recognized/146377/5 "2018-08-29T12:20:58Z")

</div>

Thanks a lot. Now it works fine. We can closed this post.  
Best Regards

---

<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:** [September 26, 2018, 12:21pm UTC](https://discuss.elastic.co/t/geopoint-not-recognized/146377/6 "2018-09-26T12:21:07Z")

</div>

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