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

TG2-AMENDMENT_GEODETICDATUM_ASSUMEDDEFAULT #102

Open
iDigBioBot opened this issue Jan 5, 2018 · 67 comments
Open

TG2-AMENDMENT_GEODETICDATUM_ASSUMEDDEFAULT #102

iDigBioBot opened this issue Jan 5, 2018 · 67 comments
Labels
Amendment Completeness CORE TG2 CORE tests Parameterized Test requires a parameter SPACE Test Tests created by TG2, either CORE, Supplementary or DO NOT IMPLEMENT TG2

Comments

@iDigBioBot
Copy link
Collaborator

iDigBioBot commented Jan 5, 2018

TestField Value
GUID 7498ca76-c4d4-42e2-8103-acacccbdffa7
Label AMENDMENT_GEODETICDATUM_ASSUMEDDEFAULT
Description Propose amendment to dwc:geodeticDatum using the value of bdq:defaultGeodeticDatum if dwc:geodeticDatum is empty. If dwc:coordinateUncertaintyInMeters is not empty and there are not empty values for dwc:latitude and dwc:longitude, amend dwc:coordinateUncertaintyInMeters by adding a maximum datum shift.
TestType Amendment
Darwin Core Class Location
Information Elements ActedUpon dwc:geodeticDatum
dwc:coordinateUncertaintyInMeters
dwc:decimalLatitude
dwc:decimalLongitude
Information Elements Consulted
Expected Response If dwc:geodeticDatum is EMPTY, fill in the value of dwc:geodeticDatum with the value of bdq:defaultGeodeticDatum, report FILLED_IN and, if dwc:coordinateUncertaintyInMeters, dwc:decimalLatitude and dwc:decimalLongitude are NOT_EMPTY, amend the value of dwc:coordinateUncertaintyInMeters by adding the maximum datum shift between the specified bdq:defaultGeodeticDatum and any other datum at the provided dwc:decimalLatitude and dwc:decimalLongitude and instead report AMENDED; otherwise NOT_AMENDED.
Data Quality Dimension Completeness
Term-Actions GEODETICDATUM_ASSUMEDDEFAULT
Parameter(s) bdq:defaultGeodeticDatum
Source Authority bdq:defaultGeodeticDatum = "EPSG:4326" {[https://epsg.org/crs_4326/WGS-84.html]}
Specification Last Updated 2023-09-18
Examples [dwc:geodeticDatum="[null]", dwc:decimalLatitude="-30.00", dwc:decimalLongitude="130.00", dwc:coordinateUncertaintyInMeters="50": Response.status=AMENDED, Response.result=dwc:geodeticDatum="EPSG:4326", dwc:coordinateUncertaintyInMeters="2877", Response.comment="dwc:godeticDatum is EMPTY so filled with default and dwc:coordinateUncertaintyInMeters amended to maximum possible value"]
[dwc:geodeticDatum="WGS84": Response.status=NOT_AMENDED, Response.result=, Response.comment="dwc:geodeticDatum contains and interpretable value"]
Source ALA, GBIF
References
Example Implementations (Mechanisms)
Link to Specification Source Code
Notes If the dwc:coordinateUncertaintyInMeters is EMPTY, not interpretable, or not valid, this amendment should not provide a dwc:coordinateUncertaintyInMeters. If the dwc:coordinateUncertaintyInMeters is not EMPTY and is valid, this amendment should add to the dwc:coordinateUncertaintyInMeters the uncertainty contributed by the maximum datum shift at the given coordinates. Since different systems have differing requirements for what the default datum should be, it is left unspecified, but should match whatever the target datum is in AMENDMENT_COORDINATES_CONVERTED (620749b9-7d9c-4890-97d2-be3d1cde6da8). After the amendment is performed, the dwc:geodeticDatum field should be the assumed default datum as parameterized. An example implementation to determine the uncertainty added by asserting a default datum (datum shift) where a known datum is not declared can be found in datumshiftproj.py in the source code for the Georeferencing Calculator (Wieczorek & Wieczorek 2021). Included in the source code is a 5-degree grid of datum shifts from an unknown datum to WGS84.
@iDigBioBot
Copy link
Collaborator Author

Comment by Paul Morris (@chicoreus) migrated from spreadsheet:
See 7e0c0418-fe16-4a39-98bd-80e19d95b9d1 GEODETIC_DATUM_INVALID (VALIDATION_GEODETICDATUM_NOTSTANDARD) for the Validation method and MEASURE_GEODETICDATUM_SINGLE_COMPLETENESS for the measurement method. Potential ammendment ordering dependency, should run after an amendment that proposes a value for coordinateUncertantyInMeters

@ArthurChapman ArthurChapman added the Test Tests created by TG2, either CORE, Supplementary or DO NOT IMPLEMENT label Jan 17, 2018
@tucotuco tucotuco added the Parameterized Test requires a parameter label Aug 26, 2018
@chicoreus
Copy link
Collaborator

Parameter, as @ArthurChapman pointed out in #178 is which geodetic datum to use, not which vocabulary of geodetic datums to use.

bdq:sourceAuthority (default = http://epsg.io/)

Can only be interpreted as dwc:geodeticDatum is assumed to be "http://epsg.io" when not specified. This is clearly nonsensical, the default value should be WGS84, or the appropriate EPSG code, probably EPSG:4326.

Parameter is definitely needed but should be:

bdq:defaultGeodeticDatum (default=EPSG:4326)

or

bdq:defaultGeodeticDatum (default=https://epsg.io/4326)

With the notes specifying that the geodetic datum is taken from the http://epsg.io/ vocabulary....

@ArthurChapman
Copy link
Collaborator

@chicoreus This is the default sourceAuthority not the default value - so the value should be a value within that default source authority - whether it is ESPG:4326 (WGS84), EPSG:4674 (SIRGAS2000) or EPSG:7844 (GDA2020), etc. What you are testing for is a value in the field that is consistent with the a value in http://epsg.io/ - the same as you look for a country code in the ISO standard. On thinking about it - probably doesn't need to be Paramaterized and just accept that authority as THE authority.

@Tasilee
Copy link
Collaborator

Tasilee commented Aug 21, 2019

@ArthurChapman - you raise a nice distinction: A source (in this case again unique), but then the default value, of which there can be plenty. I can see therefore two scenarios for Parameterised?

  1. A choice of "specified source authority" and/or
  2. A choice of a default value from a "specified source authority"

@ArthurChapman
Copy link
Collaborator

@Tasilee This is the case for all tests (especially NOTSTANDARD and STANDARDIZED tests) that use an external Standard - ISO, DCMI, in this case EPSG, of any Vocabulary. The vocabulary, standard, etc. is the bdq:sourceAuthority and you are checking to see if the value in the record is a valid record in the bdq:sourceAuthority (in the case of Validations) or can be amended to conform with a value in the bdq:sourceAuthority (in the case of Amendments). In nearly all cases, there is only one sourceAuthority (except as @chicoreus mentions with Taxon names), so there is no choice of sourceAuthority needed, only the choice of a value from that sourceAuthority. Those few cases where there is a choice of sourceAuthority (taxon names) brings in both your 1) and 2) above. Thus, I agree with @chicoreus that we don't need as many Paramaterized tests as we have previously so tagged. Unless @tucotuco has justifications for them that we have not thought of.

@chicoreus
Copy link
Collaborator

chicoreus commented Aug 31, 2019

Phrasing of Amended text is unclear. Don't know how to interpret the comma:

AMENDED if the field dwc:geodeticDatum was EMPTY or was uninterpretable, the value of dwc:geodeticDatum was set to a predefined default value;

Perhaps

AMENDED if the field dwc:geodeticDatum was EMPTY or was uninterpretable and the value of dwc:geodeticDatum was set to a predefined default value;

@Tasilee
Copy link
Collaborator

Tasilee commented Sep 1, 2019

I commented in @chicoreus email of September 1. We do need to standardize the phrasing.

@ArthurChapman
Copy link
Collaborator

I just checked the editing history - back in August last year the wording had a "therefore" after the comma
AMENDED if the field dwc:geodeticDatum was EMPTY or was uninterpretable, therefore the value of dwc:geodeticDatum was set to a predefined default value;

@Tasilee
Copy link
Collaborator

Tasilee commented Sep 3, 2019

Sounds good to me. I've edited the ER as issues to discuss/fix are building.

@ArthurChapman
Copy link
Collaborator

ArthurChapman commented Apr 1, 2020

Needs discussing in conjunction with #60. I have not altered to conform with #59 as it is complicated. Parameterization should be removed I think in line with #59.

@Tasilee
Copy link
Collaborator

Tasilee commented Apr 2, 2020

@ArthurChapman: I think this IS parameterised as it requires a default value for dwc:geodeticDatum? The Parameter isn't EPSG as a sourceAuthority, but which EPSG code is the default?

The Example should have the assumption, e.g., "dwc:geodeticDatum is NULL and has been assumed EPSG:4326"?

@Tasilee
Copy link
Collaborator

Tasilee commented Apr 6, 2020

In line with recent discussions, there is ONE dq:sourceAuthority for the GDs, epsg.io, therefore that isn't a Parameter. In this case, why are we even including "specified source authority" other than than in References and possibly Notes to recommend use of EPSG codes? There is no need to access the source authority in the Expected response, simply to look up the Parameter value, e.g., EPSG:4326 as this is implementation dependent. There is no need for "EXTERNAL_PREREQUISITES_NOT_MET".

I would also suggest amending the example to "dwc:geodeticDatum is NULL, so amended to dwc:geodetciDatum EPSG:4326".

@chicoreus
Copy link
Collaborator

@Tasilee Parameterized as different users might want different defaults. This one is appropriate to have a parameter.

@Tasilee
Copy link
Collaborator

Tasilee commented Sep 12, 2022

I have been checking over additions to the Notes on Validations dependent on a Vocabulary adding "This test will fail if there are leading or trailing white space or non-printing characters." BUT, I cannot see that this AMENDMENT requires either the VOCABULARY tag or the new Notes text added.

@Tasilee
Copy link
Collaborator

Tasilee commented Feb 2, 2023

The Expected Response here does not conform to our usual phrasing. Could I suggest a change from

If dwc:geodeticDatum is EMPTY, fill in the value of dwc:geodeticDatum with the value of bdq:defaultGeodeticDatum, report FILLED_IN and, if dwc:coordinateUncertaintyInMeters, dwc:decimalLatitude and dwc:decimalLongitude are NOT_EMPTY, amend the value of dwc:coordinateUncertaintyInMeters by adding the maximum datum shift between the specified bdq:defaultGeodeticDatum and any other datum at the provided dwc:decimalLatitude and dwc:decimalLongitude and instead report AMENDED; otherwise NOT_AMENDED.

to

INTERNAL_PREREQUISITES_NOT_MET if dwc:geodeticDatum is EMPTY; FILLED_IN the value of dwc:geodeticDatum using the value of bdq:defaultGeodeticDatum; AMEND the value of dwc:coordinateUncertaintyInMeters by adding the maximum datum shift between the specified bdq:defaultGeodeticDatum and any other datum at the provided dwc:decimalLatitude and dwc:decimalLongitude if dwc:coordinateUncertaintyInMeters, dwc:decimalLatitude and dwc:decimalLongitude are NOT_EMPTY; otherwise NOT_AMENDED.

I realize the "report' bit is missing but we are assuming for other tests the activation of the phrase "FILLED-IN" or "AMENDED" or "NOT_AMENDED" etc apply as a report. So, if the FILLED-IN and AMENDED (or NOT_AMENDED) phrases are activated, they are reported?

@chicoreus
Copy link
Collaborator

chicoreus commented Feb 2, 2023 via email

@tucotuco
Copy link
Member

tucotuco commented Feb 3, 2023

I think we want to keep the current phrasing. The recommended fix is not correct.

@ArthurChapman
Copy link
Collaborator

Agree with @chicoreus. Suggestion by @Tasilee it is not correct that INTERNAL_PREREQUISITES_NOT_MET if the dwc:geodeticDatum is EMPTY - instead, you fill it in with the default. I looked at trying to reword it to make it a bit clearer, but can't do better than what we have.

@Tasilee
Copy link
Collaborator

Tasilee commented Mar 8, 2023

I note we have a "Source Authority is "epsg" [https://epsg.io]" but make no reference to it in the Expected Response. As such, should we delete that entry? I would think so. We have the Reference to epsg.

@ArthurChapman
Copy link
Collaborator

I think so - an earlier iteration of the ER must have cited it and it wasn't removed with altered wording.

@Tasilee
Copy link
Collaborator

Tasilee commented Mar 9, 2023

I have amended the Source Authority accordingly

@Tasilee
Copy link
Collaborator

Tasilee commented Jun 13, 2023

Restructured Parameter(s) and Source authority

@ArthurChapman
Copy link
Collaborator

Changed EPSG: to epsg: in the Source Authority and in the Examples

Changed "TG2-AMENDMENT_COORDINATES_CONVERTED" to AMENDMENT_COORDINATES_CONVERTED (620749b9-7d9c-4890-97d2-be3d1cde6da8) in the Notes

@ArthurChapman
Copy link
Collaborator

Changed epsg: to EPSG: in the Source Authority and in the Examples

@ArthurChapman
Copy link
Collaborator

Updated note to remove internal GitHub Reference.

@Tasilee
Copy link
Collaborator

Tasilee commented Jul 4, 2023

Amended Source Authority to align with @chicoreus syntax

From

bdq:defaultGeodeticDatum default="EPSG:4326"

to

bdq:defaultGeodeticDatum default="EPSG:4326" {[https://epsg.org/]}

but do we need an API endpoint?

@ArthurChapman
Copy link
Collaborator

On advice from EPSG - changed in References: "https://www.epsg.org/" to "https://epsg.org/"

Note it was already correct in Source Authority

@Tasilee
Copy link
Collaborator

Tasilee commented Jul 10, 2023

Corrected Source Authority entry from

bdq:defaultGeodeticDatumt = "EPSG:4326" {[https://epsg.org/crs_4326/WGS-84.html]}

to

bdq:defaultGeodeticDatum = "EPSG:4326" {[https://epsg.org/crs_4326/WGS-84.html]}

@Tasilee
Copy link
Collaborator

Tasilee commented Jul 10, 2023

Removed reference to bdq:sourceAuthority from Source Authority

@chicoreus
Copy link
Collaborator

Corrected typo in information elements s/dwc:decimatitude/dwc:decimalLatitude/

chicoreus added a commit to FilteredPush/geo_ref_qc that referenced this issue Jul 24, 2023
…-06-28) specifications. Addressing tdwg/bdq#102 AMENDMENT_GEODETICDATUM_ASSUMEDDEFAULT adding implementation of 5 degree cell lookup table for coordinate uncertainty addition from unknown datum to WGS84 derived from VertNet georeferencing calculator.  Added missing parameters to amendmentGeodeticdatumAssumeddefault(), a default implementation, and minimal unit tests.
@Tasilee
Copy link
Collaborator

Tasilee commented Aug 1, 2023

After @chicoreus email July 25 2023, I changed the Positive example from FILLED_IN to AMENDED.

@ArthurChapman
Copy link
Collaborator

Don't we use AMENDED where a value has been altered, and FILLED_IN where the field was empty and we added something - see definitions in #152. I believe for consistency this should be FILLED_IN - not sure I saw @chicoreus email.

@chicoreus
Copy link
Collaborator

@ArthurChapman This one is more complex than usual, and almost calls for a richer response structure. When only an empty geodeticDatum is filled in, then response.status is FILLED_IN, but if a value is present in coordinateUncertaintyInMeters and an empty geodeticDatum is filled in then the coordinateUncertaintyInMeters is ammended to add the uncertainty between any datum and the specified default at the specified latitude/longitude, and the response.status becomes AMENDED.

@ArthurChapman
Copy link
Collaborator

Thanks @chicoreus - understood.

@Tasilee
Copy link
Collaborator

Tasilee commented Sep 18, 2023

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"

@chicoreus chicoreus added the CORE TG2 CORE tests label Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Amendment Completeness CORE TG2 CORE tests Parameterized Test requires a parameter SPACE Test Tests created by TG2, either CORE, Supplementary or DO NOT IMPLEMENT TG2
Development

No branches or pull requests

5 participants