Skip to content
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

Merged
merged 3 commits into from
Jan 31, 2017
Merged

Conversation

dtarb
Copy link

@dtarb dtarb commented Jan 16, 2017

This addresses the issue #53

@@ -1,6 +1,7 @@
import sys
import os
import time
import subprocess
Copy link
Author

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)

Copy link
Author

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.

@kdeloach
Copy link

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.

@dtarb
Copy link
Author

dtarb commented Jan 16, 2017

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.

@kdeloach
Copy link

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.

@kdeloach
Copy link

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) LatLng(35.21169, -101.69701):

screenshot 2017-01-30 at 18 08 38

@kdeloach
Copy link

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.

@kdeloach kdeloach merged commit 68b76d9 into develop Jan 31, 2017
@kdeloach kdeloach deleted the reduce_storage branch January 31, 2017 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants