Issue 18404

Geocoder and CountryParser can't handle countryCode XZ

18404
Reporter: kbraak
Type: Bug
Summary: Geocoder and CountryParser can't handle countryCode XZ
Priority: Critical
Status: Open
Created: 2016-04-15 10:04:04.423
Updated: 2016-04-25 15:40:20.775
        
Description: At present, there's no way to say a record is in international water and not get an issue (e.g. POR-2166).

"XZ" is not in the ISO standard. This, and other "user-assigned code elements are codes at the disposal of users who need to add further names of countries, territories, or other geographical entities to their in-house application of ISO 3166-1".

Note: *the [user-assigned ISO code XZ|https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2] is in our [API|https://github.com/gbif/gbif-api/blob/master/src/main/java/org/gbif/api/vocabulary/Country.java#L1318]*

However, "XZ" isn't accepted by the CountryParser, and a verbatim country "International Water" gives a mismatch because the Geocoder returns null.

What are options for GBIF?

1. Handle "XZ" properly, and recommend its use to publishers. This may apply to other user-assigned codes, such as "XK" for Kosovo.

2. Not try and handle "XZ", remove it from our API, and process dwc:waterBody instead, where DwC recommends using the Getty Thesaurus of Geographic Names.



]]>
    


Author: mblissett
Created: 2016-04-15 10:31:07.874
Updated: 2016-04-15 10:31:07.874
        
To clarify:

A record in international water will show with no issues if it's provided with countryCode=NULL, country=NULL.

If the provider wants to say the record is *definitely* in international water, there's no satisfactory way to do this at present.
    


Author: mblissett
Created: 2016-04-15 11:05:24.59
Updated: 2016-04-15 11:05:24.59
        
The XZ code is perhaps more general than we want:

"In cases where no ISO 3166 country code element is available, e.g. installations in international waters *or international cooperation zones*, the code element "XZ", available for user assignment in accordance with clause 8.1.3 of ISO 3166-1/1997, will be used."

From http://www.unece.org/cefact/locode/unlocode_manual.pdf
    


Author: thirsch@gbif.org
Comment: I have been asked to comment on this. From discussion with [~mblissett] it seems that promoting XZ may not be the best solution as it does not relate exclusively to international waters. On the other hand, using a term for 'waterBody' seems to be mixing apples and oranges as this suggests a geographical term rather than a political unit. As far as possible we should follow what has been common practice among OBIS providers since they are the experts on marine data, and ensure our system can interpret this sensibly. I believe Matt's suggestion is that we advise people to put 'international waters' and we enable our system to accept this? I'd be happy with that.
Created: 2016-04-25 15:40:20.775
Updated: 2016-04-25 15:40:20.775