Skip to content

Commit

Permalink
adding TLC POV to NE export, YAML files and transform.py (#2081)
Browse files Browse the repository at this point in the history
  • Loading branch information
tgrigsby-sc committed May 4, 2022
1 parent b810954 commit b51e372
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion queries/ne.jinja2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% set ne_languages = ['ar', 'bn', 'de', 'el', 'en', 'es', 'fa', 'fr', 'he', 'hi', 'hu', 'id', 'it', 'ja', 'ko', 'nl', 'pl', 'pt', 'ru', 'sv', 'tr', 'uk', 'ur', 'vi', 'zh', 'zht'] %}
{% set ne_viewpoints = ['iso', 'ar', 'bd', 'br', 'cn', 'de', 'eg', 'es', 'fr', 'gb', 'gr', 'id', 'il', 'in', 'it', 'jp', 'ko', 'ma', 'nl', 'np', 'pk', 'pl', 'ps', 'pt', 'ru', 'sa', 'se', 'tr', 'tw', 'ua', 'us', 'vn'] %}
{% set ne_viewpoints = ['iso', 'tlc', 'ar', 'bd', 'br', 'cn', 'de', 'eg', 'es', 'fr', 'gb', 'gr', 'id', 'il', 'in', 'it', 'jp', 'ko', 'ma', 'nl', 'np', 'pk', 'pl', 'ps', 'pt', 'ru', 'sa', 'se', 'tr', 'tw', 'ua', 'us', 'vn'] %}

{% macro ne_common_properties() %}

Expand Down
14 changes: 7 additions & 7 deletions vectordatasource/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
from math import ceil
from numbers import Number
from sys import float_info
from tilequeue.process import _make_valid_if_necessary
from tilequeue.process import _visible_shape
from tilequeue.tile import calc_meters_per_pixel_area
from tilequeue.tile import normalize_geometry_type
from tilequeue.tile import tolerance_for_zoom
from tilequeue.transform import calculate_padded_bounds

import hanzidentifier
import kdtree
Expand All @@ -28,12 +34,6 @@
from shapely.strtree import STRtree
from sort import pois as sort_pois
from StreetNames import short_street_name
from tilequeue.process import _make_valid_if_necessary
from tilequeue.process import _visible_shape
from tilequeue.tile import calc_meters_per_pixel_area
from tilequeue.tile import normalize_geometry_type
from tilequeue.tile import tolerance_for_zoom
from tilequeue.transform import calculate_padded_bounds
from util import safe_int
from util import to_float
from zope.dottedname.resolve import resolve
Expand Down Expand Up @@ -9295,7 +9295,7 @@ def _list_of_countries(value):
# should have an ISO 3166-1 alpha-2 code, so should be 2 ASCII
# latin characters.
candidate = candidate.strip().lower()
if candidate == 'iso' or match('[a-z][a-z]', candidate):
if candidate == 'iso' or candidate == 'tlc' or match('[a-z][a-z]', candidate):
countries.append(candidate)

return countries
Expand Down
1 change: 1 addition & 0 deletions yaml/boundaries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ global:

- &ne_localized_kind_properties
'kind:iso': {col: fclass_iso }
'kind:tlc': {col: fclass_tlc }
'kind:ar': {col: fclass_ar }
'kind:bd': {col: fclass_bd }
'kind:br': {col: fclass_br }
Expand Down
2 changes: 2 additions & 0 deletions yaml/places.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ global:
wikidata_id: {col: wikidata}
disputed_by: {col: disputed_by }
'place:ISO': { col: 'place:ISO' }
'place:TLC': { col: 'place:TLC' }
'place:AR': { col: 'place:AR' }
'place:BD': { col: 'place:BD' }
'place:BR': { col: 'place:BR' }
Expand Down Expand Up @@ -83,6 +84,7 @@ global:

- &alternate_fclass
fclass_iso: { col: fclass_iso }
fclass_tlc: { col: fclass_tlc }
fclass_ar: { col: fclass_ar }
fclass_bd: { col: fclass_bd }
fclass_br: { col: fclass_br }
Expand Down

0 comments on commit b51e372

Please sign in to comment.