SouthForkResearch / pyGNAT

Geomorphic Network and Analysis Toolbox, redesigned using FOSS python libraries.
MIT License
2 stars 0 forks source link

Identify node types #6

Open jesselangdon opened 7 years ago

jesselangdon commented 7 years ago

Identify different node types within the network.
Required for:

MattReimer commented 7 years ago

Is there any calculation to be done here? What constitutes a node type?

I think we can do this simply:

  1. Load the shp file using network x
  2. traverse the network adding a nodetype attribute at each node
  3. Write the results to a shape file. (or just graph it in matplotlib for now.)
volkcj commented 7 years ago

Node Types: -river to river -braid to non-braid -braid to braid -outflow (most downstream point in network (does this need further definition?) -headwater -mainstem to tributary (I'm not sure we need this)

Nodes will need to have more than one node type

jesselangdon commented 7 years ago

Made some progress here. I created a new experimental script demonstrating how to identify and tag stream reaches by "reach_type". This would be the first step in identifying node types.

https://github.com/SouthForkResearch/pyGNAT/commit/66a74f553260132a57992037648c23c08953057d

MattReimer commented 7 years ago

This is great. If I'm reading correctly though do we require an attribute of TYPE_ATTRB?

Where does this come from? How pervasive is it in CHaMP Shapefiles or do we have to generate it somehow?

jesselangdon commented 7 years ago

TYPE_ATTRB is just the name of the new "ReachType" attribute field that will store the reach type variables. I figured it won't be something that will be changed by the user, which is why I made it a constant.