-
Notifications
You must be signed in to change notification settings - Fork 15
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
added projjson if epsg not available #41
Conversation
🙏 @clausmichele please feel free to add a test using the file you shared |
@vincentsarago I added a test using the provided file, tests are successfully passing. |
rio_stac/stac.py
Outdated
except AttributeError: | ||
projjson = None | ||
else: | ||
epsg = src_dst.crs.to_epsg() |
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.
Can we do something like 👇
projjson = None
epsg = None
if src_dst.crs is not None:
epsg = src_dst.crs.to_epsg() if src_dst.crs.is_epsg_code else None
try:
projjson = src_dst.crs.to_dict(projjson=True)
except AttributeError:
pass
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.
sure, thanks for the style improvement :)
CI errors with This only happens in python3.7 because rasterio 1.3 in not available for this version. I think we should allow |
Solves this issue: #40
Let me know if you have any comment or suggestion to improve this PR!
Example image to test the code:
spei30_19970215.zip