mikejohnson51 / hydrofab

Hydrofabric Fabricator
Creative Commons Zero v1.0 Universal
9 stars 4 forks source link

flowpath to divide not 1:1 in aggregate output due to pipelines and such. #15

Open dblodgett-usgs opened 2 years ago

dblodgett-usgs commented 2 years ago

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 to x$cumcount_fl @mikejohnson51 ?

dblodgett-usgs commented 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".

mikejohnson51 commented 2 years ago

Updates to data model per Nov 1 Technical Meeting:

image

mikejohnson51 commented 2 years ago

Updates to data model per Nov 3 Technical Meeting:

image