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

raster layers cannot be added to the sepal map #940

Closed
dfguerrerom opened this issue Sep 12, 2024 · 0 comments · Fixed by #941
Closed

raster layers cannot be added to the sepal map #940

dfguerrerom opened this issue Sep 12, 2024 · 0 comments · Fixed by #941

Comments

@dfguerrerom
Copy link
Collaborator

from pathlib import Path
from urllib.request import urlretrieve

rgb = Path("/tmp") / "rgb.tif"
link = "https://raw.githubusercontent.com/rasterio/rasterio/master/tests/data/RGB.byte.tif"
urlretrieve(link, file)


# open with rioxarray

da = rioxarray.open_rasterio(file, masked=True)
print(type(da))
da = da.chunk((100,1000))

returns

   1436 elif isinstance(chunks, tuple | list):
   1437     utils.emit_user_level_warning(
   1438         \"Supplying chunks as dimension-order tuples is deprecated. \"
   1439         \"It will raise an error in the future. Instead use a dict with dimension names as keys.\",
   1440         category=DeprecationWarning,
   1441     )
-> 1442     chunk_mapping = dict(zip(self.dims, chunks, strict=True))
   1443 else:
   1444     chunk_mapping = either_dict_or_kwargs(chunks, chunks_kwargs, \"chunk\")

ValueError: zip() argument 2 is shorter than argument 1"
@dfguerrerom dfguerrerom transferred this issue from openforis/sepal Sep 12, 2024
dfguerrerom added a commit that referenced this issue Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant