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

Datasets that subclass from RasterDataset will have their custom cmaps overridden #421

Closed
calebrob6 opened this issue Feb 20, 2022 · 0 comments · Fixed by #422
Closed

Datasets that subclass from RasterDataset will have their custom cmaps overridden #421

calebrob6 opened this issue Feb 20, 2022 · 0 comments · Fixed by #422
Labels
datasets Geospatial or benchmark datasets
Milestone

Comments

@calebrob6
Copy link
Member

If I have:

CustomDataset(RasterDataset):
  
  filename_glob = "my_tiff_that_has_a_weird_embedded_colormap.tif"
  cmap = { # some sane colors
    0: (...),
    ... 
  }

then the constructor of RasterDataset will override the custom cmap. I think a custom cmap shouldn't be overridden.

Fixed in #417

calebrob6 added a commit that referenced this issue Feb 20, 2022
@adamjstewart adamjstewart added the datasets Geospatial or benchmark datasets label Feb 20, 2022
@adamjstewart adamjstewart added this to the 0.2.1 milestone Feb 20, 2022
calebrob6 added a commit that referenced this issue Feb 21, 2022
* Make RasterDataset not override custom cmaps

Fixes #421

* Move if check outside of try for speed
adamjstewart pushed a commit that referenced this issue Mar 19, 2022
* Make RasterDataset not override custom cmaps

Fixes #421

* Move if check outside of try for speed
yichiac pushed a commit to yichiac/torchgeo that referenced this issue Apr 29, 2023
* Make RasterDataset not override custom cmaps

Fixes microsoft#421

* Move if check outside of try for speed
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