In org.apache.sis.metadata.iso.citation.Citations, the getIdentifier(Citation) method iterates over all Identifier instances and return the shortest Identifier.code, with a preference with code that are valid Unicode identifier. There is two problems with this approach:
- Returning the shortest identifier is an arbitrary choice. This strategy is a legacy of old times when we did not checked for valid Unicode identifiers. In today context, this strategy has undesirable effects: for the International Association of Oil & Gas producers, it causes the legacy OGP abbreviation to be preferred to the new IOGP abbreviation.
- The Identifier.codeSpace is ignored. It was not significant for the common case where the main authorities where "EPSG" and "OGC". But if we want to define an 19115 standard in the ISO namespace, we need a string that take the namespace in account, for example "ISO:19115".
Note that the last point may cause a difficulty with EPSG citation. In the old times, EPSG was by itself an organization ("European Petroleum Survey Group"). But now EPSG is no longer an organization, but is still an authority managed by another organization, namely IOGP. Do we consider EPSG as an identifier in the IOGP namespace (i.e. "IOGP:EPSG")? Advantage would be to provide a way to find the information to provide in the codeSpace attribute of the following:
Inconvenient is that most peoples use only "EPSG", so it is not clear how to trim the codespace in cases like this one.