-
Notifications
You must be signed in to change notification settings - Fork 160
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 a check crs function for rasters #707
Conversation
crs = data_src.crs | ||
return crs | ||
except rio.errors.RasterioIOError as e: | ||
print("Please only input files that can be read as a raster.\n") |
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.
@nkorinek can you tell me what this mearns? Will this io error be throw if the data are not in raster format or are there a list of specific file formats that rio uses? maybe some language like -
Oops, your data are not in a format that rasterio can read. Please check the rasterio documentation for accepted file formats and make sure that your data are in raster format.
The CRS object stored in the raster file. | ||
""" | ||
|
||
try: |
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.
@nkorinek what happens when you pass a raster with no crs? it may be good to have a message for - there is no crs associated with this file?
Parameters | ||
---------- | ||
path : string | ||
Path to the raster file. |
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.
Probably want to say Path to a raster file in a format that rasterio can read.
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.
a few changes on this one @nkorinek thank you!
@nkorinek similar to the other PR please open an issue in earthpy about why we are adding this - the lessons repo is private. |
…com:earthlab/earthpy into dep-update-new
…ab/earthpy into dep-update-new
…earthlab/earthpy into dep-update-new
Update dependancies
thank you @nkorinek merging this!! |
Hey @lwasser sorry for the confusion, but those commits were just me merging the main branch updates into this branch, I didn't address your comments yet! Should I create a new pr with the small updates needed to address the issues you found? |
As per our conversation , added a very rudimentary check crs function and a few basic tests. It needs more tests (don't know how to access an HDF file for a test?) but works on my local machine as I was expecting it to. @lwasser thoughts?