Get a sneak peek at whats next for Permanent Hazards on our April 7th Office Hours!
Discussion for the unofficial, community-developed addons, extensions and scripts built for the Waze Map Editor.

The official index of these tools is the Community Plugins, Extensions and Tools wiki page.

Post Reply
Forum rules
Discussion for the unofficial, community-developed addons, extensions and scripts built for the Waze Map Editor.

DO NOT START a new thread unless it is about a new idea. Keep discussion of existing tools within the main thread for that tool.

The official index of these tools is the Community Plugins, Extensions and Tools wiki page.

[Script] WME Advanced Closures

Post by
Original Script Thread

The original author, dummyd2, of this script stepped away from Waze and left the future maintenance to the WazeDev group. The below description is copied from the original script thread.

Install the WazeDev maintained version from the new Greasyfork: https://greasyfork.org/en/scripts/370072-wme-advanced-closures


The script adds a tab (slashed road) in the left panel, and a highlight on the map.

In the panel:
a button "add advanced closure"
a button "parse CSV" with a log console.

In the closure panel of a segments selection: a button "add advanced closure".
  1. Add advanced closure

    opens a window to generate recurrent closures.
    The window is draggable through its title. To reset the position, click again the button.
    • Range (start date and end date) is the time range on which all closures will apply. In other words, the script will not generate closures before and after this range.
    • Start and duration:
      start is the start time of the closure un a day
      duration is the duration of the closure
    • Description: free text
    • Direction: on a multiple selection, it is the same direction as shown on the map.
    • Ignore traffic
    • (new in V1.1) MTE: MTE list of MTE loaded in WME and whose dates overlaps the defined range
    • Then, choose a tab:
      • Repeat:
        • Times: the closure count
        • Every: duration between the start date/time of a closure and the start date/time of the text closure
      • Each:
        day of the week of the start date/time (if the duration exceeds midnight, the end date/time will be the next day (or some days after), the closure will be applied even if the day of the closure end is not checked)
      • (new in V1.1) Holidays: holidays list based on holidayapi.com. You must select at least 1 segment before to detect the country, and then, click on "Refresh holidays". If your country is not supported, you can contribute to holidayapi.com. The country abbreviation in WME is not the same as holidayapi.com. So we may need to translate it in the code to get it work. Let us know!
    • The save tab allows you to save all presets but the range and MTE, and to load them.
      New in V1.1: closure details loaded from an existing closure: select 1 segment. If more than 1 segment is selected, closures a read from the first segment only.
    • Once all set correctly, the preview area will show all closures ready to apply. It shows error messages and an orange warning if a closure overlaps on an existing closure, and if a closure is not included in dates of the selected MTE (tooltiptext for details).
    • Select segments
    • Then, apply. The preview will print OK or error messages. Before clicking on apply, choose the right tab (Repeat or Each). After the process, the script will select all segments and open the closure tab in the left panel.
    Cases studies:

    Every day from 12:00 to 14:00 between 13/06 and le 26/06 included
    range: 2016-06-13 -> 2016-06-26
    start: 12:00
    duration: 2:00
    Repeat: 500 times (the script will not create closure after the range end)
    Every: 24:00

    From monday to friday, from 20:00 to 06:00 the next day, from June to December:
    range: 2016-06-01 2016-12-31
    start: 20:00
    duration: 10:00
    Each: mon, tue, wed, thu, fri
  2. CSV

    apply closures defined in a CSV file.
    New in V1.1: added a column (requiered) MTE ID before 'comment'. Keep empty if no MTE.
    Format:

    Code: Select all

    header,reason,start date (yyyy-mm-dd hh:mm),end date (yyyy-mm-dd hh:mm),direction (A to B|B to A|TWO WAY),ignore trafic (Yes|No),segment IDs (id1;id2;...),lon/lat (like in a permalink: lon=xxx&lat=yyy),zoom (2 to 10),MTE ID,comment (optional)
    add,"Closure test, by dummyd2","2016-05-27 00:00","2016-05-28 00:00","A to B",Yes,"297004533;297004532","lon=25.53629&lat=-76.47602",6,
    add,"Closure test 2, by dummyd2","2016-05-29 00:00","2016-05-30 00:00","B to A",No,"297004533;297004532","lon=25.53629&lat=-76.47602",6,,It's cold here...
    
    • If the fisrt column starts with 'add' or 'remove', it is processed by the script. (new in V1.1: remove is now supported)
    • Any other keyword is ignored, including 'header'.
    • The, the format is described in the header.
    • You must ensure that the map zoom is wide enough to "see" all segments. So, the same CSV can work fine on a screen with a big resolution and doesn't work on another computer with a lower resolution.
    1. Open CSV file
    2. The closure list will display under the button
    3. You can test segments: check all closures and click on "check segments". The script will simulate a map move on the lon/lat positions and zoom provided in the CSV, check if segments exists, if you have permissions to make closures on it, and warn you if your closure will overlap an existing closure.
    4. On each closure:
      • target will move the map and select segments (will not apply the closure)
      • the arrow -> will move the map and apply the closure (will not select segments)
    5. Click 'Apply' to apply all checked closures
    If texts are cut, see the tooltiptext
    A mini-log under each closure displays informations about the closure itself. The log under the list is global to all closures.

    BE CAREFUL: closures are applied on segments ONE BY ONE. This means the direction A->B (or B->A) is not always the one shown on WME when selecting multiple segments!
    So if you have more than one segment to close in one way, you may need to setup 2 closures: one with segments A->B, and another with segments B->A.
  3. Highlight
    Closures made by this script are identified by a non-breaking space added at the end of description. If so, the script adds a "road" icon on the map. This non-breaking space is invisible on the app.

POSTER_ID:17577246

1

Send a message

Post by aamazotr
sirgabouy wrote:I did it!
only load if WME Route Speeds (MapOMatic fork) script is activated
it doesn't work with the script installed
aamazotr
PartnerCoordinator
PartnerCoordinator
Posts: 429
Has thanked: 796 times
Been thanked: 335 times
Send a message


Post by abc1357
Link to MTE is also not working. Even though I set the correct MTE in the Link to MTE field, after saving, the MTE field in the Closure tab is set to none.  Also, if you select the Closure tab in the MTE, no closures are shown.

 
abc1357
State Manager
State Manager
Posts: 865
Answers: 2
Has thanked: 313 times
Been thanked: 236 times
Send a message

Post by Agapa-Yo
Hello everyone, I regularly use Advanced Closure in French. Waiting for a repair... Could you do something to make Advanced Closure usable again? Thank you.
Agapa-Yo
Waze Mentor
Waze Mentor
Posts: 224
Has thanked: 216 times
Been thanked: 54 times
Send a message

Post by Andy_Na
First, thank you for having such a powerfull tool.

Second, I got some problems using "repeat" tab. I spend up to half an hour to get it work properly.
Why do i have to enter ALL fields?

Why is a blank field invalid instead of using value 0?
In my opinion it would be much more intuitive.

third: contrast is a bit low and the distance between duration & the tabs cloud be a bit larger.

Maybe it is just me heaving troubles cause I use it only like twice a month. But perhaps it's a idea to think about.

Thanks for all the great work on every script!
Andy
Andy_Na
State Manager
State Manager
Posts: 550
Has thanked: 350 times
Been thanked: 173 times
Send a message
Bundeslandmanager/State Manager Berlin/Brandenburg
Area Manager Region Remstal, Filstal, A8 (Alb/Fildern)



https://www.ib-ziessow.de/images/waze/rip_tsd66.png

Post by arobsco
Also seeing the same issues here. Latest version I am seeing on Greasy Fork is 2023.11.22.01
arobsco
Posts: 69
Has thanked: 32 times
Been thanked: 16 times
Send a message

Post by arthurfsv
Hi all.

Hey guys, you think it is possible to add a "emergency closure" button to this script, that would launch a 24h and 2 way direction closure to every segment selected?

We are working with some CCP partners with emergency road closures during floods, and this would be a fast way to add them with permalinks.

Thanks!
arthurfsv
Emeritus Local Champ
Emeritus Local Champ
Posts: 1138
Has thanked: 200 times
Been thanked: 352 times
Send a message
Arthur Fernando
AM - Belo Horizonte (Região oeste, centro e centro-sul)

É iniciante nas edições? Confira estes links básicos: manual, guia e práticas.

Quer melhorar a organização dos Places? Veja esta proposta

Post by atrophicshiner
BtBalways wrote:
vince1612 wrote:
theMadcabbie wrote:Same here in the UK - adding some days and not others, and adding one way and not the other
Noticed that too yesterday
Ditto today.
This isn't the fault of Advanced Closures but the current bug in adding closures in WME.
atrophicshiner
Waze Local Champs
Waze Local Champs
Posts: 5990
Answers: 8
Has thanked: 1600 times
Been thanked: 2327 times
Send a message
- Chris - (Catching up with the Ia{i}ns one Chris at a time)

https://cottagepi.uk/proud-wazer.gifhttps://cottagepi.uk/pirate.pnghttps://cottagepi.uk/Beta_app.pnghttps://cottagepi.uk/tolls.pnghttps://cottagepi.uk/Iain.png
UK Local Champ would you believe
AM the Middle bit of England
Usability | Simplicity | Retention

Post by BertZZZZ
All of a sudden, the script is working again for me.
BertZZZZ
Country Manager
Country Manager
Posts: 37
Has thanked: 23 times
Been thanked: 9 times
Send a message

Post by BtBalways
When more than one segment selected - Error message shows 'You cannot edit these segments. One or more segments may be locked or out of your editing area.' which is not valid.

My level = 3 and segments Auto(1).

Also is there an upper limit on total number of segments handled? (or it may be Chromebook not going fast enough for me!!)
BtBalways
Waze Mentor
Waze Mentor
Posts: 961
Answers: 1
Has thanked: 1021 times
Been thanked: 221 times
Send a message