# Distance for GeoPolygon

**URL:** <https://discuss.elastic.co/t/distance-for-geopolygon/140936>\
**Category:** Elasticsearch\
**Created:** [July 20, 2018, 3:34pm UTC](https://discuss.elastic.co/t/distance-for-geopolygon/140936 "2018-07-20T15:34:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dean\_Clarke](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dean_clarke/32/33588_2.png) [@Dean\_Clarke](https://discuss.elastic.co/u/Dean_Clarke)\
**Post date:** [July 20, 2018, 3:34pm UTC](https://discuss.elastic.co/t/distance-for-geopolygon/140936/1 "2018-07-20T15:34:45Z")

</div>

I'm trying to get the distance between a geopoint (my coordinate) and GeoPolygon indexed property (serviceAreas). Are there any scripting method that does this? In the instance of GeoPoint, I'm aware I can use a Scripted Field by doing `GeoPoint.arcDistance(lat, lon)` however, I'm not sure if this is possible for GeoPolygon. I"m using ElasticSearch 6.3.

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:** [August 17, 2018, 3:34pm UTC](https://discuss.elastic.co/t/distance-for-geopolygon/140936/2 "2018-08-17T15:34:49Z")

</div>

Closed on August 17, 2018, 3:34pm UTC

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