[Script] Junction Box Utils

Introducing Junction Box Utils!


Attention all Waze Map Editors!
I am thrilled to announce the arrival of Junction Box Utils, a powerful new script designed to enhance your experience with Junction Boxes in the Waze Map Editor.
Whether you’re familiar with its predecessor, “Roundabout JB”, or encountering it for the first time, Junction Box Utils offers a host of features to optimize your editing workflow.
Installation
A script manager (for example, Tampermonkey) is required to install this script. After installing the script manager of your choice, use this link to add the script to it.


Streamlined Roundabout Geometry
Say goodbye to unsightly Junction Boxes misaligned with roundabouts. With Junction Box Utils, recreating the precise roundabout shape and seamlessly applying it to the Junction Box is effortless.


Usage:Simply create a new junction box over a roundabout (JuBra) and select “Roundaboutize” from the properties panel.

Effortless Backup and Restore
No more manually recreating junction boxes and risking data loss. Junction Box Utils simplifies the process with its intuitive backup and restore feature. Select the junction box to delete, hit “Backup properties”, proceed with deletion, then effortlessly restore all settings — including name, address, turn restrictions, guidance, and lanes — when recreating the junction box. Plus, Backup/Restore isn’t limited to roundabouts — it’s a versatile tool for any junction box.
Usage: Select a junction box to backup its properties via a designated button in the edit panel. Recreate the junction box and use the appropriate button to restore its properties.
Limitations

  • Only available if the topology (the segments constructing the junction box) hasn’t been changed. This means you can do whatever you want, except including/excluding segments. Changing the ID (merging/splitting) of those segments will affect the topology as well.
    Simplified Roundabout Normalization
    Tired of manually adjusting voice prompts for every entry segment? Junction Box Utils streamlines the process into a few-click solution, making normalization or denormalization of roundabouts a breeze.
    Usage: Create a Junction Box over Roundabout (JuBRA), select an entry segment, and use the appropriate button from the edit panel to apply the desired action (Normalize/Denormalize). All exits for the selected entry segment will be affected.
    Normalize - Apply turn right/left, continue straight, and make U-turn instructions to a roundabout.
    Denormalize - Apply “count exits” instructions on a roundabout.

Contribute to Junction Box Utils!
Junction Box Utils is a collaborative effort, and contributions from the Waze Map Editor (WME) community are welcomed.
Here’s how you can get involved:

Translation Efforts
If you’re a user of WME who operates in a language other than English, your expertise is invaluable! Help make Junction Box Utils accessible to more users by becoming a translator.

Feature Suggestions and Feedback
Have ideas for new features or improvements? I’d love to hear from you! Share your suggestions and feedback to help me continue enhancing Junction Box Utils and making it even more valuable for WME editors.

Bug Reports
Encountered a bug or glitch while using Junction Box Utils? Let me know! Your bug reports help me identify and address issues promptly, ensuring a smoother experience for all users.

Credits
Huge thanks to everyone who has made this script possible and better!
Thank you guys, you are awesome!

@P5YDUCK :israel: - As the one who has come up with this idea, without you this script wouldn’t exist
@zeze13 :israel: - The number of hours you’ve spent making this script better is invaluable
@linguasaltitante :portugal: - Portuguese translations
@cedricvondk :switzerland: - French translations
@DavidAbarca :mexico: - Spanish translations
@JCNina :uruguay: - Spanish translations
@witoco :chile: - Spanish translations
@Ge1oN :ukraine: - Ukrainian translations
@TurfTurf :it: - Italian translations
@Proffa71 :finland: - Finnish translations
@voyadexon :de: - German translations

5 Likes

Glad to see you released the script! Very useful!

Thanks r0den :slight_smile:

There seems to be some problem with roundabout lanes from Beta WME.
If you back up and then restore on a roundabout with lane instructions, these are deleted

Hi, it seems to work for me just as perfectly as it should, both for roundabouts and other junctions.
Can you send a PL to the roundabout you tried and it didn’t work for you? Do any other JB properties have been restored (like turn instructions).

I’ve arranged the instructions on the roundabout, then I’ll try another one and see if it works, otherwise I send the PL

Spanish is almost ready. I left a comment about a string…

1 Like

The “normalize” does not work on this RB: https://www.waze.com/it/editor?env=row&lat=43.08689&lon=13.80607&s=31062289717246&zoomLevel=20&bigJunctions=92868

Coming from the minor on the left, I get the right turn set to “continue”, straight is set as “turn left”, left is “u-turn” and the u-turn is “turn right”.

I also received similar feedback from Portugal.
This is because of the last geometry joint of the entrance segment and first geometry joint of the exit segment. I noted to myself both cases to overcome this issue and tune the algorithm to work well with these cases as well

A new version has been released!

New features

  • Normalization and Denormalization are now also available when hovering the immediate turn arrow entering the roundabout
  • Backup/Restoration functionality for modified-topology Junction Boxes (Phase 1) - You can now restore a snapshot to a Junction Box with new entrances/exits, in phase 1 those will be completely ignored.

Enhancements

  • Translations are now updated over the air. Want to become a translator? Click here!
  • Newly supported languages: French, Spanish, Ukrainian, Italian, and Finnish.

Known issues

  • Normalization sometimes picks the wrong instruction when the entrance/exit segments are slightly curved. It works best for segments meeting the roundabout at a 90° angle.

Download

Seems that translation to Spanish is not correctly applied if you set “Español (A.Latina)” on WME2024-05-12_213336.jpg
2024-05-12_213411.jpg

Hi, thanks for pointing it out.
I’ve made a few changes on the localization platform and released the translations. Could you please make sure that it works now?

Thanks!
Seems to be perfect now!

Want to deepen in the notes for this release? View the full Release Notes.

For those who have chosen to stay with the shorten version of these notes, here is a list of what have been changed.

  • We have new bug fixes and compatibility improvements.
  • The script now supports automatic restoration of backup snapshots when creating a Junction Box, if a matching snapshot exists.
  • Junction Boxes with Updated Topology (Phase 2) is now live - restoration is now available for turns of junction boxes that have been extended.
  • Turns that couldn’t be entirely restored are shown in a new “Unverified turns” section.
  • The script is now available in German thanks to @voyadexon.

Download

Important hotfix!
Due to a technical mistake, I actually deployed an outdated version :person_facepalming:
So we are going on with version 2.2.1 which should be the correct one.

Sorry for the inconvenience it might have created for you!

Download

Hi everyone!
Working on a new feature - I need your help.

Before we could alter the turn guidance on the turn, we had to set segment names to the guidance we wanted to achieve (for example, we had a segment with the name “To I-25”.

Now speaking of those legacy segments, what prefixes were you using?
For example, in Israel, because a single letter here represents the word “To”, we have a few variations of it with the major difference being the existence of a dash/space characters (“ל25”, “ל-25”, “ל- 25”, “ל 25” are all valid for this purpose and the prefixes are “ל”, “ל-”, "ל- ", "ל ").
For the US it probably would be just "To ".

So please, list all prefixes your country uses.

We don’t use prefixes in the countries I edit in (Ireland, Greece, Cyprus).

Only the road shield? What about ramps leading to a road with a road shield?

Australia uses either “Exit” or “to” on our ramps. We also use route numbers on segments (list in link).

Hold on, maybe I got a bit confused…

We do use prefixes for major roads on/off ramps, but wasn’t your question only about segments exiting roundabouts?

Not really :slight_smile:

The intention is to pull roadshields from segments for far turns in a junction box, similarly to what Waze do natively with immediate turns. If someone is unaware of that, for immediate turns, if the segment has a roadshield, and the text of the road shield is presented in the beginning of the segment’s name, then Waze will replace that part of the string with the actual road shield. However, this behavior isn’t enabled for far turns, and those will present the segment name in plain string. Waze also take into account prefixes we might use before the road shield text, and those prefixes will be trimmed out of the result.
For example (I’ll bring one from Israel but will explain it in English), previously, way before changing guidance was an option, to create customized guidance we were creating segments with the prefix “To”, followed by the destinations you would see on the signs above the road. On ramps it is common to have a road number presented, and these roads also have a road shield. For the example being let’s name it road 25, it might also have a direction, for example south. Ramps leading to that road usually have names like “To 25 South, Destination 1, Destination 2”. And if that segment had a road shield for that 25, it would natively replace the instruction with “{25} South, Destination 1, Destination 2”, note that the 25 in the brackets is the road shield, and that the “To” prefixes has been excluded from the result.

So, the initial question was: What prefixes have you used (or continue to use) to surface precise guidance by only using the segment names, and you think is redundant when you use the actual override instructions features.

Hope it makes it clear :wink: