Three-dimensional geometric topology (e.g. intersection) in Python

I am using GEOS ( in Python / Django ) to manipulate some 3d elements. All topological operations work fine in 2D. So, I created a simple MultiPolygon with 3D polygons (very simple, it's just a set of vertical planes) and LineString , which is also 3D. Now I just wanted the intersection of those (which, I believe, would be a list of three-dimensional points):

 >>> l = LineString([0, 0, 0], [1, 1, 1]) >>> p = Polygon([[1, 0, 0], [0, 1, 0], [0, 1, 1000], [1, 0, 1000], [1, 0, 0]]) >>> p.intersects(l) False 

So, geos does not support topological operations with 3D data ... Well, there must be many libraries that can do this for me correctly ??? So I'm googled and I just can't find anyone! Therefore, if someone has a pointer, that would be great ...

EDIT

There is a similar question: Intersections of 3D polygons in python , but this does not give a satisfactory answer (see comment).

+4
source share
1 answer

I still donโ€™t believe that there is one โ€œgood choiceโ€ of libraries in python, but a number of promising projects work in them, among which cgal-bindings in google code are improved.

The new CGAL licensing terms from version 4 on (GPL / LGPL) also make some parts of the original question on this subject obsolete.

+2
source

Source: https://habr.com/ru/post/1397167/


All Articles