This returns (-0.5, 4.5, 4.5, -0.5), where the values represent xmin, ymin, xmax, ymax I believe. As you can see, ymin > ymax. I can solve this by assuring that the y coordinates are descending instead of ascending:
I'm trying to use rio.clip_box and then rio.pad_box on a dataset, but I'm running into errors which are solved when making sure that ymin is smaller than ymax.
Shouldn't rio.bounds check what is the actual minimum value in ds.y (e.g. doing somethings like ds.y.min()), instead of doing something like ds.y.isel(y = 0)?
Code Sample
This returns
(-0.5, 4.5, 4.5, -0.5)
, where the values representxmin, ymin, xmax, ymax
I believe. As you can see,ymin > ymax
. I can solve this by assuring that they
coordinates are descending instead of ascending:Gives
(-0.5, -0.5, 4.5, 4.5)
.Problem description
I'm trying to use
rio.clip_box
and thenrio.pad_box
on a dataset, but I'm running into errors which are solved when making sure thatymin
is smaller thanymax
.Shouldn't
rio.bounds
check what is the actual minimum value inds.y
(e.g. doing somethings likeds.y.min()
), instead of doing something likeds.y.isel(y = 0)
?Environment Information
Conda environment information (if you installed with conda):
Environment (
conda list
):Details about
conda
and system (conda info
):