[pdal] operating on a mesh using python
Kirk Waters - NOAA Federal
kirk.waters at noaa.gov
Fri Oct 8 08:22:16 PDT 2021
Hi,
I'm trying to figure out how I can take the mesh created by
filters.delaunay and modify it before converting to a raster. Perhaps the
cleanest thing is modifying the C++ code, but I thought I could mock it up
in Python first to make sure it's worthwhile. What I want to add is a way
to remove triangles that have a long leg. Like the ones I'll get over a bay
or harbor, basically to keep it from extrapolating too much.
Where I'm having a problem is trying to get the mesh back into a pdal
pipeline after I modify it. I feel like I'm missing the obvious. The
approach I have right now looks like this:
pipe = [
args.input,
{"type": "filters.delaunay"}
]
pl = pdal.Pipeline(json.dumps(pipe))
pl.execute()
m = pl.get_meshio(0)
That gets me a mesh to work with. After modifying it, I write out the mesh
as a PLY file, then read it back in again, but that doesn't really read in
as a mesh. I think it comes in as a bunch of points, so filters.faceraster
doesn't see the mesh it's expecting when I try to make the raster.
Is there another way to get that modified mesh to faceraster? Thanks for
any pointers.
Kirk Waters, PhD | NOAA Office for Coastal Management
Applied Sciences Program | 2234 South Hobson Ave
843-740-1227 (empty office) | Charleston, SC 29405
coast.noaa.gov/digitalcoast
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pdal/attachments/20211008/f33a5531/attachment.html>
More information about the pdal
mailing list