Closed soichih closed 4 years ago
It would depend on where you were storing the z values (something like [[x, y, z], …]
?), and even then, the underlying library (Rust-Geo) would have to return the indices of the simplified values as opposed to a simplified copy (which is doable, but not what it currently does).
Are there any other 3d polyline simplification libraries?
@Jakobovski Shapely supports Point
objects with a z
coordinate.
Also this I just found https://github.com/fhirschmann/rdp
I tried rdp and it worked, but it was way too slow. I don't think I have tried shapely, but has anyone tried it with many(>100k) 3D lines?
@soichih Shapely uses GEOS for its geometric operations, and it's quite heavily optimised (you may want to turn off topology preservation in the Shapely call for maximum speed). It depends on how many vertices are in your lines, the context in which you're converting them (is it a web app, or a command-line app etc).
Is there anyway to make this library work on 3D data?