# Can scripted fields calculated from geo\_shape objects

**URL:** https://discuss.elastic.co/t/can-scripted-fields-calculated-from-geo-shape-objects/42050
**Category:** Elasticsearch
**Created:** [February 17, 2016, 4:20pm UTC](https://discuss.elastic.co/t/can-scripted-fields-calculated-from-geo-shape-objects/42050 "2016-02-17T16:20:53Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![yanbamf](https://avatars.discourse-cdn.com/v4/letter/y/74df32/32.png) [@yanbamf](https://discuss.elastic.co/u/yanbamf)
#### Post date: [February 17, 2016, 4:20pm UTC](https://discuss.elastic.co/t/can-scripted-fields-calculated-from-geo-shape-objects/42050/1 "2016-02-17T16:20:53Z")

</div>

I have been using scripted fields generated from a geo\_point object in a document (using distanceInKmWithDefault).

I wish to move to using geo\_shape rather than geo\_point to support a wider array of data. Is is possible to generate scripted values from geo\_shape objects?

I'm trying to calculate the nearest point in the geo\_shape to a given location.

Many Thanks

---

<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:15pm UTC](https://discuss.elastic.co/t/can-scripted-fields-calculated-from-geo-shape-objects/42050/2 "2017-07-05T23:15:40Z")

</div>


