# Mutate - Geopoint - Copy Field

**URL:** <https://discuss.elastic.co/t/mutate-geopoint-copy-field/308095>\
**Category:** Logstash\
**Created:** [June 24, 2022, 9:37am UTC](https://discuss.elastic.co/t/mutate-geopoint-copy-field/308095 "2022-06-24T09:37:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shubham184](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@shubham184](https://discuss.elastic.co/u/shubham184)\
**Post date:** [June 24, 2022, 9:37am UTC](https://discuss.elastic.co/t/mutate-geopoint-copy-field/308095/1 "2022-06-24T09:37:21Z")

</div>

I need to convert 2 Fields (doc.geoLat and doc.geoLong) to geopoint datatype.  
I tried the following but it dosen't work

Could you please show me where I might be making a mistake

```auto
      if [type] == \"xxxxx\" {

          mutate {
            add_field => {
              \"location\" => [\"%{[lat]}\",\"%{[lon]}\"]
            }
          }
          
          mutate {
            convert => {
              \"location\" => \"float\"
            }
          }
        
  mutate {
    copy => {
      \"[doc][geoLat]\" => \"[location][lat]\"
      \"[doc][geoLong]\" => \"[location][lon]\"
    }
  }

```

Kibana does show me a geopoint field (location) once this executes but no data is being copied ( ialso tried mutate \> rename

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/a/a/aa89f2814ee200f8f3800a53906f6843792a65d7.png)

---

<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 22, 2022, 9:37am UTC](https://discuss.elastic.co/t/mutate-geopoint-copy-field/308095/2 "2022-07-22T09:37:57Z")

</div>

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