Skip to content

EURING2020 Latitude and Longitude fields descriptions do not match type #35

@dyve

Description

@dyve

This concerns the EURING2020 fields Latitude and Longitude. These are defined as Numeric on pages 5-60 and 35-60 in the EURING Code 2020 Manual (v202).

Numeric is defined as below on page 4-60.

A non-negative number, which may have a decimal point. Valid characters are the 10 digits (0-9) and the dot (.). The dot, if used, is the decimal point separator and can only occur, at most, once. It must never be the last character. Fields with numeric codes only occur in field which are not of fixed length. If the value is not recorded or unknown then the field is left empty.

Note "non-negative" in the definition.

In the detailed definition on page 35-60, Latitude is defined as:

Longitude in degrees and decimal points of degrees with a maximum of four decimal places. Typically there will be no more than three decimal places. The decimal point should be a full stop, not a comma. Points in the northern hemisphere will be positive, those in the southern hemisphere negative. If location is given in the Geographical Co-ordinates field, then this field and the Latitude field can be empty. See the instructions given for Geographical Co-ordinates."

And then Longitude is defined as:

"Longitude in the same format as Latitude. Co-ordinates west of the Greenwich meridian will be negative, those to the east will be positive."

Note that "Latitude" is wrongly defined as "Longitude". By this definition Latitude and Longitude are explicitly allowed to be negative, but their field type does not allow it.

However, real world latitude and longitudes in WGS84 are very much allowed to be negative:

  • Latitude ranges from –90° to +90°
  • Negative latitude = Southern Hemisphere (south of the Equator)
  • Example: –34.6, 58.4 → somewhere near Buenos Aires (south of the equator)
  • Longitude ranges from –180° to +180°
  • Negative longitude = Western Hemisphere (west of the Prime Meridian)
  • Example: 51.5, –0.1 → London (west of the Prime Meridian)

As a solution, this package introduces a signed numeric type (NumericSigned) for the EURING2020 field Latitude and Longitue. NumericSigned behaves like Numeric, but allows a leading minus sign and explicitly disallows -0. NumericSigned is a small, intentional clarification of the generic numeric types. The manuals clearly permit negative Latitude and Longitude in EURING2020, but the generic Numeric definition does not describe signed numbers.

Making this explicit in the code helps prevent invalid values while staying faithful to the manuals and real-world usage. If a future revision of the specification formally defines signed numeric fields, this implementation can align with it without breaking compatibility.

This issue exists to keep track of related changes and to eventually implement a solution that does not contradict or expand the definition as per the EURING Code Manual.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions