# Geo location from a single field

**URL:** <https://discuss.elastic.co/t/geo-location-from-a-single-field/46442>\
**Category:** Elasticsearch\
**Created:** [April 5, 2016, 6:49pm UTC](https://discuss.elastic.co/t/geo-location-from-a-single-field/46442 "2016-04-05T18:49:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mc1392](https://avatars.discourse-cdn.com/v4/letter/m/57b2e6/32.png) [@mc1392](https://discuss.elastic.co/u/mc1392)\
**Post date:** [April 5, 2016, 6:49pm UTC](https://discuss.elastic.co/t/geo-location-from-a-single-field/46442/1 "2016-04-05T18:49:17Z")

</div>

I am trying to load the geo location data, using a single field.  
How can I dis using a single location field with comma separated lat, lon.

example  
**location**  
-40.345, 23.993  
-45.345, 23.945  
-20.345, 23.993

Here is the mapping I used:

> curl -XPOST [http://localhost:9200/ats\_member\_locations](http://localhost:9200/ats_member_locations) -d '{"mappings":{"ats\_locations":{"properties":{"latitude":{"type":"geo\_point"}, "longitude":{"type":"geo\_point"}}}}}'

Here is my config:

```
input{
        file{
                path => "/home/ubuntu/torched_products_addresses_work.csv"
                type => "ats_locations"
                start_position => "beginning"
                sincedb_path =>"/dev/null/"
        }
}

filter{
        csv{
                columns =>["location"]
                separator=>","
        }

mutate {
rename => ["location", "[location][lat],[location][lon]" ]

```

}

```
}

output{

 elasticsearch {
                index=>"ats_member_locations"
                hosts => ["localhost:9200"]
        }

stdout { codec => rubydebug }

}

```

---

<div class="post-metadata">

**Author:** ![mc1392](https://avatars.discourse-cdn.com/v4/letter/m/57b2e6/32.png) [@mc1392](https://discuss.elastic.co/u/mc1392)\
**Post date:** [April 5, 2016, 6:57pm UTC](https://discuss.elastic.co/t/geo-location-from-a-single-field/46442/2 "2016-04-05T18:57:46Z")

</div>

I just realized I am attempting two fields in the mapping.  
be right back!

---

<div class="post-metadata">

**Author:** ![mc1392](https://avatars.discourse-cdn.com/v4/letter/m/57b2e6/32.png) [@mc1392](https://discuss.elastic.co/u/mc1392)\
**Post date:** [April 5, 2016, 7:00pm UTC](https://discuss.elastic.co/t/geo-location-from-a-single-field/46442/3 "2016-04-05T19:00:45Z")

</div>

I have points on the map by using this mapping:

> curl -XPOST [http://localhost:9200/ats\_member\_locations](http://localhost:9200/ats_member_locations) -d '{"mappings":{"ats\_locations":{"properties":{"location":{"type":"geo\_point"}}}}}'

---

<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 5, 2017, 11:01pm UTC](https://discuss.elastic.co/t/geo-location-from-a-single-field/46442/5 "2017-07-05T23:01:47Z")

</div>


