rapideditor/country-coder

United Kingdom

RobJN opened this issue · 12 comments

RobJN commented

The UK boundary is showing as including the British Overseas Territories and Crown dependencies. I believe this should be excluded. The have their own ISO codes.

https://ideditor.github.io/location-conflation/?locationSet=%7B%20include%3A%20%5B%22GB%22%5D%7D

I think the region that it should show is:
https://ideditor.github.io/location-conflation/?locationSet=%7B%20include%3A%20%5B%22GB-ENG%22%2C%20%22GB-NIR%22%2C%20%22GB-SCT%22%2C%20%22GB-WLS%22%5D%7D

Details on the British Overseas Territories and Crown dependencies can be found here:
https://en.wikipedia.org/wiki/United_Kingdom#Dependencies

@RobJN Yep, this is a known issue I mentioned in #29 (comment). The problem with reversing the meaning is that there still wouldn't be an easy way to query all the places with UK sovereignty, unless we can find a Wikidata item that corresponds to that feature.

RobJN commented

Can we simply create such a wiki data entry? If so, I know just the person who could help.

Can we simply create such a wiki data entry? If so, I know just the person who could help.

Sounds okay, if the Wikidata community is okay with it.

Here's your item; please check it includes what you expected:

https://www.wikidata.org/wiki/Q105435336

Is there an equivalent OSM relation?

But what about https://www.openstreetmap.org/node/7685033716 ? ;-)

P.S. Note that crown dependencies are not, strictly speaking "UK sovereign territories".

RobJN commented

Hi @quincylvania. So the wikidata item you asked for now exists. How should we proceed? Are you going to make use of this new wikidata item for all the places with UK sovereignty and set the ISO code "GB" to what most would consider the UK to be? Reason I ask is that the community index entries for United Kingdom are all covering too big an area. I can either set them all to the right area like I did for the OSM UK local chapter (although without the Isle of Man or Channel Islands) but if you are making a change anyway I can leave them as is.

Hey all, I'd like to close out this issue, but I really don't understand it.
From what I can tell, plenty of codes already exist to represent the various UK subregions.
https://ideditor.codes/ lists all the supported codes.

Region locationSet view it
United Kingdom (includes everything) { include: ['uk'] } view it
Great Britain (just the main island) { include: ['Q23666'] } view it
Great Britain + Northern Ireland { include: ['Q23666', 'GB-NIR'] } view it
British Overseas Territories { include: ['BOTS'] } view it
UK - BOTS
(incl. Isle of Man and Channel Islands)
{ include: ['UK'], exclude: ['BOTS'] } view it
RobJN commented

Hi @bhousel

Hey all, I'd like to close out this issue, but I really don't understand it.

The issue is that a lot of UK entries in the Community and Imagery Indexs have used the locationSet { include: ['uk'] } and all of these are wrong as this locationSet includes everything. Most UK citizens (and I expect most BOTS, Isle of Man and Channel Island citizens) would consider the UK to be what you have as locationSet { include: ['Q23666', 'GB-NIR'] }. As noted in my first post, this also seems to be the case for ISO standards as the BOTS, Isle of Man and Channel Islands all have their own ISO codes.

From here we have two options:

  1. Update locationSet { include: ['uk'] } so that it covers the area that excludes he BOTS, Isle of Man and Channel Islands.
  2. I go through and change all the Community Index records, plus all the Imagery Index records that currently use ['uk'] to instead be ['Q23666', 'GB-NIR']

Of these, option 1 was my preference as it is what makes most sense to the citizens of these territories and is in line with the ISO standards.

Quincy then replied:

The problem with reversing the meaning [of 'uk'] is that there still wouldn't be an easy way to query all the places with UK sovereignty, unless we can find a Wikidata item that corresponds to that feature.

To satisfy Quincy's request, Andy (pigsonthewing) has created such a Wikidata entry that can be used for the full set (UK + BOTS + Isle of Man + Channel Islands).

My hope is that we can therefore proceed with option 1 above. If that is not reasonable then I will start the process of updating all the incorrect UK entries in the Community and Imagery indexes.

It looks like we already support another one that I missed:

Region locationSet view it
Countries of the United Kingdom { include: ['Q3336843'] } view it

Which is the same thing as include: ['Q23666', 'GB-NIR']

I'll try to:

  • have include: ['uk'] (and related codes) resolve to that geometry and qid instead, and
  • have Q105435336 represent what include: ['uk'] does currently (United Kingdom sovereignty)

I tried this today, and the commit is saved at 706e872, but it breaks a lot of the tests for this library and we'd need to redo some of the documentation too. I am pretty sure I got a lot of it wrong, and I'm not really comfortable merging this into main.

@RobJN I think the faster solution for now is your "option 2" - to just search-and-replace the locationSets in those other projects to say { include: ['Q3336843'] }.

RobJN commented

Ok @bhousel. Thanks for trying. I will get on to option 2 but with a couple busy weeks ahead it will be late July / early August now.

I just took care of this in the osm-community-index project, it was only a few files..