-
Notifications
You must be signed in to change notification settings - Fork 2
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
Error when extracting terrain information from DEM #282
Comments
Hi @md376, We recently updated some of the base libraries that the shape and CRS-handling code depends on, so it could be that something isn't working with the new backend APIs. Just for curiosity, could you try passing the following to the WPS process: from fiona.crs import CRS
crs = CRS.from_epsg(3978)
# and if that doesn't work, add:
# crs = crs.to_dict()
terrain_resp = wps.terrain_analysis(shape=feature_url, select_all_touching=True, projected_crs=crs) Please let me know if either of those approaches work for you. |
Thanks for the response, @Zeitsperre. I've tried your suggestion but ran into issues. I found that: from fiona.crs import CRS produced:
However, I was able to import the package and run the function using: from fiona import crs as CRS
crs = CRS.from_epsg(3978)
terrain_resp = wps.terrain_analysis(shape=feature_url, select_all_touching=True, projected_crs=crs) this produced the error:
I checked the object type of I also tried passing
This might just be a product of not being able to import in the package properly? I've played around with it a little bit but am still somewhat new to Python so my troubleshooting skills are still somewhat lacking and are based on my experience using R. |
Thanks for the update and trace back (helpful!). No worries on the lack of python experience. Regrettably, we haven't been maintaining our notebooks very well. It's in my plans to look into this in the next week. Will post updates soon. |
Sounds good, I appreciate the help. |
An update: If you use a .geojson file as the watershed input as opposed to the zipped shapefiles described in the tutorials, the DEM extraction is successful. |
I have been attempting to replicate the workflow outlined in the tutorial titled "02 - Extract geographical watershed properties" (found here: https://pavics.ouranos.ca/jupyter/hub/user-redirect/lab/tree/tutorial-notebooks/raven-master/docs/source/notebooks/02_Extract_geographical_watershed_properties.ipynb using my own shapefile :
02EA005.zip
I have been able to successfully reproduce the workflow (including extracting watershed land use information) up until the terrain information extraction step, where terrain data for the polygon is collected from the default DEM.
Specifically this code below:
terrain_resp = wps.terrain_analysis(shape=feature_url, select_all_touching=True, projected_crs=3978)
produces the error:
"owslib.wps.WPSException : {'code': 'NoApplicableCode', 'locator': 'None', 'text': 'Process failed, please check server error log'}"
I have noted the issue is similar to the one identified here: Ouranosinc/raven#127. However, I have not been able to resolve it myself.
The text was updated successfully, but these errors were encountered: