# Remove Latitude and Longitude from a cell in a CSV for geo\_point visualization

**URL:** https://discuss.elastic.co/t/remove-latitude-and-longitude-from-a-cell-in-a-csv-for-geo-point-visualization/174838
**Category:** Logstash
**Created:** [April 1, 2019, 6:25pm UTC](https://discuss.elastic.co/t/remove-latitude-and-longitude-from-a-cell-in-a-csv-for-geo-point-visualization/174838 "2019-04-01T18:25:21Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [April 4, 2019, 4:40pm UTC](https://discuss.elastic.co/t/remove-latitude-and-longitude-from-a-cell-in-a-csv-for-geo-point-visualization/174838/8 "2019-04-04T16:40:27Z")

</div>

Finally we are on the same page 😃 OK, so that grok still works

```
    csv { autodetect_column_names => true }
    grok { match => { "Location" => "\(%{NUMBER:[location][lat]:float}, %{NUMBER:[location][lon]:float}\)" } }

```

will get you

```
                              "Location" => "1051 DIX AVENUE\r HUDSONFALLS, NY 12839\r (43.319290299000045, -73.59206215299997)",
                              "location" => {
    "lat" => 43.319290299000045,
    "lon" => -73.59206215299997
},

```

If there is no lat/lon inside parentheses in the Location field you get a \_grokparsefailure instead.

Your next problem is to update the template for your index to tell it that the location field is a geo\_point. There are two example of how you could do that in previous releases (dynamic and non-dynamic) in [this](https://discuss.elastic.co/t/location-dosent-convert-to-geo-point/131199/2?u=badger) thread. However templates are changing. If those example do not work then ask a new question in the elasticsearch forum about how to configure a template that makes location a geo\_point.

---

_[View the full topic](https://discuss.elastic.co/t/remove-latitude-and-longitude-from-a-cell-in-a-csv-for-geo-point-visualization/174838)._
