dblodgett-usgs / hygeo

https://dblodgett-usgs.github.io/hygeo/dev/
Creative Commons Zero v1.0 Universal
6 stars 1 forks source link

refactor crosswalk local_id #27

Closed hellkite500 closed 3 years ago

hellkite500 commented 3 years ago

Somewhat related to #15, and maybe a way to address some of the concerns raised there, should the crosswalk simply key by local_id instead of the local_id being embedded?

Currently the crosswalk is a list of objects like [{"local_id":"cat-1","COMID":"9731278"},...]

After working with this in a couple places, I think it makes sense to factor out the common local_id and simply key by that. Then even if we end up in a 1:many scenario, or different crosswalk definitions for waterbodies than catchments, there is still a unique mapping. Propose changing crosswalk to something like

{
    "cat-1": {
            "COMID":"9731278",
            "site_no":"123456789",
            "other_ref":"point to something"
    },
    "cat-2": {
            "COMID":"00000000",
            "site_no":"987654321",
            "other_ref":"point to something"
    }
}
dblodgett-usgs commented 3 years ago

Also add "outlet comid" as "other ref".