Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RasterDataset and Samplers don't work with non-square pixels #2594

Open
calebrob6 opened this issue Feb 19, 2025 · 2 comments · May be fixed by #2601
Open

RasterDataset and Samplers don't work with non-square pixels #2594

calebrob6 opened this issue Feb 19, 2025 · 2 comments · May be fixed by #2601
Labels
datasets Geospatial or benchmark datasets

Comments

@calebrob6
Copy link
Member

Description

If you use RasterDataset with a raster that has non-square pixels (i.e. where x-resolution is different than y-resolution), then RasterDataset will record the resolution of the entire raster as that of the first dimension (probably y-resolution). This is a problem in at least two places:

  • Every __getitem__ call to the RasterDataset will result in a resampling, which may be unexpected, and will definitely be slow
  • When using Samplers with a patch size in pixel units the bounding boxes that index into the RasterDataset will be generated assuming a square resolution so what you get back won't match up with what you expect.

Steps to reproduce

Use a RasterDataset with a raster that has non-square pixels.

Version

latest

@adamjstewart
Copy link
Collaborator

Which data source did you encounter this with? I know OCO-2 and some scanning modes of Sentinel-1 have this trait, curious what other sensors do this.

@adamjstewart adamjstewart added the datasets Geospatial or benchmark datasets label Feb 20, 2025
@calebrob6
Copy link
Member Author

calebrob6 commented Feb 20, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datasets Geospatial or benchmark datasets
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants