Using a spatial database to find polygons that contain a point

妖精的绣舞 提交于 2019-12-11 13:54:22

问题


I'm using MongoDB to store spatial records. Some records are polygons, and others are points. Data is being continually inserted.

I need to be able to access all records whose polygon contains a point. Mongo's spatial queries allow finding all points within a polygon, but not all polygons that contain a point. Is there a good way to do this in MongoDB another database system?


回答1:


Unfortunately, there is no way to run this query at present -- unless you're willing to simplify the application (i.e., assume all polygons are circles of a particular radius [or small set of radii]).

There's an open ticket for the functionality you described: https://jira.mongodb.org/browse/SERVER-2874



来源:https://stackoverflow.com/questions/10535863/using-a-spatial-database-to-find-polygons-that-contain-a-point

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