# Convert string field to geo\_point field for map visualisation

**URL:** <https://discuss.elastic.co/t/convert-string-field-to-geo-point-field-for-map-visualisation/324397>\
**Category:** Elasticsearch\
**Created:** [February 1, 2023, 8:37am UTC](https://discuss.elastic.co/t/convert-string-field-to-geo-point-field-for-map-visualisation/324397 "2023-02-01T08:37:03Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![jsanz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsanz/32/53734_2.png) [@jsanz](https://discuss.elastic.co/u/jsanz)\
**Post date:** [February 6, 2023, 2:42pm UTC](https://discuss.elastic.co/t/convert-string-field-to-geo-point-field-for-map-visualisation/324397/5 "2023-02-06T14:42:59Z")

</div>

Additionally, you can just add your new field and if you ever need geospatial support for your old data you can just generate that field on the fly using a [Runtime Field](https://www.elastic.co/guide/en/elasticsearch/reference/current/runtime.html). Check this other interesting thread on this topic.

> [@How to a emit a value for a runtime field of type geo\_point?](https://discuss.elastic.co/t/how-to-a-emit-a-value-for-a-runtime-field-of-type-geo-point/271889/4):
>
> Sorry. I wasn't involved with the docs for this one. Looks like it is lat, lon. [https://github.com/elastic/elasticsearch/blob/50152589cab00fbb984f9f40d68173addee5970f/server/src/main/java/org/elasticsearch/script/GeoPointFieldScript.java#L59](https://github.com/elastic/elasticsearch/blob/50152589cab00fbb984f9f40d68173addee5970f/server/src/main/java/org/elasticsearch/script/GeoPointFieldScript.java#L59)

Runtime fields are always going to be **slower** that stored data, but they are useful for changing mappings and ad-hoc analysis.

---

_[View the full topic](https://discuss.elastic.co/t/convert-string-field-to-geo-point-field-for-map-visualisation/324397)._
