-
Notifications
You must be signed in to change notification settings - Fork 6
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
Reduce storage and fix internally draining gaps. #54
Conversation
@@ -1,6 +1,7 @@ | |||
import sys | |||
import os | |||
import time | |||
import subprocess |
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.
Could exclude this if not using subprocess on linux
cmd="gdal_translate -projwin " + ulx + " " + uly + " " + lrx + " " + lry + ' "' + infile + '" ' + outfile | ||
# subprocess.check_call(cmd) | ||
os.system(cmd) | ||
|
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.
In PC testing I used the subprocess call. the os.system call is untested.
Consider splitting this up into 2 pull requests. One to reduce storage, and one to fix internally draining gaps. Updating the Python code is a relatively quick process, but updating the underlying data is very time consuming. We'd prefer to wait a little longer before applying the data updates, just in case we discover more updates that need to made-- so we can apply them all at once. |
The fix to internally draining gaps involves data updates as it requires the new regions data that I have provided. The flow directions data to fix the gaps are not in the currently deployed data. I could separate out python code to just the watershed attribute changes associated with reduced storage without the files being deleted, but this seems hardly worthwhile. |
We were considering not deleting any data (only updating), in case we later decide to use those attributes. From that point of view, it isn't likely that we will need these changes to reduce storage. In any case, we can still merge the code in but make a note that we did not necessarily run these scripts on production. |
Using the latest code and data I was able to generate watersheds for areas outlined in the screenshot from #53. For future reference, this area is "Rick Husband Amarillo International Airport" which is located East of Amarillo, TX. Here is a watershed I generated at (roughly) |
This worked without any code changes so I will merge this in tomorrow morning then begin the process to cycle these changes onto the staging environment. |
This addresses the issue #53