在python中组合网络几何和拓扑

问题描述 投票:0回答:2

首先,我将描述我想要实现的主要内容。我有一个空间数据集(多边形shapefile),我需要进行三角测量,创建三角测量的双重图形,并在双图上应用一些算法,如A *和深度优先搜索。

我在GIS软件(FME)中创建了三角测量,我想在python中处理它以获得双图并应用上述算法。

My question is how to maintain both the geometry and the topology of the triangulation in order to handle it with python. Here you can find a screenshot of part of my polygon triangulated polygon_triangulation_image
python networking triangulation
2个回答
0
投票

你可以在Quad edge datastrucutre中实现它。这表示图形及其对偶,也适用于每个顶点的位置。但我实际上不确定在python中是否存在这个包,或者你是否需要自己实现它。


0
投票

我找到了一个可能的解决方案。我使用库tri作为输入一个shapefile,并将三角测量输出写入wkt文件以及每个三角形的邻接信息。用于存储adjacensy的数据结构是CGAL指定的数据结构。 tri库的结果比scipy Delaunay更好,因为它也将多边形的边缘作为约束。 Tri目前适用于Python 2。

© www.soinside.com 2019 - 2024. All rights reserved.