Template for standard road lock schemes

Moderator: Unholy

Template for standard road lock schemes

Postby qwaletee » Mon Dec 29, 2014 9:13 pm

I am about to update a bunch of state pages in my area to include the locking standards, and realized that it is pretty repetitive and could benefit from a template. There's one out there for the Northeast (non-New England), but otherwise, I don't see any out there, so I'm going to go ahead and create one. I could just create a one-off template for New England, but I figured, it might be beneficial to

1) Find out if we would like to standardize on a format, and should it be the Northeast template

2) Find out if we have any standardized locking assignments out there (from the last discussion I recall seeing, not every area has a standard, but most that do are statewide and consistent across road types except ramps)

3) Create a flexible template that can handle a few different options

4) Have one or a few fully standard sets, e.g., Fw,MH,mH,PS,S= 5,3,3,1,1 / 5,4,3,2,1 / 5,5,4,3,1 / 4,3,2,1,1

Any thoughts or should I just get to it and we'll see how it plays out later?

My starting points:

1) All of New England has a standard scheme of 4,3,2,1,1,+R:HC (ramp:highest connection) - I could just make a template for this alone
1a) Could be used as-is including section titling, or just the table, or table with optional/standard text blobs.
1b) Also consider railroad/ferry as required/optional parts of the template, since they're here.

2) All of the "Northeast" region has 5,4,3,2,1 except NYC which has 5,5,4,3,1 - if not for the odd exception in there, the template could be the same, just have to be ambitious enough to make the different lock numbers parameterized, then re-use for any state that standardizes locking by segment type. Or not - each unique combination could just be a template.

3) If I'm ambitious, I could have a single template that support one or two exception areas within the state. Then the exact template could be used almost anywhere that binds segment types to a lock level.

4) if there are schemes that don't involve segment type alone, do we need to account for that? Does anyone know of any?

5) Template naming - the Northeast one uses USA/Northeast/Locking standard. Depending on how it is used, we sometimes use regional template naming in the (main) namespace, and sometimes use the "Template:" namespace. I suspect that the best use in this case would be to use Template space for the main (lowest level) template, but allow regional templates that built on it to use the :USA/REGION naming.

Thoughts? Or just go for it?
US Champ / Country Manager | State Manager NY, NJ, PA, CT, MA, RI, VT, ME, NH | Northeast ARC | Mentor | Responding to Map Issues
qwaletee
US Waze Champs
US Waze Champs
 
Posts: 2936
Joined: Wed Feb 13, 2013 1:42 am
Location: NYC Metro - Active throughout NE^2 (Northeast & New England)
Has thanked: 235 times
Been thanked: 1134 times

Re: Template for standard road lock schemes

Postby kentsmith9 » Tue Dec 30, 2014 7:39 am

My opinions:

1) I'm fine with that format overall.

2) I believe we came up with a Southwest standard. Details are in the Southwest forum on locking standard if you want to see the history.

3) Seems like it might be better to allow the master template to be programmable as it is called and then each state can create a template with the locks set to a particular rank to keep consistent in all uses and simplifies future updates to a single template update for that state.

Then on your template naming proposal, this template is an example that I would propose is based on the main namespace like {{:USA/Region/...}}. I am open to using the standard Template namespace if people are confused, but the template specific namespace was primarily being used for templates that control content formatting and similar instances, but not typically for content guidelines. If this is unclear I can give examples.
USA: Now Idaho; previously California (Northern, SF/SJ)

[ img ][ img ][ img ][ img ][ img ][ img ]
PLEASE READ: Waze Map Editor (Start Here) | Editing Quick-start | Best Practices | Junctions
kentsmith9
Waze Global Champs
Waze Global Champs
 
Posts: 5667
Joined: Mon Apr 23, 2012 3:33 pm
Location: Boise ID and SF/SJ Bay Area of Northern California
Has thanked: 1565 times
Been thanked: 1775 times

Re: Template for standard road lock schemes

Postby qwaletee » Tue Dec 30, 2014 6:10 pm

I would like to propose that any template that is intended for use beyond a USA audience should go in Template space.

I will look around for the SW locking info and see whether it meshes with h=the NE or whether I need to do reconciliation.
US Champ / Country Manager | State Manager NY, NJ, PA, CT, MA, RI, VT, ME, NH | Northeast ARC | Mentor | Responding to Map Issues
qwaletee
US Waze Champs
US Waze Champs
 
Posts: 2936
Joined: Wed Feb 13, 2013 1:42 am
Location: NYC Metro - Active throughout NE^2 (Northeast & New England)
Has thanked: 235 times
Been thanked: 1134 times

Re: Template for standard road lock schemes

Postby kentsmith9 » Tue Dec 30, 2014 9:18 pm

qwaletee wrote:I would like to propose that any template that is intended for use beyond a USA audience should go in Template space.

I don't think the location of use should be the deciding factor, but clearly a worldwide use should not be located in {{:USA/TEMPLATENAME}}.

I can see how this template could be argued as something fit for the template space, but not simply because it is used worldwide.
USA: Now Idaho; previously California (Northern, SF/SJ)

[ img ][ img ][ img ][ img ][ img ][ img ]
PLEASE READ: Waze Map Editor (Start Here) | Editing Quick-start | Best Practices | Junctions
kentsmith9
Waze Global Champs
Waze Global Champs
 
Posts: 5667
Joined: Mon Apr 23, 2012 3:33 pm
Location: Boise ID and SF/SJ Bay Area of Northern California
Has thanked: 1565 times
Been thanked: 1775 times

Re: Template for standard road lock schemes

Postby qwaletee » Wed Dec 31, 2014 4:07 am

I spent a few minutes looking for a discussion of Southwest locking. I think I now have a working solution using two templates.

Template:Lock Standard State - https://wiki.waze.com/wiki/Template:Loc ... _State/doc

Simplifies maintenance of pages that call the other template. You can simply {{Lock Standard State|NM}} for example. It doesn't take out all the work of calling the other template, it just shifts it over so it is less likely to break, easier to read or move around wiki source on the state page, etc.

Template:Locking Standard

This one is the guts of the system, and allows you to use all defaults (happens!! to match the New England template that kicked this off). But the defaults are all override-capable -- you can remove or change the lede paragraph, table caption, and individual values. If you have different standards in different areas of the state, you can specify up to three columns of lock values to be shown... and you only have to specify values for the two latter columns where they differ from the first.
US Champ / Country Manager | State Manager NY, NJ, PA, CT, MA, RI, VT, ME, NH | Northeast ARC | Mentor | Responding to Map Issues
qwaletee
US Waze Champs
US Waze Champs
 
Posts: 2936
Joined: Wed Feb 13, 2013 1:42 am
Location: NYC Metro - Active throughout NE^2 (Northeast & New England)
Has thanked: 235 times
Been thanked: 1134 times

Re: Template for standard road lock schemes

Postby qwaletee » Mon Jan 05, 2015 6:43 pm

Still looking for feedback before I release to the wild.
US Champ / Country Manager | State Manager NY, NJ, PA, CT, MA, RI, VT, ME, NH | Northeast ARC | Mentor | Responding to Map Issues
qwaletee
US Waze Champs
US Waze Champs
 
Posts: 2936
Joined: Wed Feb 13, 2013 1:42 am
Location: NYC Metro - Active throughout NE^2 (Northeast & New England)
Has thanked: 235 times
Been thanked: 1134 times

Re: Template for standard road lock schemes

Postby qwaletee » Wed Jan 07, 2015 4:47 am

OK, I guess it is going live!
US Champ / Country Manager | State Manager NY, NJ, PA, CT, MA, RI, VT, ME, NH | Northeast ARC | Mentor | Responding to Map Issues
qwaletee
US Waze Champs
US Waze Champs
 
Posts: 2936
Joined: Wed Feb 13, 2013 1:42 am
Location: NYC Metro - Active throughout NE^2 (Northeast & New England)
Has thanked: 235 times
Been thanked: 1134 times

Re: Template for standard road lock schemes

Postby PesachZ » Thu Jan 08, 2015 11:51 am

Hey great work, I love it, but still needs some polishing.

I tried to use this last night and found the doc pages very confusing, not clearly delineated, and not all parameters identified.

I also think we're need some more colspans in there if the locks are identical across different columns. The ramp lock especially if the default is used, makes the table very wide.

I think with some clever if statements the colspan can be automatic.

Ferry and RR are not ankle to be individually set by regional column, is this by design? Why?

Sent using Tapatalk for Android 4.4.2
PesachZ
Wiki Master
Wiki Master
 
Posts: 4507
Joined: Mon Jul 01, 2013 12:51 am
Location: NY, USA (also NJ sometimes) {GC}
Has thanked: 1997 times
Been thanked: 2352 times

Re: Template for standard road lock schemes

Postby qwaletee » Thu Jan 08, 2015 6:46 pm

For documentation, I provided the rough information. It could definitely use some work. I'm not too worried about the core template (Locking Standard) because I think its doc is OK AND I think in most cases this template would not be used by end users. The Lock Standard State "shell" template would be used instead, because less-technical editors can simply hand off the hard work to someone who knows how to deal with templates. The Lock Standard State documentation needs a lot of work. All the parameters to the core template are fully and clearly documented, though they are pain to use if you have many deviations from the default lock levels. Using the State shell template is comparatively simple: If your area is already defined, just pass the area name as a parameter, e.g., {{Lock Standard State|NORTHEAST}}. If your area is not already defined, then someone who understands the core template has to develop the correct call to the core template, and stuff it in to the shell template with the area name. Ask your wife - stuffing shels takes effort, consuming them is easy and pleasant.

Colspans - complex topic, see below.

As to Ferry and RR, I thought we set a national standard on that. If not, it isn't that hard to swap the fixed values there now for a variable option, with the same three columns as the other types.

Back to colspan, in all its hoary:

This is tougher than you might think, Pesach. It doesn't require any cleverness, just a lot of extra code. Wiki template logic is quite awkward. You don't have any variables (other than the passed parameters), so you have to repeat your full logic statement every time you use it. In this case, you have to play two sets of logic - does the column exist at all, and if so, does it repeat (and how)

For example, this is the existing freeway line definition:

Code: Select all
| {{Freeway}}
| {{{Fwy|4}}}{{#if:{{{title2|}}}|{{!}}{{!}}{{{Fwy2|{{{Fwy|4}}}}}}}}{{#if:{{{title3|}}}|{{!}}{{!}}{{{Fwy3|{{{Fwy|3}}}}}}}}


Let's say to simplify it, we would reduce functionality to 2 columns before implementing automatic column spanning:

Code: Select all
| {{Freeway}}
| {{{Fwy|4}}}{{#if:{{{title2|}}}|{{!}}{{!}}{{{Fwy2|{{{Fwy|4}}}}}}}}


This is how it MIGHT work then (untested, probably not complete and buggy, and does not support 3 columns without lots more code):

Code: Select all
| {{Freeway}}
| {{#if:{{{title2|}}}|{{#ifeq:{{{Fwy|4}}}|{{{Fwy2|{{{Fwy|4}}}}}}|colspan=2}}{{{Fwy|4}}}{{#if:{{{title2|}}}|{{#ifeq:{{{Fwy|4}}}|{{{Fwy2|{{{Fwy|4}}}}}}||{{!}}{{!}}{{{Fwy2|{{{Fwy|4}}}}}}}}}}


That unreadable glob has to be tested, fixed, repeated across all 6 driveable road types, modified for the defaults of each type (which is repeated about five times each), and for the specific variables for each of those types (repeated about 10 times each). That's about 300% of the prior code to do so.

Now, if we wanted to add the third column back, we would have to be repeated that type of code extension, except that logic is even more tortured due to the fact that all three could be the same, or the first and third could be the same, or the second and third. I'd estimate about 25x the current code to complete that.

Right now, I'm not ambitious enough to fix that for the sake of an appearance improvement that is a nice-to-have, not a "need," and could be added in later without breaking anything.

You might be thinking, OK, so go for two columns with a better appearance first, third column later. I don't want to do that, because I think the common use case will be urban/suburban/rural, which requires three columns. In NY, you already have NYC and elsewhere for two columns, and i suspect at some point, we're going to be gracious enough to allow northern and western NY to have New England's even lower level locks, because of the paucity of senior editors and the immaturity of the map.

If we had Lua added to the Wiki, more normal programming could be done, and I could spin this out in a jiffy. Readable code, reuse of code for each row.
US Champ / Country Manager | State Manager NY, NJ, PA, CT, MA, RI, VT, ME, NH | Northeast ARC | Mentor | Responding to Map Issues
qwaletee
US Waze Champs
US Waze Champs
 
Posts: 2936
Joined: Wed Feb 13, 2013 1:42 am
Location: NYC Metro - Active throughout NE^2 (Northeast & New England)
Has thanked: 235 times
Been thanked: 1134 times

Re: Template for standard road lock schemes

Postby PesachZ » Thu Jan 08, 2015 6:51 pm

The repeated nested of statements was exactly the cleverness I'm referring to. We could draw the code in a spread sheet to assist in filling all the variable, then copy it back into the template.

Sent using Tapatalk for Android 4.4.2
PesachZ
Wiki Master
Wiki Master
 
Posts: 4507
Joined: Mon Jul 01, 2013 12:51 am
Location: NY, USA (also NJ sometimes) {GC}
Has thanked: 1997 times
Been thanked: 2352 times

Next

Return to Wiki Updates and Discussion

Who is online

Users browsing this forum: No registered users