Removal of unneeded dispute lua and additional country support#2068
Conversation
|
this all makes sense to me, but I can't vouch for completeness, so I'm going to lean on @nvkelso for a proper review |
| end | ||
| -- French Guiana | ||
| if object.tags.place == 'state' and object.tags['ISO3166-1'] == 'GF' then | ||
| output_hstore['place'] = 'country' |
There was a problem hiding this comment.
This is an odd one, it's an overseas region of France (like Alaska and Hawaii), but also gets it's own ISO code.
My preference is to be true to the data and mark it place = region... and if you want to add POV overrides for ISO and all the other countries we're tracking to be country then that's OK.
The full set are (src):
- French Guiana
- Guadeloupe
- Martinique
- Mayotte
- Réunion
There was a problem hiding this comment.
Changed them to region
There was a problem hiding this comment.
(We keep bouncing back and forth on this one... I left new comments farther down.)
nvkelso
left a comment
There was a problem hiding this comment.
Please see one last round of comment about French overseas regions.
| output_hstore['place'] = 'region' | ||
| output_hstore['disputed_by'] = 'CN;RU;IN;GR;CY' | ||
| end | ||
| -- Turn off Abkhazia label for most countries |
There was a problem hiding this comment.
Please update comment:
-- Show Abkhazia label as region for more countries
… junderwood/additional_country_support
| output_hstore['place:RU'] = 'country' | ||
| end | ||
| -- Turn off South Ossetia label for most countries | ||
| -- Show South Ossetia label as region for most countries |
There was a problem hiding this comment.
Nit: Match comment to what code does:
-- Hide South Ossetia label for most countries
| output_hstore['place:US'] = 'region' | ||
| output_hstore['place:VN'] = 'region' | ||
| output_hstore['place'] = 'unrecognized' | ||
| output_hstore['place:RU'] = 'country' |
There was a problem hiding this comment.
Rounding problems, is a map unit more like region or country?
There was a problem hiding this comment.
Fine to do this way for now, but we should revisit once we add kind_detail for these.
| output_hstore['place'] = 'country' | ||
| end | ||
| -- Heard Island and McDonald Islands | ||
| if object.tags.place == 'territory' and object.tags['ISO3166-1'] == 'HM' then |
| -- Recast various French overseas departments as region | ||
| -- Réunion | ||
| if object.tags.place == 'state' and object.tags['ISO3166-1'] == 'RE' then | ||
| output_hstore['place'] = 'region' |
There was a problem hiding this comment.
This will result in no label drawn a particular style, unless you also add the some/full set of place:XX codes as country (or you set the min_zoom value to be better than 3.7). This is also because they aren't listed in the NE country table (only map unit tables).
There was a problem hiding this comment.
EG:
output_hstore['place:AR'] = 'country'
output_hstore['place:BD'] = 'country'
output_hstore['place:BR'] = 'country'
output_hstore['place:CN'] = 'country'
output_hstore['place:DE'] = 'country'
output_hstore['place:EG'] = 'country'
output_hstore['place:GB'] = 'country'
output_hstore['place:GR'] = 'country'
output_hstore['place:ID'] = 'country'
output_hstore['place:IL'] = 'country'
output_hstore['place:IN'] = 'country'
output_hstore['place:IT'] = 'country'
output_hstore['place:JP'] = 'country'
output_hstore['place:KO'] = 'country'
output_hstore['place:MA'] = 'country'
output_hstore['place:NL'] = 'country'
output_hstore['place:NP'] = 'country'
output_hstore['place:PK'] = 'country'
output_hstore['place:PL'] = 'country'
output_hstore['place:PS'] = 'country'
output_hstore['place:PT'] = 'country'
output_hstore['place:RU'] = 'country'
output_hstore['place:SA'] = 'country'
output_hstore['place:SE'] = 'country'
output_hstore['place:TR'] = 'country'
output_hstore['place:TW'] = 'country'
output_hstore['place:UA'] = 'country'
output_hstore['place:VN'] = 'country'
There was a problem hiding this comment.
Let's still do this now...
It's also related to work in #2077.
There was a problem hiding this comment.
Let's continue this in #2077... and reset to "place" = "country" here and for all 5.
| end | ||
| -- Martinique | ||
| if object.tags.place == 'state' and object.tags['ISO3166-1'] == 'MQ' then | ||
| output_hstore['place'] = 'region' |
| end | ||
| -- Mayotte | ||
| if object.tags.place == 'state' and object.tags['ISO3166-1'] == 'YT' then | ||
| output_hstore['place'] = 'region' |
| end | ||
| -- Guadeloupe | ||
| if object.tags.place == 'state' and object.tags['ISO3166-1'] == 'GP' then | ||
| output_hstore['place'] = 'region' |
| end | ||
| -- French Guiana | ||
| if object.tags.place == 'state' and object.tags['ISO3166-1'] == 'GF' then | ||
| output_hstore['place'] = 'region' |
| kind: region | ||
| kind_detail: province | ||
| table: osm | ||
| - filter: {name: true, place: unrecognized} |
There was a problem hiding this comment.
Considering consolidating this into the existing section above
- filter: {name: true, place: country}
As
- filter: {name: true, place: [country,unrecognized]}
With
kind: unrecognized
Changing to
kind: {col: place}
There was a problem hiding this comment.
nice. even simpler
| end | ||
| -- New Caledonia | ||
| if object.tags.place == 'archipelago' and object.tags['ISO3166-1'] == 'NF' then | ||
| output_hstore['place'] = 'region' |
There was a problem hiding this comment.
New Caledonia should be country as it's a dependency of France
nvkelso
left a comment
There was a problem hiding this comment.
-- Turn off Kosovo country label for CN;RU;IN;GR
Also add here NP, BR, PS, MA, AR, VN, ID, UA
-- Hide Kosovo region labels for several POVs including China and Russia
Also add here NP, BR, PS, MA, AR, VN, ID, UA
| output_hstore['place'] = 'unrecognized' | ||
| output_hstore['place:RU'] = 'country' | ||
| end | ||
| -- Turn off Nagorno-Karabakh label for most countries |
There was a problem hiding this comment.
Nit: Change the name here to Artsakh (Nagorno-Karabakh) as that's the new name but not in common circulation so still put the old name in the parenthetical.
|
@nvkelso I believe all the comments have been addressed now. |
This pulls out some of the lua changes for specific disputes that are no longer necessary as we are not displaying them at this time.
Additionally, 25 dependencies were missing from the map due to a lack of
placetag and/or a value ofplacethat is notcountry. These lua additions change these place nodes to place=country when matching the dependency's iso code.Lastly,
ne_idandne:brk_id_a3tags will get pushed to dispute ways to aid in creating a dispute_id.