Highlight badly named roads (UK)

You may be familiar with my script that Highlights for Segments & Landmarks (latest version is v1.6, updated Feb 2013).

I’ve included a special feature for the UK which also highlights roads that have been named incorrectly, mainly regarding abbreviations. Turn on the ‘No name’ option, and badly named roads will be highlighted in orange dashes. UK only - thanks to dknight212 for the idea, and most of the rules.

Coupled with Twisters road naming script that pulls in OS OpenData, residential areas can be cleaned up and completed very efficiently.

Please let me know how this works for you, and any changes that need to be made to the rules.

At the moment, this is an ‘easter egg’ that only appears for UK roads. I’m not sure how or if I’m going to support this long term, or internationally.

Excellent job, as always. Where was this last week when I was correcting about 500 streets in the Bexley area with no abbreviations? :wink:

Works very nicely, thank you.

I have a thought: could you and TwisterUK share the code? This would avoid inconsistencies and duplication of work.

I haven’t looked at the source code for his script, but it probably has a function that takes an OS name as input and returns the properly abbreviated & capitalised name. Your script could simply run the existing name through the same function and see if it changes.

Tim, can you tweak the naming check to handle “good” names which have road number prefixes.

e.g. https://world.waze.com/editor/?zoom=6&lon=0.00047&lat=51.63101&layers=BFTFFTTTFTTFTFFTFTTTTFT - “A110 - The Green” is being highlighted here…

You’ll also need to extend the goodNames list to encompass all the possible combinations of “The…” followed by one of the naming elements we have a defined abbreviation for. The current OS data lists at least one of each of the following:

The Avenue
The Boulevard
The Broadway
The Circus
The Close
The Court
The Crescent
The Drive
The Garden
The Gardens
The Green
The Grove
The Lane
The Mount
The Place
The Park
The Ridge
The Square
The Street
The Terrace
The Valley
The By-pass

Some really imaginative road naming going on around the country, clearly…

What do we do about names like “The Orchard On The Green” (https://world.waze.com/editor/?zoom=6&lon=-0.4561&lat=51.64954&layers=BFTFFTTTFTTFTFFTFTTTTFT)? Should this be abbreviated to “The Orchard On The Gn”, which to me looks completely wrong (and is also then at odds with the adjacent “The Green”, from which “The Orchard On…” name is derived, or should it be left alone even though it isn’t a simple “The…” name form? My script currently doesn’t abbreviate it (or any other similarly formed name), as it ignores any potentially abbreviated name elements if they’re immediately prefixed by “The” regardless of whether or not the “The” is then prefixed by anything.

Updated to v1.5.2

  • Highlight roundabouts with names
  • Highlight lower case names or ending in a full stop (.)
  • Tidied up the patterns, and included all the ‘good’ ones from Twister

Going forward, I have 4 possible options for this feature (in order of increasing difficulty):

  • keep it as a hard-coded easter egg for UK editors
  • hand it over to Twister so he can implement it in his road naming script (UK only)
  • move the patterns into a separate addon script for other country communities to edit
  • maintain a complete list of bad name patterns on a central server, with support for other countries

Whilst the new addition for badly-named roads is great, it has been causing me some really annoying problems selecting roads. I’ve just worked out what the problem is, although I don’t know if it can be fixed.

The badly-named segment is highlighted with orange dashes - and you can only select or mouse-over on the orange segments. If you mouse-over the non-orange bits, the segment doesn’t turn blue and you can’t select the segment.

Hmmm, yes - I see what you mean. I’ll see if I can make the dashes longer than the gaps…
…unless anyone can suggest a good colour to use? I’ve run out of unique ones I think.

It’s a problem. I’ve been hacking at the colours myself, trying to find something different for locked roads (which are mostly dark red primary highways - poor contrast with red).

I don’t know how the highlighting strokes are drawn, so I don’t know if you can alternate two colours, instead of on-off?

Alternatively, I see indications in the script for stroke width. Could you use 2 strokes? A wide, semi-transparent stroke in one colour, then an 1 pixel solid stroke above it, in either the same or a contrasting colour? If it doesn’t look too horrible, it should increase your palette of highlighting combinations and reduce the problems of contrasting with the existing colours.

All ramps have been highlighted as wrong name. Can it be corrected?

Updated to v1.5.3

  • Made the dashes longer and narrower, to aid selecting
  • Fixed issue with ramps being incorrectly highlighted

This hidden feature is now part of the latest public release: Highlights for Segments & Landmarks - v1.6

:ugeek:

Tim, the ‘filter by city’ is amazingly useful - thanks for including it in the < L3 version.

Incorrect name function is also brilliant. I have noticed quite a few Saint streetnames around the place (yes, this old can of worms again) instead of St. - would a rule to highlight these be useful in the next version, or maybe once the TTS is fixed (going blue holding breath)?

David