[pdal] Crop SRS not working as expected

Andreas Yankopolus andreas at yank.to
Tue Aug 17 13:24:33 PDT 2021


Andrew,

> CRS. Then when you run the GDAL writer, it makes a *rectangular* tiff (because that's what it does, even if you're missing data in some places. Then when you transform that rectangle in your CRS to 4326, you're back to something non-rectangular.

Thanks, I’ve sorted through how all this is happening. I was thinking that a rectangular crop in one CRS would translate to a non-rectangular crop in another CRS. That evidently isn’t happening in PDAL—the crop gets turned into a rectangular one.

They’re probably a way to do this with polygons. TIFF output would pad the raster with undefined values and LPC output would drop points in the areas affected by the crop-area shift. But easier to stick with WGS84.

> Maybe someone else can chime in, but I would think the easiest thing to do would be to transform your points to 4326 right after you read them since that's your ultimate goal, I think.

TIFFs and LAS written when I do this come out square as expected. You’re right that this is the way to go.

The trick is writing WGS84 coordinates to a LAS file and getting the scaling and offset factors correct. Could be that PCD is simpler in practice as one can specify the use of double-precision values for coordinates at the expense of storage (float64 vs uint32).

Is LPC data usually stored in a geographic or projected coordinate system? The default 0.01 resolution on LAS files seems more geared to a projected system.

Cheers,

andreas


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pdal/attachments/20210817/3a4dc060/attachment.html>


More information about the pdal mailing list