# Geo location long, lat values wrong

**URL:** <https://discuss.elastic.co/t/geo-location-long-lat-values-wrong/92959>\
**Category:** Logstash\
**Created:** [July 13, 2017, 8:14am UTC](https://discuss.elastic.co/t/geo-location-long-lat-values-wrong/92959 "2017-07-13T08:14:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Patrik\_Soderstrom](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/patrik_soderstrom/32/53928_2.png) [@Patrik\_Soderstrom](https://discuss.elastic.co/u/Patrik_Soderstrom)\
**Post date:** [July 13, 2017, 8:14am UTC](https://discuss.elastic.co/t/geo-location-long-lat-values-wrong/92959/1 "2017-07-13T08:14:42Z")

</div>

Hi again,

this time I have trouble with values for longitue and latitude. In Logstash I have this filter,

```
mutate {
		add_field => {
		"[geo][location]" => "%{[IN][LocationLongitude]}, %{[IN][LocationLatitude]}"
		}

```

}

The original value in %{[IN][LocationLongitude]} are 11.98 and original value in %{[IN][LocationLatitude]} are 57.677  
But when I have run the add\_field the values are 11.9804131, 57.6774103

How do I do to keep the original values after I have merged them in to a new field? Its important that the data is exactly as the original value.

---

<div class="post-metadata">

**Author:** ![tatdat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tatdat/32/113160_2.png) [@tatdat](https://discuss.elastic.co/u/tatdat)\
**Post date:** [July 13, 2017, 8:38am UTC](https://discuss.elastic.co/t/geo-location-long-lat-values-wrong/92959/2 "2017-07-13T08:38:14Z")

</div>

Why do you dont use geoip filter?

---

<div class="post-metadata">

**Author:** ![Patrik\_Soderstrom](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/patrik_soderstrom/32/53928_2.png) [@Patrik\_Soderstrom](https://discuss.elastic.co/u/Patrik_Soderstrom)\
**Post date:** [July 13, 2017, 8:48am UTC](https://discuss.elastic.co/t/geo-location-long-lat-values-wrong/92959/3 "2017-07-13T08:48:09Z")

</div>

Because the values do not come from IP-address. Value come from a system that has already got longitude and latitude values from an street address.

---

<div class="post-metadata">

**Author:** ![tatdat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tatdat/32/113160_2.png) [@tatdat](https://discuss.elastic.co/u/tatdat)\
**Post date:** [July 13, 2017, 8:56am UTC](https://discuss.elastic.co/t/geo-location-long-lat-values-wrong/92959/4 "2017-07-13T08:56:24Z")

</div>

make sure [geo][location] is `geopoint` type  
and try to convert it to float

```
mutate {
      add_field => ["[geoip][location]", "%{[IN][LocationLongitude]}" ]
      add_field => ["[geoip][location]", "%{[IN][LocationLatitude]}" ]
      convert => ["[geo][location]", "float"]
}

```

Sorry, i can't test help you.

---

<div class="post-metadata">

**Author:** ![Patrik\_Soderstrom](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/patrik_soderstrom/32/53928_2.png) [@Patrik\_Soderstrom](https://discuss.elastic.co/u/Patrik_Soderstrom)\
**Post date:** [July 13, 2017, 12:05pm UTC](https://discuss.elastic.co/t/geo-location-long-lat-values-wrong/92959/5 "2017-07-13T12:05:22Z")

</div>

This is solve. After some research it did not matter. Thanks for help.

---

<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:** [August 10, 2017, 12:05pm UTC](https://discuss.elastic.co/t/geo-location-long-lat-values-wrong/92959/6 "2017-08-10T12:05:27Z")

</div>

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