Open dblodgett-usgs opened 2 years ago
This will not work out of the box because we have flowlines that do not realize a catchment and we have some catchment divides that do no have flowpaths.
In the network table, we need all divide and flowline identifiers. We also need a has divide logical and a has flowline logical in the network table. There are very likely going to be catchments that do not have an associated flowpath that flow to a network flowline and others that do not flow to a network feature but still require topology. In that case, we should have an attribute in the network table, "network_type" that can be one of "connector" "network" "internal" "coastal".
Updates to data model per Nov 1 Technical Meeting:
Updates to data model per Nov 3 Technical Meeting:
hydrolocations
hydrolocations
table will contain: {hl_id, mainstem, id, geometry}
.
hl_id
is the old poi_id
lookup
into network_lookup
and hydrolocation_lookup
network_lookup
will be identical to the existing lookup
but will drop {poi_id, poi_type, and poi_value}
hydrolocation_lookup
will contain: {hl_id, id, hl_reference, hl_link, hl_position, geometry}
hl_id
is the old poi_id
hl_reference
is the old poi_type
hl_link
is the old poi_value
hl_position
is a constrained vocabulary of {inflow, outflow, along}
position
of outlet
Some flowpath ids get dropped because we are using divide ids to seed the lookup table here: https://github.com/mikejohnson51/hydrofab/blob/master/R/merge_hydrofabrics.R#L83
This is causing some flowpath ids to be NULL in the output of merge national. I think I have a fix but I don't know what
x$cumcount_div
is doing in the code linked just above. OK to switch that tox$cumcount_fl
@mikejohnson51 ?