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

Incorrect handling of str or Path input for collector geom #172

Closed
SorooshMani-NOAA opened this issue Sep 5, 2024 · 1 comment
Closed

Comments

@SorooshMani-NOAA
Copy link
Collaborator

See:

elif isinstance(in_item, (Path, str)):
in_item = str(in_item)
if in_item.endswith('.tif'):
raster = Raster(in_item)
if self._base_shape:
clip_shape = self._base_shape
if not self._base_shape_crs.equals(raster.crs):
transformer = Transformer.from_crs(
self._base_shape_crs, raster.crs, always_xy=True)
clip_shape = ops.transform(
transformer.transform, clip_shape)
try:
in_item.clip(clip_shape)

It should have been raster.clip(...)

@felicio93
Copy link
Collaborator

fixed with the latest pull request #174

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

No branches or pull requests

2 participants