Closed robbibt closed 9 months ago
It's error of omission
dataarray code does this:
but dataset code does that:
Both should accept all the arguments understood by .output_geobox(...)
.
This should be fixed and parameters for GeoBox construction should be documented at the user-facing interface.
I have a 1 metre LiDAR dataset that I am loading from a raster file via
rioxarray
. I would like to reproject this dataset into a specific CRS (Australian Albers) and resolution (10 metres), similar to usingoutput_crs
andresolution
indatacube.load()
.I can easily reproject to the CRS like this:
However, specifying
resolution
has no effect:Although one workaround would be to manually create a new GeoBox with my custom CRS and resolution, I would love to be able to simply set both CRS and resolution directly within
.odc.reproject()
for ease of use - especially since in this example I don't even need a particularly precise output grid (e.g. snapping/alignment), just a quick and dirty transformation to a specific CRS and lower resolution so I can more easily process a very large LIDAR dataset).Full code example: