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

multiple RV parent material groups results in duplicate coiids via fetchNASIS_components #58

Closed
brownag opened this issue Feb 13, 2018 · 2 comments
Assignees
Labels
bug NASIS-local This tag is used for pull requests, issues, discussions etc. for soilDB local NASIS functions

Comments

@brownag
Copy link
Member

brownag commented Feb 13, 2018

Multiple parent material groups marked as RV results in a duplication of component records when joining to the pmgroup view. Currently, the many:one flattening assumes that the component's RV PM group is the lone value one would like to portray.

Need to add extra checks for anything that uses RV record to "flatten" a many:one relationship. I can't think of any legitimate case where multiple RVs are necessary (usually a data entry error), but regardless of their legitimacy, they will always result in a duplication on a join where the constraint is rvindicator==1.

See also: same problem only for component horizon texture group #32

Here are a few sample component IDs with this problem from MLRA22A:


> c <- get_component_data_from_NASIS_db()
-> QC: duplicate coiids, this should not happen. Use `get('dupe.coiids', envir=soilDB.env)` for related coiid values.
> get('dupe.coiids', envir=soilDB.env)
 [1] "641142"  "641696"  "666282"  "666331"  "917492"  "1154299" "1154376" "1269515" "1271600" "1692214"
@brownag brownag added the bug label Feb 13, 2018
@brownag
Copy link
Member Author

brownag commented Feb 13, 2018

From the NASIS documentation for Component Parent Material Group table description (emphasis added)

The Component Parent Material Group table lists the range of parent materials in which this component formed when mapped in this mapunit. For example, a component formed in one parent material, such as loess, or one vertical sequence of parent materials, such as loamy glacial drift over silty residuum weathered from shale, has one row in this table. A component formed in one parent material in some delineations of this data mapunit, but another parent material (or sequence of parent materials) in other delineations has two rows in this table, one for each parent material (or sequence of parent materials). One row is identified as the representative parent material.

@brownag brownag self-assigned this Jun 27, 2018
@brownag brownag added the NASIS-local This tag is used for pull requests, issues, discussions etc. for soilDB local NASIS functions label Jan 16, 2021
@brownag
Copy link
Member Author

brownag commented Apr 28, 2023

The presence of multiple RV values in parent material group no longer duplicates component records in fetchNASIS() result. The values are concatenated together to create composite pmkind and pmorigin

So for example Waca component in CA719 (COIID 641696) has pmkind "mudflow deposits & residuum" and pmorigin "andesite & tuff, acidic"

@brownag brownag closed this as completed Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug NASIS-local This tag is used for pull requests, issues, discussions etc. for soilDB local NASIS functions
Projects
None yet
Development

No branches or pull requests

1 participant