# Logstash geo\_point

**URL:** <https://discuss.elastic.co/t/logstash-geo-point/149434>\
**Category:** Logstash\
**Created:** [September 21, 2018, 10:57am UTC](https://discuss.elastic.co/t/logstash-geo-point/149434 "2018-09-21T10:57:50Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![DhavalKansara](https://avatars.discourse-cdn.com/v4/letter/d/3be4f8/32.png) [@DhavalKansara](https://discuss.elastic.co/u/DhavalKansara)\
**Post date:** [September 21, 2018, 10:57am UTC](https://discuss.elastic.co/t/logstash-geo-point/149434/1 "2018-09-21T10:57:51Z")

</div>

Hello,

I want to create a geographical coordinate map. Can you please help me guide through the process of creating the geo\_point or any other way to create coordinate map. I have tried the option from some website. I request you to please help me with step by step process to create geo\_point in elastic search using logstash.

Thank you.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [September 21, 2018, 11:25am UTC](https://discuss.elastic.co/t/logstash-geo-point/149434/2 "2018-09-21T11:25:18Z")

</div>

Have you gone through [this blog post](https://www.elastic.co/blog/geoip-in-the-elastic-stack)?

---

<div class="post-metadata">

**Author:** ![DhavalKansara](https://avatars.discourse-cdn.com/v4/letter/d/3be4f8/32.png) [@DhavalKansara](https://discuss.elastic.co/u/DhavalKansara)\
**Post date:** [September 21, 2018, 11:31am UTC](https://discuss.elastic.co/t/logstash-geo-point/149434/3 "2018-09-21T11:31:56Z")

</div>

Yes i did, but i am not able to understand how to do it ?

I have inserted the csv file before using logstash to elastic search but i am facing problem for geo\_point.

Thank you for reply

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [September 21, 2018, 11:32am UTC](https://discuss.elastic.co/t/logstash-geo-point/149434/4 "2018-09-21T11:32:46Z")

</div>

What does your data look like? What have you done so far?

---

<div class="post-metadata">

**Author:** ![DhavalKansara](https://avatars.discourse-cdn.com/v4/letter/d/3be4f8/32.png) [@DhavalKansara](https://discuss.elastic.co/u/DhavalKansara)\
**Post date:** [September 21, 2018, 11:38am UTC](https://discuss.elastic.co/t/logstash-geo-point/149434/5 "2018-09-21T11:38:43Z")

</div>

![image](https://us1.discourse-cdn.com/elastic/original/3X/a/6/a6498bdedc3453c79ab101e1e96f20a73064987e.jpeg)  
This is how my data is for 8087 records.

![image](https://us1.discourse-cdn.com/elastic/original/3X/0/2/02769df344c6d993d5ef40fd9a622715976cec37.jpeg)  
This is my config file saved at bin folder of logstash

And finally with command prompt added a command "logstash -f configfile.conf"

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/3/03e68a28b3086464c07df2b2f9eaab0e46c13533.jpeg)  
This is how my output is finally

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [September 21, 2018, 11:42am UTC](https://discuss.elastic.co/t/logstash-geo-point/149434/6 "2018-09-21T11:42:24Z")

</div>

Please do not paste images of text when you instead can copy and paste them. They are often very hard to read.

Have you created an [index template](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-templates.html) for your index where you map `geoip.location` as a [geo\_point](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/geo-point.html) type?

---

<div class="post-metadata">

**Author:** ![DhavalKansara](https://avatars.discourse-cdn.com/v4/letter/d/3be4f8/32.png) [@DhavalKansara](https://discuss.elastic.co/u/DhavalKansara)\
**Post date:** [September 21, 2018, 11:46am UTC](https://discuss.elastic.co/t/logstash-geo-point/149434/7 "2018-09-21T11:46:44Z")

</div>

Ok sorry for the images i didn't knew about it.

I dont know how to create index template ?  
I tried doing this... I dont know whether it is correct or not ?  
PUT earthquakes  
{  
"mappings": {  
"\_doc": {  
"properties": {  
"location": {  
"type": "geo\_point"  
}  
}  
}  
}  
}

---

<div class="post-metadata">

**Author:** ![DhavalKansara](https://avatars.discourse-cdn.com/v4/letter/d/3be4f8/32.png) [@DhavalKansara](https://discuss.elastic.co/u/DhavalKansara)\
**Post date:** [September 21, 2018, 12:21pm UTC](https://discuss.elastic.co/t/logstash-geo-point/149434/8 "2018-09-21T12:21:24Z")

</div>

When i check GET earthquakes i get  
{  
"earthquakes": {  
"aliases": {},  
"mappings": {  
"\_doc": {  
"properties": {  
"location": {  
"type": "geo\_point"  
}  
}  
}  
},  
"settings": {  
"index": {  
"creation\_date": "1537524951689",  
"number\_of\_shards": "5",  
"number\_of\_replicas": "1",  
"uuid": "b08DMd7MSYeon8rE-jKM2w",  
"version": {  
"created": "6040099"  
},  
"provided\_name": "earthquakes"  
}  
}  
}  
}

Please help. Thank you.

---

<div class="post-metadata">

**Author:** ![DhavalKansara](https://avatars.discourse-cdn.com/v4/letter/d/3be4f8/32.png) [@DhavalKansara](https://discuss.elastic.co/u/DhavalKansara)\
**Post date:** [September 24, 2018, 6:12am UTC](https://discuss.elastic.co/t/logstash-geo-point/149434/9 "2018-09-24T06:12:20Z")

</div>

Can any one guide me with step by step creating of geopoint and inserting the long lat csv file to the elastic search. Or how to create coordinate map in kibana step by step from start to end.

---

<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 26, 2018, 4:43am UTC](https://discuss.elastic.co/t/logstash-geo-point/149434/10 "2018-09-26T04:43:15Z")

</div>

Your mappings look fine. What does an example document stored in ES look like? Copy/paste from Kibana's JSON tab to get the raw JSON document.

---

<div class="post-metadata">

**Author:** ![DhavalKansara](https://avatars.discourse-cdn.com/v4/letter/d/3be4f8/32.png) [@DhavalKansara](https://discuss.elastic.co/u/DhavalKansara)\
**Post date:** [September 27, 2018, 5:19am UTC](https://discuss.elastic.co/t/logstash-geo-point/149434/11 "2018-09-27T05:19:55Z")

</div>

Can you please elaborate. Do you need the csv data ? I am new for creating the geo\_point so i am finding difficult to understand the point. And i am using windows ELK.

---

<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 27, 2018, 6:13am UTC](https://discuss.elastic.co/t/logstash-geo-point/149434/12 "2018-09-27T06:13:54Z")

</div>

If I see what a document stored in ES looks like I can compare it your mappings to make sure everything is aligned.

---

<div class="post-metadata">

**Author:** ![DhavalKansara](https://avatars.discourse-cdn.com/v4/letter/d/3be4f8/32.png) [@DhavalKansara](https://discuss.elastic.co/u/DhavalKansara)\
**Post date:** [September 27, 2018, 6:19am UTC](https://discuss.elastic.co/t/logstash-geo-point/149434/13 "2018-09-27T06:19:41Z")

</div>

| time | latitude | longitude | depth\_km | magnitude |
| --- | --- | --- | --- | --- |
| 36:32.0 | 42.6983 | 13.2335 | 8.1 | 6 |
| 37:26.6 | 42.7123 | 13.2533 | 9 | 4.5 |
| 40:46.6 | 42.7647 | 13.1723 | 9.7 | 3.8 |
| 41:38.9 | 42.7803 | 13.1683 | 9.7 | 3.9 |
| 42:07.2 | 42.7798 | 13.1575 | 9.7 | 3.6 |
| 43:58.7 | 42.7298 | 13.2137 | 10.7 | 3.4 |
| 44:38.7 | 42.676 | 13.2858 | 10.8 | 2.7 |
| 44:56.4 | 42.6282 | 13.2648 | 10.6 | 3.2 |
| 46:12.2 | 42.7645 | 13.1777 | 6.6 | 3.7 |
| 46:46.0 | 42.7445 | 13.2097 | 12.4 | 2.8 |
| 47:51.5 | 42.6675 | 13.3238 | 6.5 | 3.3 |

This is how the data is in my csv file.

---

<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 27, 2018, 7:23am UTC](https://discuss.elastic.co/t/logstash-geo-point/149434/14 "2018-09-27T07:23:52Z")

</div>

That's not what I asked for. I don't care about the source document. I want to see what a single document stored in ES looks like.

---

<div class="post-metadata">

**Author:** ![DhavalKansara](https://avatars.discourse-cdn.com/v4/letter/d/3be4f8/32.png) [@DhavalKansara](https://discuss.elastic.co/u/DhavalKansara)\
**Post date:** [September 27, 2018, 8:28am UTC](https://discuss.elastic.co/t/logstash-geo-point/149434/15 "2018-09-27T08:28:52Z")

</div>

Sorry but how can i show you document ? i don't know how ?

---

<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 27, 2018, 8:34am UTC](https://discuss.elastic.co/t/logstash-geo-point/149434/16 "2018-09-27T08:34:01Z")

</div>

Locate the document in Kibana's Discover view. Expand the document so all fields can be seen. Switch to the JSON tab. Copy/paste the JSON text.

---

<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:** [October 25, 2018, 8:44am UTC](https://discuss.elastic.co/t/logstash-geo-point/149434/17 "2018-10-25T08:44:03Z")

</div>

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