JuliaGeo / GeometryOps.jl

GeoInterface-based geometry operations
https://juliageo.org/GeometryOps.jl/
MIT License
29 stars 4 forks source link

`extrude` method to extrude geometries in the Z direction #136

Open asinghvi17 opened 6 months ago

asinghvi17 commented 6 months ago

Ideally this would work for points, linestrings, and polygons, but right now we can restrict it to only working on polygons.

The idea would be to take a polygon, mesh it, and "extrude" it in the z-axis to create a 3d mesh. We would also need a triangulation interface first, but that seems fairly easy to do, and there are plenty of packages which would do it.

This would make creating plots like the one below easier (yes it is bad practice, but it's cool)

Screenshot 2024-05-06 at 2 01 01 PM

Is there any reason we should not do this?

(In all seriousness, this could be useful for 3D hexbin plots as well)

rafaqz commented 6 months ago

Does it need a mesh? Not just 3d polygons?

asinghvi17 commented 6 months ago

Yeah, the sides have to be meshes and triangulation happens in ℝ² unless you do it yourself