Is anyone aware of a method to set the bounds of a GTiff in the PDAL writers.raster similar to the method in writers.gdal? The idea is to ensure the output raster is the same bounds as the input las.
writers.raster example:
{
"pipeline": [
{
"type": "readers.las"
},
{
"type": "filters.range",
"limits": "Classification[2:2]"
},
{
"type": "writers.raster"
}
]
}
Example using writers.gdal:
{
"pipeline": [
{
"type": "readers.las"
},
{
"type": "filters.range",
"limits": "Classification[2:2]"
},
{
"type": "writers.gdal",
"gdaldriver": "GTiff",
"output_type": "mean",
"bounds": ***OUTPUT BOUNDS SET HERE***
}
]
}
Writers.raster does not offer the same setting. Writers.gdal cannot be used in my case.
Ideally, setting the output bounds would happen in the pipeline and avoid a second external step like gdal.Translate.
Maybe I am missing something obvious?
Potential Solution.
Leverage
filters.facerasterfor bounds extents. Faceraster allows for setting an origin and users can work out a raster size based on pixel height and width. Ideally, the bounds could be set at thewriters.rasterstage, but this is the solution I have at the moment to work and the use ofwriters.gdal.IMO, setting the bounds at the
writers.facerasterstage similar towriters.gdalis a more robust solution and avoids unforeseen errors when reconstructing the raster via the origin and bounds methods, but this is a good patch for my process for now.