Closed jkibele closed 6 years ago
Couldn't paste them directly so here's a gist of network prep and here's one of error checking and transformation to matrix format.
As part of this, I need to remember that, for some reason, I have node_rounding
method in river_graph
but not in rg_light
. It seems that I need this method so I'll need to keep that in mind when cleaning up my mess.
I've now merged CoastalDist back into master and updated the readme, but I haven't really done anything about cleaning up the messy code. In thinking about how to approach cleaning this stuff up, it seems to me that there are several tasks that are entwined with clean up:
The obvious top-level categories of the workflow are network creation and distance calculations. So, I guess my thinking on the workflow categorization looks something like this at the moment:
That's all I have time for at the moment. I'll need to continue thinking and then break this into smaller tasks.
Since I've already merged the CoastalDist branch and started this other project about the re-organization, I'm going to close this issue.
In my frantic effort to finish the river herring distance calculations for the east coast of the US, I've made a huge mess of the CoastDist branch. I've made some changes to
pyriv.coastal
andpyriv.river_graph
, but mostly I've put stuff into the poorly namedpyriv.rg_light
module. This was sort of intended to be a stripped down (in that it doesn't really use the coastline the same way) version ofriver_graph
, but it's kind of not that now. It's a mess.I've got a couple of jupyter notebooks that demonstrate how the code was used for the east coast stuff. I think the goal for resolving this issue should be to (unfortunately) pretty much refactor the code so that there's a more sensible workflow possible. There are two main tasks here that pyriv is trying to accomplish:
Task 1 is going to be potentially complex and annoying. I don't think there's anyway to truly make that user friendly. There's too much variability in the potential input data sets (e.g., hydrographic network shapefiles, coastline features). Task 2, on the other hand, could be made fairly simple and could go into some sort of easy to use GUI (e.g., QGIS processing toolbox or ESRI Python toolbox).
I'm going to see if I can paste my jupyter notebooks for the east coast calculations up here.