DATEX-II-EU / DatexII

Main repository for issues and bugs for the DATEXII standard
0 stars 0 forks source link

LocationReferencing - NamedArea (Bugzilla Bug 315) #315

Open datexii opened 3 years ago

datexii commented 3 years ago

This issue was created automatically with bugzilla2github.py

Bugzilla Bug 315

Date: 2020-11-19T22:19:19+01:00 From: @paalaas To: @iancornwellmottmac

Last updated: 2021-05-14T17:45:41+02:00

datexii commented 3 years ago

Comment 1478

Date: 2020-11-19 22:19:19 +0100 From: @paalaas

subDivisionCode in class IsoNamedArea is restricted with three characters and is referring to ISO 3166-2. This defines counties for Norway as https://www.iso.org/obp/ui/#iso:code:3166:NO.

subdivisionType in class IsoNamedArea list a lot of types, and we want to use municipality also, but here we have 4 characteres violating the regular max length set to three and the definition of ISO 3166-2.

datexii commented 3 years ago

Comment 1536

Date: 2021-03-05 17:02:26 +0100 From: @iancornwellmottmac

An email thread with Paal helped to clarify the issue.

Paal wants to be able to represent a commonly used code like NO 0301 (an area of Oslo).

That is not possible in IsoNamedArea, which only allows 3 digits for the numeric part. That is correct - and in ISO 3166-2 for Norway only defines 11 counties and 2 artic regions. Oslo as "03" is one of the 11. So NO 0301 is not an ISO area. A user might look at our list of ISO subdivision types and expect them to be usable for their country, but ISO 3166-2 takes a different approach for each country - the list is the full set of possibilities but not every possibility is supported for each country. For Norway only county and arcticRegion are possible according to the standard.

The current model is not incorrect, but it doesn't support Paal's requirement, and it is not particularly useful for those countries in which ISO 3166-2 remains very high level.

We do provide a NUTS area as an alternative but the commonly used 0301 isn't the NUTS code for Oslo (that is NO011).

I wondered if the 03 in 0301 was the ISO code and 01 was a subdivision, but there are other Oslo postcodes like 0401.

So this issue seems to really be asking for a way to have a postcode (or other non-ISO non-NUTS code) along with a NamedArea. The reference to ISO seems a red herring. None of the 3 concrete NamedArea classes currently support this feature.

datexii commented 3 years ago

Comment 1539

Date: 2021-03-12 10:20:16 +0100 From: @iancornwellmottmac

Furthermore ISO 3166-2 defines the subdivision code as the full thing (e.g. NO-03, or GB-GLG) not just the part after the hyphen, but our definitions and facets declaration limit to 3 characters, so assume only the part after the hyphen, to be used along with a Country type attribute to make a full code.

In a minor release preserving backwards compatibility, we can't change the facets, so we will change the definition of the SubdivisionCode type and the attribute in NamedArea to match their restrictions i.e. they only represent the second part of a subdivision code.

We should reconsider for the next major revision.

datexii commented 3 years ago

Comment 1563

Date: 2021-05-14 17:45:41 +0200 From: @iancornwellmottmac

To support the feature, Paal provided an extension. This was reviewed and approved at TMG on 12/5/21 so have now added to the model in revision 1186.

LBlaive commented 1 month ago

Since the proposed extension has been added to the data model the only remaining task for the editor is to integrate this extension into the v4 core model. However, we cannot identify the origin of this codification (e.g. if it is a post code or a census code or else). ISO 3166-2 codes and NUTS codes are identified as such through inheritances. To do this it would be useful to add another optional attribute "NamedAreaCodeSource" for free text.