I am using GEOS (in Python/Django) to manipulate some 3d elements. All topological operations work perfectly in 2D. So, I created a simple MultiPolygon
with 3D polygons (very simple in fact, it is just a collection of vertical planes), and a LineString
which is also 3D. Now I simply wanted the intersection of those (which I believe would have been a list of 3D-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 OK, geos doesn't support topological operations with 3D-data ... Well, there must be lots of libraries out there that can do that for me right ??? So I googled, and I just can't find a single one !!! So if somebody has a pointer, that would be great ...
EDIT
There is a similar question as Intersections of 3D polygons in python, but this doesn't give any satisfying answer (see comment).
I still don't believe that there is a single "good choice" of a library to do this in python, but a number of promising projects are in the works, foremost amongst them improved cgal-bindings on google code.
The new licensing conditions of CGAL from version 4 onward (GPL/LGPL) also make some parts of the original question on this topic out of date.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With