Closed erica-mccormick closed 3 years ago
Ok, I pulled in your changes and made some follow up edits. Looking good! There were a few comments above, but the main issue is I can't run the direct storage plotting code - throws an error around line 20 that i commented on in line in my push back to my main branch.
For your issue 1 above - yeah, I checked it and the bounding box that gets printed on the map has always looked fine so i just ignored it, but we could do a transform to and from a projected space. I think that there's a function in geopandas to estimate the most appropriate epsg code for a lat/long, but we would have to dig that up.
For the second one, i need to check what's happening there... It was working fine for me before and the cp call should want both what to copy and where to put it, so need to check on that.
In get_data_df.py I commented out the watershed flag - mine works both ways with the same function now, let me know if that doesnt work for you though and we can figure out a resolution.
Finally, I think that for the extraction export, we should be able to reduce the amount of redundant code by doing small pieces that behave differently based on watershed or not, but that's low priority. Just might help eventually to keep the two versions from getting out of sync.
Below is a summary of the changes I made! At the end, I describe 2 issues that still exist but do not prevent successful running of the code.
ee_extraction
getGeometry
getLocation
FOR POINTS:
FOR WATERSHED:
IN GENERAL:
Continuing Issues:
[ ] ISSUE 1:
In getLocation, line 68 userWarning: Geometry is in a geographic CRS. Results from 'buffer' are likely incorrect. Use 'GeoSeries.to_crs()' to reproject geometries to a projected CRS before this operation.... full note:
[ ] ISSUE 2:
In ee_extractions, LINE 68, when I try to run direct_storage...
subprocess.call('cp ' + os.path.join(args.point_csv) + ' ' + os.path.join(args.output_directory, 'ee_extractions', 'settings', 'export_coords.csv'), shell=True) ← DOESNT WORK
subprocess.call('cp ' + os.path.join(args.output_directory, 'ee_extractions', 'settings', 'export_coords.csv'), shell=True) ← DOES WORK