python中3D多边形的交点
是否有任何开源工具或库(最好是 python)可用于与从 ESRI shapefile 读取的 3D 几何体执行大量相交?大多数测试都是简单的线段与多边形。
我研究了 OGR 1.7.1 / GEOS 3.2.0,虽然它正确加载了数据,但生成的交叉点不正确,并且大多数其他可用工具似乎都建立在这项工作的基础上。
虽然 CGAL 是一种替代方案,但它的许可证并不合适。 Boost 通用几何库看起来很棒,但 API 很大,并且似乎不支持开箱即用的 wkt 或 wkb 阅读器。
Are there any open source tools or libraries (ideally in python) that are available for performing lots of intersections with 3D geometry read from an ESRI shapefile? Most of the tests will be simple line segments vs polygons.
I've looked into OGR 1.7.1 / GEOS 3.2.0, and whilst it loads the data correctly, the resulting intersections aren't correct, and most of the other tools available seem to build on this work.
Whilst CGAL would have been an alternative, it's license isn't suitable. The Boost generic geometry library looks fantastic, but the api is huge, and doesn't seem to support wkt or wkb readers out of the box.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
近10年后更新!
这里是我 10 年前为我的光学光线追踪项目的第一个版本编写的一些代码。新版本代码不再使用多边形;我们现在用网格来做所有事情。
代码可以清理,有很多防御性复制。我不保证其准确性或有用性。我尝试将其从上面的 GitHub 链接中几乎逐字提取到一个独立的脚本中。
Update after nearly 10 years!
Here is some code I wrote 10 years ago for the first version of my optical ray-tracing project. The new version of the code no longer uses polygon; we do everything with meshes now.
The code could be cleared up, there is a lot of defensive copying. I don't give any guarantee of its accuracy or usefulness. I've tried to pull it almost verbatim from the GitHub link above into an isolated script.
您可以尝试我最新的 lib Geometry3D,如下
所示
也可以查看文档几何3D
You can try my latest lib Geometry3D by
An example is shown below
You can also look at the documentation Geomrtry3D