bdq icon indicating copy to clipboard operation
bdq copied to clipboard

TG2-AMENDMENT_MINELEVATIONMAXELEVATION_FROM_VERBATIM

Open iDigBioBot opened this issue 7 years ago • 32 comments

TestField Value
GUID 2d638c8b-4c62-44a0-a14d-fa147bf9823d
Label AMENDMENT_MINELEVATIONMAXELEVATION_FROM_VERBATIM
Description Proposes an amendment or amendments to the values of dwc:minimumElevationInMeters and dwc:maximumElevationInMeters if they can be interpreted from dwc:verbatimElevation.
TestType Amendment
Darwin Core Class dcterms:Location
Information Elements ActedUpon dwc:minimumElevationInMeters
dwc:maximumElevationInMeters
Information Elements Consulted dwc:verbatimElevation
Expected Response INTERNAL_PREREQUISITES_NOT_MET if dwc:minimumElevationInMeters or dwc:maximumElevationInMeters are bdq:NotEmpty or dwc:verbatimElevation is bdq:Empty; FILLED_IN the values of dwc:minimumElevationInMeters and dwc:maximumElevationInMeters if they can be unambiguously interpreted from dwc:verbatimElevation; otherwise NOT_AMENDED
Data Quality Dimension Completeness
Term-Actions MINELEVATIONMAXELEVATION_FROM_VERBATIM
Parameter(s)
Source Authority
Specification Last Updated 2024-08-30
Examples [dwc:verbatimElevation="100 feet", dwc:minimumElevationInMeters="", dwc:maximumElevationInMeters="": Response.status=FILLED_IN, Response.result=dwc:minimumElevationInMeters="30.48", dwc:maximumElevationInMeters="30.48", Response.comment="dwc:verbatimElevation contains an interpretable value"]
[dwc:verbatimElevation="x", dwc:minimumElevationInMeters="", dwc:maximumElevationInMeters="": Response.status=NOT_AMENDED, Response.result="", Response.comment="dwc:verbatimElevation contains an uninterpretable value"]
Source
References
  • Chapman AD and Wieczorek JR (2020) Georeferencing Best Practices. Copenhagen: GBIF Secretariat. https://doi.org/10.15468/doc-gg7h-s853
Example Implementations (Mechanisms)
Link to Specification Source Code
Notes If the dwc:verbatimElevation as a single value rather than a range, the minimum and maximum values should be amended with the same value. When transforming units, the transformation should be reversible, not adjusting the number of significant digits or adjusting the rounding. For example, transform yards to meters by multiplying by 0.9144 and retaining added significant digits (verbatim elevation of 10 yards to minimum and maximum depths in meters of 9.144). Implementations should be capable of interpreting verbatim data in at least meters, yards, feet, and kilometers in the form of either a single value or a range. The units must be specified in the verbatim data to be interpretable.

iDigBioBot avatar Jan 05 '18 15:01 iDigBioBot

Comment by Paul Morris (@chicoreus) migrated from spreadsheet: Example is problematic, it includes no units. Needs to account for units and unit conversion in specification, see depth.

iDigBioBot avatar Jan 05 '18 15:01 iDigBioBot

Shouldn’t we add that dwc:minimumElevationInMeters and dwc:maximumElevationInMeters are both EMPTY as a prerequisite?

ArthurChapman avatar Jan 29 '18 22:01 ArthurChapman

As defined, whether or not elevation terms will not be filled in if one is populated is ambiguous for implementors. Compare with explicit language in #55 , where both terms must be populated to avoid amendment, but one empty term can be amended.

This is also one of a number of amendments where terms with existing values should probably return NOT_CHANGED instead of INTERNAL_PREREQUISITES_NOT_MET, a general discussion of these can be filled in from another term amendments is needed.

chicoreus avatar Aug 31 '19 23:08 chicoreus

I think your logic is correct - seems only difference with #55 was to add "and/or" instead of "or".

Also your comment re INTERNAL_PREREQUISITES_NOT_MET versus NO_CHANGED also makes sense

ArthurChapman avatar Sep 01 '19 21:09 ArthurChapman

Thanks @chicoreus and @ArthurChapman. I buy the NOT CHANGED argument. See @chicoreus email of September 1 for a summary of the issues involved.

Tasilee avatar Sep 01 '19 23:09 Tasilee

In looking at the test data, we may have an anomaly with the Expected Response. If dwc:verbatimElevation has say "min elevation 10m", dwc:minimumElevation="" and dwc:maximumElevation="100", then the AMENDMENT will not be applied with INTERNAL PREREQUISITES_NOT_MET. Maybe something like

INTERNAL_PREREQUISITES_NOT_MET if dwc:verbatimElevation is EMPTY or the value(s) is not unambiguously interpretable or the target of the value(s) of dwc:verbatimElevation (dwc:minimumElevationInMeters and/or dwc:maximumElevationInMeters) are not EMPTY; AMENDED if the values of dwc:minimumElevationInMeters and/or dwc:maximumElevationInMeters were unambiguously interpreted from dwc:verbatimElevation; otherwise NOT_AMENDED

Tasilee avatar Mar 02 '22 21:03 Tasilee

That makes sense to me. NOTE that the same would apply for the equivalent Depth test

ArthurChapman avatar Mar 02 '22 21:03 ArthurChapman

In looking at the test data, we may have an anomaly with the Expected Response. If dwc:verbatimElevation has say "min elevation 10m", dwc:minimumElevation="" and dwc:maximumElevation="100", then the AMENDMENT will not be applied with INTERNAL PREREQUISITES_NOT_MET.

I believe that is the correct outcome and I would not change the Expected Respone. If either of min or max elevation is already filled in, don't amend. Doing so can create an inconsistency. For example, if dwc:verbatimElevation has "sea level", dwc:minimumElevationInMeters="10" and dwc:maximumElevationInMeters="". What should be the outcome? Asking more of implementers is too much, I believe.

tucotuco avatar Mar 02 '22 21:03 tucotuco

@tucotuco I concur. General principle, when a non-verbatim field contains a value, the amendments that fill in from verbatim shouldn't change that value, they should only fill in an empty value. Thinking back, this may have been one of our reasons for thinking of FILLED_IN as at the same level as AMENDED.

chicoreus avatar Mar 02 '22 22:03 chicoreus

Certainly what @tucotuco says is simpler and less likely to cause problems.

ArthurChapman avatar Mar 02 '22 22:03 ArthurChapman

OK, consensus. I'll ensure the test data aligns.

Tasilee avatar Mar 03 '22 03:03 Tasilee

Changed "AMENDED" to "FILLED_IN" in accordance with discussions April 16.

Tasilee avatar Apr 18 '22 22:04 Tasilee

This Expected Response is a classic example where there is redundancy between "INTERNAL_PREREQUISITES_NOT_MET" and "NOT AMENDED". Is the application of "NOT AMENDED" even possible?

INTERNAL_PREREQUISITES_NOT_MET if dwc:verbatimElevation is EMPTY or the value is not unambiguously interpretable or dwc:minimumElevationInMeters and/or dwc:maximumElevationInMeters are not EMPTY; FILLED_IN the values of dwc:minimumElevationInMeters and/or dwc:maximumElevationInMeters if they could be unambiguously interpreted from dwc:verbatimElevation; otherwise NOT_AMENDED

Tasilee avatar Jan 28 '23 22:01 Tasilee

On Sat, 28 Jan 2023 14:59:45 -0800 Lee Belbin @.***> wrote:

dwc:minimumElevationInMeters and/or dwc:maximumElevationInMeters are not EMPTY;

The not empty clause is the problematic clause, if the target terms for the amendment to populate are not empty, then the amendment should end up in NOT_AMENDED.

chicoreus avatar Jan 28 '23 23:01 chicoreus

I thought I agreed with @chicoreus here, but on a closer look, I think what we have is correct. If the AMENDMENT stands alone as we previously decided, then you don't want to run the test if there is a value in both dwc:minimumElevationInMeters and dwc:maximumElevationInMeters. Thus, as I see it - the requirements to run the AMENDMENT do not exist, which would imply that the INTERAL_PREREQUISITES to run the test have not been met. If you go with the interpretation of @chicoreus, then you'd need to reword the AMEND part to make sure an amendment is not made to an already existing value.

ArthurChapman avatar Jan 29 '23 13:01 ArthurChapman

Unless I am going mad (always possible), I think you both have missed the point. Yes, I agree that if there are values in dwc:minimumelevation or dwc:maximumelevation, they should never be overwritten.

My point is the repetition of the "unambiguously interpretable" in the INTERNAL_PREREQUISITES_NOT_MET and the equivalent "unambiguously interpreted from" in the FILLED_IN section. If the text/values in dwc:verbatimElevation are not unambiguously interpretable, this will trigger INTERNAL_PREREQUISITES_NOT_MET when I think it should trigger the NOT_AMENDED!

So, I am suggesting that we remove occurrences of "unambiguous ..." in the INTERNAL_PREREQUISITES_NOT_MET sections of Expected Responses.

Here is another example from #71:

"EXTERNAL_PREREQUISITES_NOT_MET if the bdq:sourceAuthority is not available; INTERNAL_PREREQUISITES_NOT_MET if dwc:taxonID is EMPTY, the value of dwc:taxonID is ambiguous or dwc:scientificName was not EMPTY; FILLED_IN the value of dwc:scientificName if the value of dwc:taxonID could be unambiguously interpreted as a value in bdq:sourceAuthority; otherwise NOT_AMENDED"

I would suggest that "the value of dwc:taxonID is ambiguous" should be removed from INTERNAL_PREREQUISITES_NOT_MET because it is already covered by the statement "the value of dwc:taxonID could be unambiguously interpreted..." in the "FILLED_IN" section.

Tasilee avatar Jan 29 '23 21:01 Tasilee

@Tasilee Your conclusion seems logical to me. If "the value of dwc:taxonID is ambiguous", that should simply result in NOT_AMENDED.

tucotuco avatar Jan 30 '23 02:01 tucotuco

Perhaps a way around this is to partly parallel #56 (see my comments there) and make a difference between "invalid" and " ambiguous"

INTERNAL_PREREQUISITES_NOT_MET if dwc:verbatimElevation is EMPTY or the value is invalid or dwc:minimumElevationInMeters and/or dwc:maximumElevationInMeters are not EMPTY; FILLED_IN the values of dwc:minimumElevationInMeters and/or dwc:maximumElevationInMeters if they could be unambiguously interpreted from dwc:verbatimElevation; otherwise NOT_AMENDED

ArthurChapman avatar Feb 13 '23 22:02 ArthurChapman

In this case, we would likely expect to interpret a text string in dwc:verbatimElevation so @chicoreus 's comment about TYPE and INTERNAL_PREREQUISITES_NOT_MET is relevant: We wouldn't trigger the INTERNAL_PREREQUISITES_NOT_MET so "invalid" doesn't seem applicable. I would have the Expected Response as

INTERNAL_PREREQUISITES_NOT_MET if dwc:verbatimElevation is EMPTY or dwc:minimumElevationInMeters and/or dwc:maximumElevationInMeters are not EMPTY; FILLED_IN the values of dwc:minimumElevationInMeters and/or dwc:maximumElevationInMeters if they could be unambiguously interpreted from dwc:verbatimElevation; otherwise NOT_AMENDED

Tasilee avatar Feb 26 '23 22:02 Tasilee

I hate to be thinking this... What about a case such as "<=200". There one of the two could be filled in and the other could not? That makes this amendment complex and suggests that two separate amendments might be more tenable, one for minimum elevation and one for maximum elevation.

tucotuco avatar Feb 26 '23 22:02 tucotuco

@tucotuco Wouldn't this just be a case where you would only fill in dwc:maximumElevationInMeters (i.e. =200). and you'd leave dwc:minimumElevationInMeters empty because all you know about the minimum elevation is that it is less that 200. This (as in the Note) is a range, but you don't know the lower end of the range.

ArthurChapman avatar Feb 26 '23 23:02 ArthurChapman

@ArthurChapman Yes. I feel stupid, but much better. I was tricked by " if they could be unambiguously interpreted".

I suggest:

"INTERNAL_PREREQUISITES_NOT_MET if dwc:verbatimElevation is EMPTY or dwc:minimumElevationInMeters and/or dwc:maximumElevationInMeters are not EMPTY; FILLED_IN the values of dwc:minimumElevationInMeters and/or dwc:maximumElevationInMeters that could be unambiguously interpreted from dwc:verbatimElevation; otherwise NOT_AMENDED"

tucotuco avatar Feb 26 '23 23:02 tucotuco

@Arthur 's comment was the same as mine on that example.

I'm happy with @tucotuco 's ER version so will edit now.

Tasilee avatar Feb 27 '23 00:02 Tasilee

Splitting bdqffdq:Information Elements into "Information Elements ActedUpon" and "Information Elements Consulted".

Also changed "Field" to "TestField", "Output Type" to "TestType" and updated "Specification Last Updated"

Tasilee avatar Sep 18 '23 01:09 Tasilee

Needs work on line with #55

chicoreus avatar Jul 30 '24 22:07 chicoreus

Following suggestions in #55

INTERNAL_PREREQUISITES_NOT_MET if dwc:minimumElevationInMeters and dwc:maximumElevationInMeters are not EMPTY and either dwc:verbatimElevation is EMPTY or the value is not unambiguously interpretable; FILLED_IN the value of dwc:minimumElevationInMeters and dwc:maximumElevationInMeters if they are EMPTY and could be unambiguously determined from dwc:verbatimElevation; otherwise NOT_AMENDED.

ArthurChapman avatar Jul 30 '24 22:07 ArthurChapman

Expected Response and Notes updated following discussions under #55 and Specification Last Updated, updated.

ArthurChapman avatar Jul 31 '24 02:07 ArthurChapman

Similarly to #55, I suggest we change the Expected Response

INTERNAL_PREREQUISITES_NOT_MET if dwc:minimumElevationInMeters and dwc:maximumElevationInMeters are EMPTY and either dwc:verbatimElevation is EMPTY or the value is not unambiguously interpretable; FILLED_IN the values of dwc:minimumElevationInMeters and dwc:maximumElevationInMeters if they are EMPTY and could be unambiguously interpreted from dwc:verbatimElevation; otherwise NOT_AMENDED

to

INTERNAL_PREREQUISITES_NOT_MET if dwc:verbatimElevation is EMPTY or the value is not unambiguously interpretable; FILLED_IN the values of dwc:minimumElevationInMeters and dwc:maximumElevationInMeters if they are EMPTY and could be unambiguously interpreted from dwc:verbatimElevation; otherwise NOT_AMENDED

?

Tasilee avatar Aug 02 '24 00:08 Tasilee

I've changed the Expected Response as above, and updated the Specification Last Updated.

I have also added two more records to the Test Data, one for this test (and a matching one for #55) for the edge case dwc:verbatimDepth="100 m"

Tasilee avatar Aug 03 '24 03:08 Tasilee