Open calebrob6 opened 9 months ago
Further:
ds = Sentinel2(
"test_scene/",
bands=["B01", "B02"],
res=60,
)
will not throw an error, but ds[ds.bounds]
will throw an error.
@estherrolf for visibility
This was specifically broken by https://github.com/microsoft/torchgeo/pull/754/files#diff-79277b084e67f13f6469cba19e6eadb93ce6c6479cef26161a0c847b75705a81
Basically, depending on where you download your data from, you either get:
1, 2, and 3 are all somewhat contradictory. We could easily support each of these on their own, but supporting all 3 in combination is hard:
A. Remove resolution from the regex (only supports 1) B. Replace resolution with a wildcard (only supports 1 and 2) C. Include 10m in the regex (only supports 3)
In order to prioritize the highest resolution, maybe we could sort the glob results lexicographically and choose the first one only? But that feels really sloppy and could probably break for more complicated hypothetical datasets.
I think this is strange behavior as one of the points of RasterDataset is that it can resample/align different layers to the same resolution.
Description
I have a Sentinel 2 scene with the following files (e.g. in
./test_scene/
):I would expect any of the following to work:
However the
filename_glob
andfilename_regex
are setup in such a way that none of the above are recognized as valid Sentinel 2 scenes.Steps to reproduce
see above
Version
0.6.0.dev0