Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion siteupdate/cplusplus/classes/Route/read_wpt.cpp
Original file line numberDiff line numberDiff line change
Expand Up@@ -62,6 +62,7 @@ void Route::read_wpt
// single-point Datachecks, and HighwaySegment
w->out_of_bounds(datacheckerrors, fstr);
w->duplicate_coords(datacheckerrors, coords_used, fstr);
w->label_invalid_char(datacheckerrors);
if (point_list.size() > 1)
{ w->distance_update(datacheckerrors, fstr, vis_dist, point_list[point_list.size()-2]);
// add HighwaySegment, if not first point
Expand All@@ -76,7 +77,6 @@ void Route::read_wpt
w->label_slashes(datacheckerrors, slash);
w->underscore_datachecks(datacheckerrors, slash);
w->label_parens(datacheckerrors);
w->label_invalid_char(datacheckerrors);
w->label_invalid_ends(datacheckerrors);
w->bus_with_i(datacheckerrors);
w->label_looks_hidden(datacheckerrors);
Expand Down
14 changes: 7 additions & 7 deletions siteupdate/python-teresco/siteupdate.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -3853,6 +3853,13 @@ def run(self):
else:
coords_used.add(latlng)

# look for labels with invalid characters
if not re.fullmatch('\+?\*?[a-zA-Z0-9()/_\-\.]+', w.label):
datacheckerrors.append(DatacheckEntry(r,[w.label],'LABEL_INVALID_CHAR'))
for a in w.alt_labels:
if not re.fullmatch('\+?\*?[a-zA-Z0-9()/_\-\.]+', a):
datacheckerrors.append(DatacheckEntry(r,[a],'LABEL_INVALID_CHAR'))

# visible distance update, and last segment length check
if prev_w is not None:
last_distance = w.distance_to(prev_w)
Expand DownExpand Up@@ -3927,13 +3934,6 @@ def run(self):
or (left_count == 1 and w.label.index('(') > w.label.index(')')):
datacheckerrors.append(DatacheckEntry(r,[w.label],'LABEL_PARENS'))

# look for labels with invalid characters
if not re.fullmatch('\*?[a-zA-Z0-9()/_\-\.]+', w.label):
datacheckerrors.append(DatacheckEntry(r,[w.label],'LABEL_INVALID_CHAR'))
for a in w.alt_labels:
if not re.fullmatch('\+?\*?[a-zA-Z0-9()/_\-\.]+', a):
datacheckerrors.append(DatacheckEntry(r,[a],'LABEL_INVALID_CHAR'))

# look for labels with invalid first or last character
index = 0
while index < len(w.label) and w.label[index] == '*':
Expand Down