So, the RiverGraph object currently includes the coastline because it needs a concept of "river mouth" that is distinct from just a dead end. It might be cleaner to, if possible, use GraphBuilder to generate a RiverGraph that is pruned of any extraneous dead ends. Then RiverGraph could treat all deadends as river mouths in distance calculations.
Essentially, I think it would make more sense to have the RiverGraph object only do river related things (like calculate the distances).
I've started working on this now, and I've decided to do it differently. I've decided to make the coastline attribute optional. I've also decided that I don't need to use GraphBuilder to prepare a RiverGraph.
So, the
RiverGraph
object currently includes the coastline because it needs a concept of "river mouth" that is distinct from just a dead end. It might be cleaner to, if possible, useGraphBuilder
to generate aRiverGraph
that is pruned of any extraneous dead ends. ThenRiverGraph
could treat all deadends as river mouths in distance calculations.Essentially, I think it would make more sense to have the
RiverGraph
object only do river related things (like calculate the distances).