# "copy\_to" into an array/acceptable geo\_point format

**URL:** https://discuss.elastic.co/t/copy-to-into-an-array-acceptable-geo-point-format/57868
**Category:** Elasticsearch
**Created:** [August 11, 2016, 11:45pm UTC](https://discuss.elastic.co/t/copy-to-into-an-array-acceptable-geo-point-format/57868 "2016-08-11T23:45:02Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![pku](https://avatars.discourse-cdn.com/v4/letter/p/82dd89/32.png) [@pku](https://discuss.elastic.co/u/pku)
#### Post date: [August 11, 2016, 11:45pm UTC](https://discuss.elastic.co/t/copy-to-into-an-array-acceptable-geo-point-format/57868/1 "2016-08-11T23:45:02Z")

</div>

I have two individual fields namely,

{latitute: 29.47  
type: long}  
{longitude: -98.53  
type : long}

I want to create a single geo-point field named "location" out of the two above mentioned fields.  
I tried using "copy\_to" command but it doesn't give me the data that is in the acceptable "lat/lng" format for the geo\_point.  
How should I combine the two fields in order to get an acceptable geo\_point format?

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [August 12, 2016, 4:39am UTC](https://discuss.elastic.co/t/copy-to-into-an-array-acceptable-geo-point-format/57868/2 "2016-08-12T04:39:33Z")

</div>

Ideally, do it during index time. You can use something like Logstash.

---

<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, 10:28pm UTC](https://discuss.elastic.co/t/copy-to-into-an-array-acceptable-geo-point-format/57868/3 "2017-07-05T22:28:10Z")

</div>


