Using a spatial database to find polygons that con

2019-08-02 07:56发布

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条回答
一纸荒年 Trace。
2楼-- · 2019-08-02 08:30

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

查看更多
登录 后发表回答