-
Notifications
You must be signed in to change notification settings - Fork 2
allow UTM as --output-crs #59
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
Conversation
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 to me. Just minor edits to text for clarity and a query about whether the default in the cli should also be changed.
| @click.option( | ||
| "--output-crs", | ||
| required=False, | ||
| default="", |
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.
Do we need to change the default to be "utm" to support Aman's use-case? Or is it sufficient to just allow "UTM|utm" as a valid option and respond appropriately?
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.
I left blank to align with the rtc_s1 logic of no value meaning default zone, but I can change if clearer for users?
| burst_ids=() | ||
| resolution=20 | ||
| output_crs="" | ||
| output_crs="UTM" |
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.
Ah, I see that you now have this as the default here... in which case, it might be fine to leave the default as None in the cli.
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.
Thanks for the quick turnaround Alex!
sar_pipeline/aws/cli.py
Outdated
| # update the burst crs if it has been set | ||
| if output_crs and output_crs is not None: | ||
| # update the burst crs if it has been set and is not UTM | utm | ||
| if output_crs and (output_crs not in [None, "utm", "UTM", ""]): |
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.
I recommend if output_crs and (output_crs.lower() != "utm"): because if output_crs already takes care of output_crs being None or an empty string.
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.
I think the .lower() logic will raise an error if when integer is passed. I agree that None and "" are already covered so I can remove those
Co-authored-by: Caitlin Adams <[email protected]>
Co-authored-by: Caitlin Adams <[email protected]>
No description provided.