[osm] don't bother with the R-tree check if there are no name:* tags in border data set
This commit is contained in:
@@ -581,6 +581,9 @@ def build_toponym_training_data(language_rtree, infile, out_dir):
|
||||
writer = csv.writer(f, 'tsv_no_quote')
|
||||
|
||||
for key, value in parse_osm(infile):
|
||||
if not sum((1 for k, v in value.iteritems() if k.startswith('name:'))) > 0:
|
||||
continue
|
||||
|
||||
try:
|
||||
latitude, longitude = latlon_to_floats(value['lat'], value['lon'])
|
||||
except Exception:
|
||||
|
||||
Reference in New Issue
Block a user