Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dblodgett-usgs opened this issue Nov 1, 2022 · 3 comments

Comments

@dblodgett-usgs
Copy link
Contributor

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
Copy link
Contributor Author

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
Copy link
Owner

mikejohnson51 commented Nov 1, 2022

Updates to data model per Nov 1 Technical Meeting:

image

@mikejohnson51
Copy link
Owner

mikejohnson51 commented Nov 3, 2022

Updates to data model per Nov 3 Technical Meeting:

  • We are going to change the POI table name to hydrolocations
  • The hydrolocations table will contain: {hl_id, mainstem, id, geometry}.
    - hl_id is the old poi_id
  • We will split 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}
    - For now, all POIs will be given a position of outlet

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants