You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Certain geotifs have their axes flipped such as this one, which has the following transform flipping the direction of the x-axis: Affine(-0.346241067933152, 0.2915401535597796, 366317.96341952495, 0.2915401535597782, 0.3462410679331555, 130406.04105973356).
Depending on the transform, I believe this affects how random bounding boxes bounds should be ordered . For the example geotif above with x-axis flipped, this line maybe should be bounds = (query.maxx, query.miny, query.minx, query.maxy) instead of bounds = (query.minx, query.miny, query.maxx, query.maxy). I have not tested it myself.
RandomGeoSampler and RasterDataset do not check for this, resulting in a Bounds and transform are inconsistent error
I'm able to reproduce this bug. @nilsleh this reminds me of a bug you had when working on rioxarray support.
I wonder if we could use something like min(query.minx, query.maxx) and max(query.minx, query.maxx) to solve this problem. But I'm not sure where all we would need to put it.
For rioxarray support I encountered .nc files where the latitude and longitude coordinates were sometimes from -90 -> 90 or vice versa etc, but I think I handled that by sorting them to a common structure when reading the xarray.
Description
Certain geotifs have their axes flipped such as this one, which has the following transform flipping the direction of the x-axis:
Affine(-0.346241067933152, 0.2915401535597796, 366317.96341952495, 0.2915401535597782, 0.3462410679331555, 130406.04105973356)
.Depending on the transform, I believe this affects how random bounding boxes bounds should be ordered . For the example geotif above with x-axis flipped, this line maybe should be
bounds = (query.maxx, query.miny, query.minx, query.maxy)
instead ofbounds = (query.minx, query.miny, query.maxx, query.maxy)
. I have not tested it myself.RandomGeoSampler and RasterDataset do not check for this, resulting in a
Bounds and transform are inconsistent
errorSteps to reproduce
Version
0.5.1
The text was updated successfully, but these errors were encountered: