Skip to content

Commit

Permalink
fix: Set title and label always
Browse files Browse the repository at this point in the history
  • Loading branch information
rsavoye committed Oct 9, 2023
1 parent 01b6ca7 commit 68c6f0a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions osm_fieldwork/filter_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ def cleanData(self,
for feature in indata['features']:
properties = dict()
for key, value in feature['properties'].items():
log.debug(f"{key} = {value}")
# if key in self.keep:
if False:
# log.debug(f"{key} = {value}")
# FIXME: this is a hack!
if True:
if key == 'tags':
for k, v in value.items():
if k[:4] == "name":
Expand All @@ -166,8 +166,13 @@ def cleanData(self,
else:
if key == 'osm_id':
properties['id'] = value
properties['title'] = value
properties['label'] = value
else:
properties[key] = value
if key[:4] == "name":
properties['title'] = value
properties['label'] = value
else:
if key in keep:
properties[key] = value
Expand Down

0 comments on commit 68c6f0a

Please sign in to comment.