使用空间数据库查找包含点的多边形 [英] Using a spatial database to find polygons that contain a point

查看:145
本文介绍了使用空间数据库查找包含点的多边形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用MongoDB来存储空间记录.一些记录是多边形,而另一些是点.数据正在不断插入.

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

我需要能够访问其多边形包含一个点的所有记录. Mongo的空间查询允许查找多边形内的所有点,但不能找到包含一个点的所有多边形.在另一个数据库系统MongoDB中,有什么好方法吗?

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?

推荐答案

不幸的是,目前无法运行此查询-除非您愿意简化应用程序(即,假设所有多边形都是a的圆)特定半径[或小半径集].

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]).

有一张您描述的功能的公开票证: https://jira.mongodb.org/browse/SERVER-2874

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

这篇关于使用空间数据库查找包含点的多边形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆