Find closest GeoJSON polygon to point when point lies outside of all polygons in Elasticsearch

邮差的信 提交于 2021-02-08 09:28:14

问题


Using Elasticsearch, say I have documents of GeoJSON polygons. I'm using the percolator (ala How to know if a geo coordinate lies within a geo polygon in elasticsearch?) to find if a point lies within a polygon. That works great!

Is there any way in Elasticsearch to determine

  1. If a point lies outside of all polygons
  2. What the closest polygon that to that point?
  3. Return that polygon

来源:https://stackoverflow.com/questions/41558123/find-closest-geojson-polygon-to-point-when-point-lies-outside-of-all-polygons-in

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!