Uploaded image for project: 'Spatial Information Systems'
  1. Spatial Information Systems
  2. SIS-199

Resolve confusion between EPSG and IOGP in Citations



    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.4, 0.5
    • 0.6
    • Metadata
    • None


      EPSG is the database while IOGP is the organization maintaining that database. "EPSG" is the codespace used for Coordinate Reference System identifiers (especially in URN), while "IOGP" is the value declared in the codeSpace attribute of GML documents. Example:

      <gml:identifier codeSpace="IOGP">urn:ogc:def:crs:EPSG::4326</gml:identifier>

      This makes the Citations.EPSG constant confusing. In particular, the org.apache.sis.internal.util.Citations class contains undocumented hacks checking if a Citations instance implement the IdentifiedSpace interface, in which case the IdentifiedSpace.getName() value is handled as if it was a hidden identifier. Below is two proposals for trying to clarify the situation:

      Proposal 1: separate the EPSG and IOGP citations

      We could:

      • Change the Citations.EPSG title to "EPSG Geodetic dataset".
      • Have Citation.getIdentifiers() to return an Identifier singleton with:
        • Identifier.getCode() return "EPSG";
        • Identifier.getCodeSpace() return "IOGP";
        • Identifier.getAuthority() return a new Citation with the "International Association of Oil & Gas producers" title.
      • Remove the Citations.getCodeSpace(Citation) internal method, since getUnicodeIdentifier(Citation) would produce the expected result. However a special care is needed for org.apache.sis.internal.jaxb.referencing.Code which needs the old behavior. The rule would be:

      If identifier is an identifier of a geodetic object (for example "EPSG:4326") then:

      • getUnicodeIdentifier(identifier.getAuthority()) return "EPSG".
      • getUnicodeIdentifier(identifier.getAuthority().getIdentifier().getAuthority()) return "IOGP" (because this would be the "authority of the EPSG authority").

      This is admittedly convolved.

      Proposal 2: A single citation

      Citations.EPSG would be documented as the IOGP authority in the particular case when it is used for CRS of the EPSG dataset. Its title would be "International Association of Oil & Gas producers" despite the EPSG constant name. Advantages of this simpler approach is to make clearer that EPSG is a codespace rather an authority (the authority is IOGP). So:

      • Identifier.getAuthority() would return a Citation with the "International Association of Oil & Gas producers", which (as said above) may be a more accurate authority than "EPSG Geodetic Dataset" if we want the authority to be a real organization.
      • Identifier.getCodeSpace() would return "EPSG".

      "IOGP" and "OGP" identifiers would be added, while IdentifierSpace.getName() would continue to return "EPSG". But it may not allow us to remove the hack in Citations internal class.


        Issue Links



              desruisseaux Martin Desruisseaux
              desruisseaux Martin Desruisseaux
              0 Vote for this issue
              1 Start watching this issue