什么是存储和查询几何路径数据的好数据库/方法
我正在开发一个跟踪 blob(人)的项目。我们想要跟踪它们的 xy 位置,将其转换为它们所遍历路径的某种表示,并执行返回诸如“哪些路径靠近点 (a,b)”或“哪些路径从 (0, b) 开始”之类的查询或者“哪些路径进入以 (a,b) 为中心、半径为 r 的圆”等。
我在 google 上搜索并看到了像 PostGIS 和 SpatiaLite 这样的 GIS 实现。我正在寻找其他我可以研究的“namedrops”,或者对适合您的特定解决方案的个人经验。
编辑:可能需要提到的是,我正在使用 openFrameworks 进行编码,这是一个基于 C++ 的库,专为编码艺术应用程序而设计。我正在使用一种设置,该设置使用投影仪和相机设置将交互式应用程序投影到地板空间上。我的工作环境是windows上的code::blocks。来自使用过 openframeworks 的人的回答是一个优势!
I'm working on a project that tracks blobs (people). We want to track their xy position, turn this into some representation of their traversed path, and do queries that return things like "which paths are near a point (a,b)" or "which paths began from (0, b)" or "which paths enter a circle centered at (a,b) with radius r," etc.
I've googled around and seen GIS implementations like PostGIS and SpatiaLite. I'm looking for other "namedrops" that I can look into, or personal experience with a particular solution that worked well for you.
Edit: it may be relevant to mention that I'm coding using openFrameworks, a c++ based library designed for coding artistic applications. I am working with a setup that uses a projector and camera setup to project interactive applications onto a floorspace. My working environment is code::blocks on windows. answers from people who have worked with openframeworks is a plus!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 C 库级别,您可能只想使用 Geos,这是一个用于执行您提到的那种几何操作的库。如果您想存储地理数据,Postgis 是理想的选择,但对于您的使用来说可能有点大材小用。 Geos是JTS的一个端口,JTS是java的。
At the C library level you might just want to use Geos, a library for doing geometric ops of the kind you mention. Postgis is ideal if you want to store geo data, but might be overkill for your use. Geos is a port of JTS, which is java.
考虑到该项目的要求,我们认为 Spatialite 是一个不错的选择,特别是因为它只是 Sqlite 的扩展,而 Sqlite 已经通过社区开发的插件得到了 openframeworks 的支持。如果我们想使用比 sqlite 更复杂的数据库管理系统,另一种选择是 postgis。
Spatialite 支持许多 GIS 操作。特别是,我们的项目可以很好地利用“交叉”和“交叉”查询。
Given the requirements of the project, it was decided that Spatialite was a good choice, especially because it is a mere extension of Sqlite, which is already supported by openframeworks through community developed addons. Another alternative would be postgis, if we wanted to use a database management system that was more sophisticated than sqlite.
Spatialite supports many GIS operations. In particular, our project could make good use of the "intersection" and "crosses" queries.