Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIXME=* -> fixme=* #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions n50osm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,7 @@ def create_border_segments(patch, members, gml_id, match):
'type': 'LineString',
'coordinates': patch[ start_index : end_index + 1],
'members': [],
'tags': { "FIXME": "Merge" },
'tags': { "fixme": "Merge" },
'extras': {
'objekttype': 'KantUtsnitt'
},
Expand Down Expand Up @@ -1857,9 +1857,9 @@ def traverse_streams (end_junction, stream, min_ele, branch):
if "decline" not in feature:
if elevations[ feature['coordinates'][0] ] is not None and elevations[ feature['coordinates'][-1] ] is not None:
ele_diff = elevations[ feature['coordinates'][0] ] - elevations[ feature['coordinates'][-1] ]
feature['tags']['FIXME'] = "Please check direction (%.2fm decline)" % ele_diff
feature['tags']['fixme'] = "Please check direction (%.2fm decline)" % ele_diff
else:
feature['tags']['FIXME'] = "Please check direction"
feature['tags']['fixme'] = "Please check direction"
check_count += 1
if "reversert" in feature['extras']:
reverse_count += 1
Expand Down Expand Up @@ -1922,7 +1922,7 @@ def get_ssr_name (feature, name_categories):
if len(alt_names) > 1:
if name != place['tags']['name']:
alt_names.insert(0, "%s [NVE]" % name)
feature['tags']['FIXME'] = "Alternative names: " + ", ".join(alt_names)
feature['tags']['fixme'] = "Alternative names: " + ", ".join(alt_names)
name_count += 1
break

Expand All @@ -1939,18 +1939,18 @@ def get_ssr_name (feature, name_categories):
feature['tags'].update(found_names[0]['tags'])
feature['extras']['ssr:type'] = feature['tags'].pop("ssr:type", None)
if len(alt_names) > 1:
feature['tags']['FIXME'] = "Alternative names: " + ", ".join(alt_names)
feature['tags']['fixme'] = "Alternative names: " + ", ".join(alt_names)
name_count += 1

# Not able to determine only one name
else:
found_names.sort(key=lambda name: len(name['tags']['name']), reverse=True) # Select longest name
feature['tags'].update(found_names[0]['tags'])
feature['extras']['ssr:type'] = feature['tags'].pop("ssr:type", None)
feature['tags']['FIXME'] = "Consider names: " + ", ".join(alt_names)
feature['tags']['fixme'] = "Consider names: " + ", ".join(alt_names)

# Create separate nodes for each alternative name
if "FIXME" in feature['tags']:
if "fixme" in feature['tags']:
for place in found_names:
point = place['coordinate']
while point in nodes:
Expand Down Expand Up @@ -2041,7 +2041,7 @@ def get_category_place_names(n50_categories, ssr_categories):
if "name" in tag.get('k') or tag.get('k') in ["ssr:stedsnr", "ssr:type"]:
if tag.get('k') == "fixme":
if "multiple name" in tag.get('v'):
entry['tags']['FIXME'] = "Multiple name tags, please choose one and add the other to alt_name"
entry['tags']['fixme'] = "Multiple name tags, please choose one and add the other to alt_name"
else:
entry['tags'][ tag.get('k') ] = tag.get('v')

Expand Down