-
Notifications
You must be signed in to change notification settings - Fork 11
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
jgrss/reorg #319
base: main
Are you sure you want to change the base?
jgrss/reorg #319
Conversation
@@ -40,18 +46,32 @@ | |||
logger = logging.getLogger(__name__) | |||
|
|||
|
|||
def transform_from_corner( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New helper method
|
||
return height, width | ||
return window_from_bounds(*bounds, transform=transform) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the main fix.
|
||
@check_chunks.register | ||
def _(chunks: tuple) -> dict: | ||
return dict( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This addresses an Xarray deprecation warning.
@mmann1123 this addresses #311. I commented on the relevant changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I added two comments.
- I was not totally clear that you meant by "scatter" in save. I think i'm guessing right but could be clearer.
- we should add STAC to the tutorials at some point.
mode (Optional[str]): The file storage mode. Choices are ['w', 'r+']. | ||
nodata (Optional[float | int]): The 'no data' value. If ``None`` (default), the 'no data' | ||
value is taken from the ``DataArray`` metadata. | ||
scatter (Optional[str]): Scatter 'band' or 'time' to separate file. Default is None. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jgrss I am not sure what you mean here. Does it create a new file for each band?
@@ -208,7 +216,7 @@ def _download_worker(item, extra: str, out_path: _Path) -> dict: | |||
|
|||
|
|||
def open_stac( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stack is still new to me but at some point we need to bring this into the tutorials in the docs.
What is this PR changing?
Fixes
open()
height/width results following #311