Travel Mapping

Web Design Discussion => General Web Design Discussion => Topic started by: Ib3kii on June 15, 2016, 02:34:31 pm

Title: Clinched Routes Highway Shields
Post by: Ib3kii on June 15, 2016, 02:34:31 pm
Dear viewer,

As of right now, some of the shields on the clinched routes screen are just white squares with the number and the state abbreviation on the top. In the future, will the shields that are currently white become what the actual state highway shields are?

Thanks,
Title: Re: Clinched Routes Highway Shields
Post by: Jim on June 15, 2016, 03:41:10 pm
I have no plans to enhance the shield generator, but welcome contributions from anyone who'd like to do so.
Title: Re: Clinched Routes Highway Shields
Post by: si404 on June 15, 2016, 04:39:39 pm
European systems with cartouches or rectangle shields that shouldn't be too hard.

alakt - yellow with black text (no prefix)
alavt - red with white text (no prefix)
albsh - blue with white text
andcg - red with white text
armm - blue with white text
auta - blue with white text
auts - blue with white text
azem - blue with white text
bela - white with black text
belb - white with black text
belr - white with black text
bgri - blue with white text
biha - green with white text
blrm - red with white text
bgra - green with white text
bgri - blue with white text (no prefix)
bgrii - blue with white text (no prefix)
cism - blue with white text
czed - red with white text (no prefix)
dnkpr - yellow with black text (no prefix, 'O' part of number)
eure - green with white text (all regions)
espa - blue with white text
estt - red with white text (no prefix)
finkt - yellow with black text (no prefix)
finvt - red with white text (no prefix)
fraa - red with white text
fran - red with white text
frht - blue with white text
geos - green with white text (georgian alphabet prefix: ს)
glpn - red with white text
gufn - red with white text
irln - green with yellow text
kaza - green with white text
kgzem - blue with white text (cyrillic ЭМ prefix)
ltua - red with white text
luxa - blue with white text
luxb - red with white text
luxn - red with white text
lvaa - red with white text
mltt - blue with white text (no prefix)
mnem - blue with white text
mtqa - red with white text
mtqn - red with white text
ncle - red with white text
nclt - red with white text
nlda - red with white text
nldn0 - yellow with black text
norrv - green with white text (no prefix)
pola - red with white text
pols - red with white text
poldk - red with white text (no prefix)
prta - blue with white text
pyft - red with white text
reun - red with white text
rksn - red with white text
rusm - blue with white text
srba - green with white text (no prefix)
srbb - yellow with black text (no prefix)
spmn - red with white text
svkd - red with white text
svkr - red with white text
svki - blue with white text (no prefix)
svng - yellow with black text (no prefix)
svnh - blue with white text
swer - blue with white text
ukrm - blue with white text
wlft - red with white text
Title: Re: Clinched Routes Highway Shields
Post by: michih on June 15, 2016, 04:48:25 pm
deua - blue with white text
deub - yellow with black text

:)
Title: Re: Clinched Routes Highway Shields
Post by: Ib3kii on June 15, 2016, 05:01:54 pm
I have no plans to enhance the shield generator, but welcome contributions from anyone who'd like to do so.
Thank you for responding.
Title: Re: Clinched Routes Highway Shields
Post by: si404 on June 15, 2016, 06:45:58 pm
deua - blue with white text
Not a rectangle though - it has the lozenge shape.
(https://upload.wikimedia.org/wikipedia/commons/thumb/3/3a/Bundesautobahn_1_number.svg/200px-Bundesautobahn_1_number.svg.png)
Title: Re: Clinched Routes Highway Shields
Post by: michih on June 16, 2016, 06:38:59 am
deua - blue with white text
Not a rectangle though - it has the lozenge shape.
(https://upload.wikimedia.org/wikipedia/commons/thumb/3/3a/Bundesautobahn_1_number.svg/200px-Bundesautobahn_1_number.svg.png)

Ok, but deub is a rectangle (with rounded edges) :)

(https://upload.wikimedia.org/wikipedia/commons/8/80/Bundesstraße_1_number.svg)
Title: Re: Clinched Routes Highway Shields
Post by: SSOWorld on July 07, 2016, 07:26:01 pm
One should be able to splice svgs from Wikimedia Commons by digit for the US national and state routes.  These are public domain as the MUTCD defines them (by proxy to each state) - similar to how old CHM's setup was.
Title: Re: Clinched Routes Highway Shields
Post by: theFXexpert on January 04, 2017, 10:44:00 pm
Made some shields for FL, NY, PA, and SC. https://github.com/TravelMapping/Web/pull/122

There is also a bug where state routes located in a different state have additional text printed with the route number in the shield. https://github.com/TravelMapping/Web/issues/121
Title: Re: Clinched Routes Highway Shields
Post by: theFXexpert on January 06, 2017, 07:39:05 pm
Added KS, MI, MN, MO, NE (doesn't include links/spurs), NV, OH, UT, and WY shields to the pull request.
Title: Re: Clinched Routes Highway Shields
Post by: mapcat on January 06, 2017, 07:59:06 pm
Thanks for doing this!
Title: Re: Clinched Routes Highway Shields
Post by: Jim on January 06, 2017, 09:55:15 pm
I'll see if I can get these on the site tonight.  If not, when I get home over the weekend.
Title: Re: Clinched Routes Highway Shields
Post by: Jim on January 06, 2017, 10:31:58 pm
And they're live.  The ones I checked looked great, thanks!
Title: Re: Clinched Routes Highway Shields
Post by: yakra on January 07, 2017, 12:06:51 am
*that sound Homer Simpson makes when he sees a donut*
Title: Re: Clinched Routes Highway Shields
Post by: rschen7754 on January 07, 2017, 12:47:33 pm
I added MA/ME (both states use the same shield): https://github.com/TravelMapping/Web/pull/123

What are people using to minify? I used svgminify.com, but I assume there's some other method. So far I'm just pulling the shields from Wikimedia Commons, changing the number to ***NUMBER***, changing the fonts to 2014, and minifying.
Title: Re: Clinched Routes Highway Shields
Post by: theFXexpert on January 07, 2017, 01:35:56 pm
My process has been to take a commons SVG and open it in Inkscape. Save it as an optimized SVG. Then I use Notepad++ to manually strip any other unnecessary items. I wasn't aware an SVG minifier existed.
I then copy the code to the clinched.php page with Chrome's inspect element tools to check if the numbers looks alright. I usually adjust the font size to an appropriate looking size with Notepad++. It's important to add ' like so: font-family="'Roadgeek 2014 Series D'" otherwise the font won't render.

I was looking at your commits; the changes to shieldgen.php are not necessary since essentially the same code is executed in the default case. I also have an upcoming change to that file that will handle 4-digit shields in a more modular fashion.
Title: Re: Clinched Routes Highway Shields
Post by: Jim on January 07, 2017, 02:23:57 pm
This is excellent.  Please be sure to keep credits.php up to date with any new sources, which of course need to be ones that permit our project to reuse/derive.
Title: Re: Clinched Routes Highway Shields
Post by: rschen7754 on January 07, 2017, 02:46:23 pm
This is excellent.  Please be sure to keep credits.php up to date with any new sources, which of course need to be ones that permit our project to reuse/derive.

Should we list the shield templates? Unlike most Wikimedia images, these are licensed public domain since they are MUTCD, so no attribution is necessary.

We may run into trouble on some of the US toll road logos (only on Wikipedia under fair use) and a few random countries (Mexico, Australia). Most of Europe uses some form of text on a solid rectangle, and Commons has some imitation shields for Canada that don't include the copyrighted elements.
Title: Re: Clinched Routes Highway Shields
Post by: theFXexpert on January 07, 2017, 07:45:13 pm
I also have an upcoming change to that file that will handle 4-digit shields in a more modular fashion.
Now submitted -> https://github.com/TravelMapping/Web/pull/124

Also includes HI, NM, OR, and SD shields.
Title: Re: Clinched Routes Highway Shields
Post by: mapcat on January 07, 2017, 08:27:00 pm
How should we handle Tennessee? One design for all routes, or should we develop some additional code to identify routes as always primary, always secondary, and both?
Title: Re: Clinched Routes Highway Shields
Post by: mvak36 on January 07, 2017, 11:52:23 pm
Added KS, MI, MN, MO, NE (doesn't include links/spurs), NV, OH, UT, and WY shields to the pull request.

Thank You for doing that. I like it a lot. ;D
Title: Re: Clinched Routes Highway Shields
Post by: mvak36 on January 07, 2017, 11:59:57 pm
Added KS, MI, MN, MO, NE (doesn't include links/spurs), NV, OH, UT, and WY shields to the pull request.

How about these for the Links and Spurs?
https://en.wikipedia.org/wiki/List_of_Nebraska_Connecting_Link,_Spur,_and_Recreation_Highways#/media/File:N_LINK_Blank.svg
https://en.wikipedia.org/wiki/List_of_Nebraska_Connecting_Link,_Spur,_and_Recreation_Highways#/media/File:N_SPUR_Blank.svg

I got them from https://en.wikipedia.org/wiki/List_of_Nebraska_Connecting_Link,_Spur,_and_Recreation_Highways
Title: Re: Clinched Routes Highway Shields
Post by: michih on January 08, 2017, 04:44:04 am
I tried to figure out how it works. Here's my first shield: https://github.com/TravelMapping/Web/pull/126/commits/b26024db8dcbf5a149bba9dea13fd8fccac30a2f.

1. Downloaded a desired orginal file from wikimedia (https://upload.wikimedia.org/wikipedia/commons/8/80/Bundesstra%C3%9Fe_1_number.svg) (here, German Bundesstraße 1) to your local machine.
2. Upload the file to http://www.svgminify.com/
3. Press "Start"
4. Press "Download resulting SVG"
5. Open "result.svg" on my local machine with a text editor, e.g. Notepad++

Code: [Select]
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" height="120px" width="200px" version="1.1" viewBox="-100 0 200 120">
<g fill-rule="evenodd">
<rect rx="22.2" ry="22.2" height="120" width="200" y="0" x="-100" fill="#F0CA00"/>
<rect rx="18" ry="18" height="112" width="192" y="4.25" x="-95.8"/>
<rect rx="11" ry="11" height="97.5" width="178" y="11.2" x="-88.8" fill="#F0CA00"/>
<path id="PfadE" d="m-0.069 94.2v-57.2l-9.6 7v-10.3l9.6-6.9h9.7v67.4h-9.7z"/>
</g>
</svg>

6. Figure out (trial and error) the line representing the number to be deleted (deleting lines and preview in web browser by saving and double-clicking of the file or use "Launch in..." feature of Notepad++). The line to be deleted is:

Code: [Select]
<path id="PfadE" d="m-0.069 94.2v-57.2l-9.6 7v-10.3l9.6-6.9h9.7v67.4h-9.7z"/>
7. Add the following lines within <g></g> (fill element must contain the color required for drawing the number):

Code: [Select]
<text letter-spacing="0px" text-anchor="middle" word-spacing="0px" text-align="center" font-size="425px" line-height="125%" y="492.5" x="299.90381" font-family="&apos;Roadgeek 2014 Series D&apos;" fill="#ffffff"><tspan y="492.5" x="299.90381">***NUMBER***</tspan></text>
8. Check file in web browser.

Code: [Select]
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" height="120px" width="200px" version="1.1" viewBox="-100 0 200 120">
<g fill-rule="evenodd">
<rect rx="22.2" ry="22.2" height="120" width="200" y="0" x="-100" fill="#F0CA00"/>
<rect rx="18" ry="18" height="112" width="192" y="4.25" x="-95.8"/>
<rect rx="11" ry="11" height="97.5" width="178" y="11.2" x="-88.8" fill="#F0CA00"/>
<text letter-spacing="0px" text-anchor="middle" word-spacing="0px" text-align="center" font-size="425px" line-height="125%" y="492.5" x="299.90381" font-family="&apos;Roadgeek 2014 Series D&apos;" fill="#ffffff"><tspan y="492.5" x="299.90381">***NUMBER***</tspan></text>
</g>
</svg>

9. Rename file to "template_deub.svg" (bold = system name)
10. Upload to GitHub web repository "shields" folder
11. Hope and pray because I've no idea if it will work... :)
Title: Re: Clinched Routes Highway Shields
Post by: rschen7754 on January 08, 2017, 10:40:19 am
I tried to figure out how it works. Here's my first shield: https://github.com/TravelMapping/Web/pull/126/commits/b26024db8dcbf5a149bba9dea13fd8fccac30a2f.

1. Downloaded a desired orginal file from wikimedia (https://upload.wikimedia.org/wikipedia/commons/8/80/Bundesstra%C3%9Fe_1_number.svg) (here, German Bundesstraße 1) to your local machine.
2. Upload the file to http://www.svgminify.com/
3. Press "Start"
4. Press "Download resulting SVG"
5. Open "result.svg" on my local machine with a text editor, e.g. Notepad++

Code: [Select]
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" height="120px" width="200px" version="1.1" viewBox="-100 0 200 120">
<g fill-rule="evenodd">
<rect rx="22.2" ry="22.2" height="120" width="200" y="0" x="-100" fill="#F0CA00"/>
<rect rx="18" ry="18" height="112" width="192" y="4.25" x="-95.8"/>
<rect rx="11" ry="11" height="97.5" width="178" y="11.2" x="-88.8" fill="#F0CA00"/>
<path id="PfadE" d="m-0.069 94.2v-57.2l-9.6 7v-10.3l9.6-6.9h9.7v67.4h-9.7z"/>
</g>
</svg>

6. Figure out (trial and error) the line representing the number to be deleted (deleting lines and preview in web browser by saving and double-clicking of the file or use "Launch in..." feature of Notepad++). The line to be deleted is:

Code: [Select]
<path id="PfadE" d="m-0.069 94.2v-57.2l-9.6 7v-10.3l9.6-6.9h9.7v67.4h-9.7z"/>
7. Add the following lines within <g></g> (fill element must contain the color required for drawing the number):

Code: [Select]
<text letter-spacing="0px" text-anchor="middle" word-spacing="0px" text-align="center" font-size="425px" line-height="125%" y="492.5" x="299.90381" font-family="&apos;Roadgeek 2014 Series D&apos;" fill="#ffffff"><tspan y="492.5" x="299.90381">***NUMBER***</tspan></text>
8. Check file in web browser.

Code: [Select]
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" height="120px" width="200px" version="1.1" viewBox="-100 0 200 120">
<g fill-rule="evenodd">
<rect rx="22.2" ry="22.2" height="120" width="200" y="0" x="-100" fill="#F0CA00"/>
<rect rx="18" ry="18" height="112" width="192" y="4.25" x="-95.8"/>
<rect rx="11" ry="11" height="97.5" width="178" y="11.2" x="-88.8" fill="#F0CA00"/>
<text letter-spacing="0px" text-anchor="middle" word-spacing="0px" text-align="center" font-size="425px" line-height="125%" y="492.5" x="299.90381" font-family="&apos;Roadgeek 2014 Series D&apos;" fill="#ffffff"><tspan y="492.5" x="299.90381">***NUMBER***</tspan></text>
</g>
</svg>

9. Rename file to "template_deub.svg" (bold = system name)
10. Upload to GitHub web repository "shields" folder
11. Hope and pray because I've no idea if it will work... :)

If there's a file marked "template" available, that's what you want to use, such as those in https://commons.wikimedia.org/wiki/Category:Highway_shield_templates. That has the route number not saved as a path already, which makes the process easier.
Title: Re: Clinched Routes Highway Shields
Post by: Jim on January 08, 2017, 10:42:14 am
The changes in the pull requests submitted recently for shield generation are now live on the site.  I've spot tested and all seems good so far.
Title: Re: Clinched Routes Highway Shields
Post by: michih on January 08, 2017, 12:00:12 pm
The changes in the pull requests submitted recently for shield generation are now live on the site.  I've spot tested and all seems good so far.

'Germany Bundesstraßen' shield doesn't work: http://tm.teresco.org/shields/clinched.php?u=michih&cort=traveled :(
Only B1 to B9 are replaced but w/o number.

I think I've mistaken white and black. fill="#ffffff" --> fill="#000000" (I'll change it) but the number is not visible at all...
Some regions have 2 svg files. What's "_wide"? Are these used for routes with more than 1 digit? How do I have to modify the svg file?
Title: Re: Clinched Routes Highway Shields
Post by: michih on January 08, 2017, 12:08:47 pm
If there's a file marked "template" available, that's what you want to use, such as those in https://commons.wikimedia.org/wiki/Category:Highway_shield_templates. That has the route number not saved as a path already, which makes the process easier.

There is one (> click < (https://commons.wikimedia.org/wiki/File:Bundesstra%C3%9Fennummer_Vorlage.png)) but it's quite old. For instance, the color (yellow) is a little bit different.
Title: Re: Clinched Routes Highway Shields
Post by: theFXexpert on January 08, 2017, 01:40:32 pm
How should we handle Tennessee? One design for all routes, or should we develop some additional code to identify routes as always primary, always secondary, and both?
A good question.
Option 1 would just be to use the primary shield for everything.

Option 2 would be to use both, but would require that:
    A: The shield generator check against a list of route numbers and spit out the appropriate shield(s) This item will probably take the most work.
    B: Support the display of more than one shield in the hb and the clinched.php page. It looks like all that will need to be done would be to simply put the 2nd shield in the same span element and adjust the width on the hb page. What needs to be figured out is how to return two shields at once with php.

Added KS, MI, MN, MO, NE (doesn't include links/spurs), NV, OH, UT, and WY shields to the pull request.

How about these for the Links and Spurs?
https://en.wikipedia.org/wiki/List_of_Nebraska_Connecting_Link,_Spur,_and_Recreation_Highways#/media/File:N_LINK_Blank.svg
https://en.wikipedia.org/wiki/List_of_Nebraska_Connecting_Link,_Spur,_and_Recreation_Highways#/media/File:N_SPUR_Blank.svg

I got them from https://en.wikipedia.org/wiki/List_of_Nebraska_Connecting_Link,_Spur,_and_Recreation_Highways

I knew about the templates, I haven't done them yet since they require extra programming to filter out the prefix and display the appropriate shield. Same with Texas loops and spurs; which also needs to account for NASA 1.

'Germany Bundesstraßen' shield doesn't work: http://tm.teresco.org/shields/clinched.php?u=michih&cort=traveled :(
Only B1 to B9 are replaced but w/o number.

I think I've mistaken white and black. fill="#ffffff" --> fill="#000000" (I'll change it) but the number is not visible at all...
Some regions have 2 svg files. What's "_wide"? Are these used for routes with more than 1 digit? How do I have to modify the svg file?
Check the x, y, and font-size attributes and make sure the numbers are centered on the shield.

The program requires a wide shield for route numbers larger than 2 characters. Otherwise the default is used. In this case, you can just copy the SVG and rename it with "_wide".
Title: Re: Clinched Routes Highway Shields
Post by: Jim on January 08, 2017, 02:41:39 pm
CHM had the capability to display multiple shields for the same route, and cycled through them when displayed.  One example:

http://cmap.m-plex.com/hb/hwymap.php?sys=cantch&rg=all&gr=p&r=on.tchott&showint=0&dl=0 (http://cmap.m-plex.com/hb/hwymap.php?sys=cantch&rg=all&gr=p&r=on.tchott&showint=0&dl=0)
Title: Re: Clinched Routes Highway Shields
Post by: michih on January 08, 2017, 03:03:07 pm
Check the x, y, and font-size attributes and make sure the numbers are centered on the shield.
The program requires a wide shield for route numbers larger than 2 characters. Otherwise the default is used. In this case, you can just copy the SVG and rename it with "_wide".

Thanks. My "text line template" had totally difference positions, the text was far away from the shield... I think I got it and have submitted svg and _wide.svg file.

Is it possible to use different fonts? Any limit?
Title: Re: Clinched Routes Highway Shields
Post by: mapcat on January 08, 2017, 04:12:46 pm
CHM had the capability to display multiple shields for the same route, and cycled through them when displayed.  One example:

http://cmap.m-plex.com/hb/hwymap.php?sys=cantch&rg=all&gr=p&r=on.tchott&showint=0&dl=0 (http://cmap.m-plex.com/hb/hwymap.php?sys=cantch&rg=all&gr=p&r=on.tchott&showint=0&dl=0)

Thanks--I forgot about that. I think this would be the nicest solution for Tennessee, although it would require the most work. I'd be willing to put together the list of route attributes (P, S, & P/S) if theFXexpert thinks it's doable.
Title: Re: Clinched Routes Highway Shields
Post by: theFXexpert on January 09, 2017, 07:54:55 pm
Is it possible to use different fonts? Any limit?
The fonts available are listed in the roadgeek.css file -> http://tm.teresco.org/fonts/roadgeek.css

CHM had the capability to display multiple shields for the same route, and cycled through them when displayed.  One example:

http://cmap.m-plex.com/hb/hwymap.php?sys=cantch&rg=all&gr=p&r=on.tchott&showint=0&dl=0 (http://cmap.m-plex.com/hb/hwymap.php?sys=cantch&rg=all&gr=p&r=on.tchott&showint=0&dl=0)

Thanks--I forgot about that. I think this would be the nicest solution for Tennessee, although it would require the most work. I'd be willing to put together the list of route attributes (P, S, & P/S) if theFXexpert thinks it's doable.
CHM uses animated GIF images for multi shield routes which is different from the SVGs that we have been using so far. What I have been thinking so far was to simply display both shields side-by-side at once. To replicate the CHM way, both SVGs will need to be loaded and then change which shield is displayed using javascript. As for how the route list would be incorporated, this is the pseudocode I have in mind for shieldgen.php:
Code: [Select]
switch ( $routeNum ) {
    // Primary routes
    case : 5
    case : 8
    case : 19 // etc...
    usePrimaryShield();
    break;

    // Secondary routes
    case : 234
    case : 138
    case : 493 // etc...
    useSecondaryShield();
    break;

    // Both Primary and Secondary routes
    case : 2
    case : 56
    case : 87 // etc...
    useBothShields();
    break;
}
A limitation with this code would be if a route is discontinuous and uses different shields. Say one segment is only primary while the other is only secondary. It would display both when only one for each respective segment is desired.
Title: Re: Clinched Routes Highway Shields
Post by: mapcat on January 09, 2017, 09:27:48 pm
A limitation with this code would be if a route is discontinuous and uses different shields. Say one segment is only primary while the other is only secondary. It would display both when only one for each respective segment is desired.

That would be the case for TN8 (and possibly others). But wouldn't it also read the root in the process, and be able to differentiate tn008 (primary) from tn008cha (secondary)? At least it shouldn't be difficult to overcome on route pages such as http://tm.teresco.org/hb/?u=mapcat&r=tn.tn008 (http://tm.teresco.org/hb/?u=mapcat&r=tn.tn008), right?
Title: Re: Clinched Routes Highway Shields
Post by: rickmastfan67 on January 10, 2017, 01:24:13 am
Option 2 would be to use both, but would require that:
    A: The shield generator check against a list of route numbers and spit out the appropriate shield(s) This item will probably take the most work.
    B: Support the display of more than one shield in the hb and the clinched.php page. It looks like all that will need to be done would be to simply put the 2nd shield in the same span element and adjust the width on the hb page. What needs to be figured out is how to return two shields at once with php.

I personally would love to see something like 'Option 2B' for states like Pennsylvania and Florida to deal with the special 'toll' highway shields that are used.  PA-43, PA-66, FL-414, FL-528 are just a few examples that use the default 'state' shield, and a special 'toll' shield for different segments, but are all one file here on the site.  We would also need to code in the 'toll' shields to be the default for routes like PA-576, & FL-417 which are solely 'toll' highways.
Title: Re: Clinched Routes Highway Shields
Post by: theFXexpert on January 10, 2017, 10:29:32 am
That would be the case for TN8 (and possibly others). But wouldn't it also read the root in the process, and be able to differentiate tn008 (primary) from tn008cha (secondary)? At least it shouldn't be difficult to overcome on route pages such as http://tm.teresco.org/hb/?u=mapcat&r=tn.tn008 (http://tm.teresco.org/hb/?u=mapcat&r=tn.tn008), right?
Forgive me. I didn't take a closer look before posting. The route pages call a generate function in shieldgen.php to echo the shield. The generate function performs an SQL query that returns all attributes of the route that it's generating for. I assume it includes the abbreviation and that can be used.

Option 2 would be to use both, but would require that:
    A: The shield generator check against a list of route numbers and spit out the appropriate shield(s) This item will probably take the most work.
    B: Support the display of more than one shield in the hb and the clinched.php page. It looks like all that will need to be done would be to simply put the 2nd shield in the same span element and adjust the width on the hb page. What needs to be figured out is how to return two shields at once with php.

I personally would love to see something like 'Option 2B' for states like Pennsylvania and Florida to deal with the special 'toll' highway shields that are used.  PA-43, PA-66, FL-414, FL-528 are just a few examples that use the default 'state' shield, and a special 'toll' shield for different segments, but are all one file here on the site.  We would also need to code in the 'toll' shields to be the default for routes like PA-576, & FL-417 which are solely 'toll' highways.
List items A and B weren't options, just requirements needed to implement option 2. But yes I have been thinking that this would be a good way to implement toll shields too.
Title: Re: Clinched Routes Highway Shields
Post by: Jim on January 10, 2017, 08:20:13 pm
Recent pull requests are merged and live on the main site.  It looks like some things aren't good.  deua and usadc shields both didn't work.
Title: Re: Clinched Routes Highway Shields
Post by: bejacob on January 10, 2017, 08:49:25 pm
Recent pull requests are merged and live on the main site.  It looks like some things aren't good.  deua and usadc shields both didn't work.

Also eure.
Title: Re: Clinched Routes Highway Shields
Post by: rschen7754 on January 10, 2017, 09:30:31 pm
It seems to be some sizing problem. I'm still looking at usadc.

usala(1) is also broken but I've figured out what the issue is (it's usala1, not usala)

Edit: seems to be that the viewbox is missing: https://css-tricks.com/scale-svg/
Title: Re: Clinched Routes Highway Shields
Post by: Jim on January 10, 2017, 09:44:49 pm
DC and LA fixes are up.
Title: Re: Clinched Routes Highway Shields
Post by: michih on January 11, 2017, 01:46:14 pm
Recent pull requests are merged and live on the main site.  It looks like some things aren't good.  deua and usadc shields both didn't work.

Also eure.

Sorry, I've never made svg files before. Scaling failed because of missing viewbox attributes. Should be fixed with my latest pull request. Dunno why it was automatically in the deub file but not in any other file...

If it works fine, I'll add more European shields soon.

Edit: Ah, rschen7754 had the same problem :)
Title: Re: Clinched Routes Highway Shields
Post by: michih on January 11, 2017, 04:04:09 pm
I've added:

auta
autb
auts
chea
cheh
deua
deub
eure
ltua
ltuk

I still have problems with autb, chea and cheh. The prefix is not removed but I don't understand why.

@Jim: I've added the relevant code to shieldgen.php with my latest pull request. Have you really updated the file?

I've removed some *_wide.svg file, e.g. eure_wide (http://tm.teresco.org/shields/template_eure_wide.svg) because I thought they are no longer necessary (identical with the normal svg file). However, they are still online.

@ALL: It explains why it looked like everything is fine with deua and eure but it should be like it's for chea, cheh or autb. If there're more than 2 digits, the default shield should be used.
I don't know why the normal svg files, e.g. "template_chea.svg", are not loaded. Shieldgen.php looks fine. Is only code from shieldgen.php relevant for selecting the svg files?


@ALL: Could there be any problem if the svg uses "mm" instead of px? https://upload.wikimedia.org/wikipedia/commons/b/b0/Autocesta_A1.svg
"mm" is not yet used in our svg files. I've tried to replace mm by px but it doesn't work (much smaller and text doesn't match). Any idea?
Title: Re: Clinched Routes Highway Shields
Post by: Jim on January 11, 2017, 05:40:10 pm
@Jim: I've added the relevant code to shieldgen.php with my latest pull request. Have you really updated the file?

Don't think I had - did it now so the latest should be up.
Title: Re: Clinched Routes Highway Shields
Post by: bejacob on January 11, 2017, 09:17:15 pm
Not sure if everything is fixed, but it appears all the ones I've clinched are good.

Great work by all.  :)
Title: Re: Clinched Routes Highway Shields
Post by: michih on January 12, 2017, 01:51:27 pm
http://tm.teresco.org/shields/clinched.php?u=michih&cort=clinched&reload=true

'Switzerland Autobahnen / Autoroutes' didn't work correct 2 hours ago. For instance, A9 is loaded twice. The first shield displayed "9" text, the second one "A9". Some shields were default. I've enabled "Disable Caching (slows loading) and it works for all chea shields correct now (I've loaded it more than 10 times with disabled caching).

eure was correct 2 hours ago but the text is not displayed anymore since I've disabled caching for the first time. It's no longer working in the HB too.

autb and cheh had partially text only 2 hours ago. But no shield has text now ("traveled only" must be selected). Same in HB.

I have a minor "bug" in shieldgen.php (forgot that some autb routes begin with L) but I cannot see any other problem on my end. No idea what's going on....
Title: Re: Clinched Routes Highway Shields
Post by: michih on January 12, 2017, 03:52:15 pm
I've enabled "Disable Caching (slows loading) and it works for all chea shields correct now.
eure was correct 2 hours ago but the text is not displayed anymore since I've disabled caching for the first time. It's no longer working in the HB too.

I've checked it for 4 other users and it's always the same behavior: Minimum 1 chea shield is not replaced (default bk/wh instead of wh/rd) and some eure texts are displayed. After selecting "disable cache", all chea shields work but no eure text is displayed any more.

It's identical with FF or IE. That means, I "changed" the behavior only once with FF and it's identical when I load it with IE now.

How does the cache work, is the cache on my end or on the site? Do I generally change the behavior by selecting "disable cache" or is it just on my computer? Can anyone reproduce the same behavior?
Title: Re: Clinched Routes Highway Shields
Post by: Jim on January 12, 2017, 04:08:24 pm
There is a cache on the site, which I manually clear out each time updated code or svg files come in.  I'll do that again now just to be safe.  It would be nice to add some code that automatically regenerates shields if the PHP code or any svg template has been changed.
Title: Re: Clinched Routes Highway Shields
Post by: Thing342 on January 12, 2017, 05:54:15 pm
As the original author of the shield generator, allow me to provide some clarity:

There is a cache on the site, which I manually clear out each time updated code or svg files come in.  I'll do that again now just to be safe.  It would be nice to add some code that automatically regenerates shields if the PHP code or any svg template has been changed.
The php function used to generate the shield has a force_reload parameter, which regenerates the cached version if set to true. It's used in low-volume applications (i.e. the Highway Browser, where you only need to display one shield)

--

The "easy" (code-wise) way to accomplish systems with alternate / multiple shieldstyles would be to simply create separate systems for the portions using the alternate shields (ie FL Toll routes, TN secondary routes). However, that (and just straight checking against a list of route numbers) would take a large amount of work. My proposed solution for this would involve adding a tags field (allowing OSM-like tags) to each system .csv file and storing it as a new column in the "routes" table in the database. Take usafl.csv, for example:
Code: [Select]
system;region;route;banner;city;abbrev;root;tags;
(tags separated by commas)
...
usafl;FL;FL397;;;;fl.fl397;;
usafl;FL;FL400;;;;fl.fl400;;
usafl;FL;FL401;;;;fl.fl401;;
usafl;FL;FL404;;;;fl.fl404;;
usafl;FL;FL405;;;;fl.fl405;;
usafl;FL;FL406;;;;fl.fl406;;
usafl;FL;FL407;;;;fl.fl407;;
usafl;FL;FL408;;;;fl.fl408;toll=yes;
usafl;FL;FL408;Spr;;;fl.fl408spr;
usafl;FL;FL414;;;;fl.fl414;toll=yes;
usafl;FL;FL415;;;;fl.fl415;;
usafl;FL;FL416;;;;fl.fl416;;
usafl;FL;FL417;;;;fl.fl417;toll=yes;
usafl;FL;FL419;;;;fl.fl419;;
usafl;FL;FL421;;;;fl.fl421;;
usafl;FL;FL423;;;;fl.fl423;;
usafl;FL;FL424;;;;fl.fl424;;
usafl;FL;FL426;;;;fl.fl426;;
usafl;FL;FL429;;;;fl.fl429;toll=yes;
usafl;FL;FL430;;;;fl.fl430;;
usafl;FL;FL434;;;;fl.fl434;;
usafl;FL;FL435;;;;fl.fl435;;
usafl;FL;FL436;;;;fl.fl436;;
usafl;FL;FL437;;;;fl.fl437;;
...
The shield generator would then be able to give the routes marked with "toll=yes" the toll shield. This seems like the most straightforward way and would minimize the amount of duplication needed.

--

The most foolproof method I've found for making shields is:
1. Download shield SVG from Wikimedia commons;
2. Edit shield in inkscape to turn into a template, with ***NUMBER*** in place of the route number;
3. Save as "Optimized SVG" with the name "template_{system name}(_wide, _wide4).svg";
4. Copy to /Web/shields;
5. Wash, rinse, repeat.
Title: Re: Clinched Routes Highway Shields
Post by: yakra on January 12, 2017, 06:06:21 pm
Quote
Can anyone reproduce the same behavior?
It's looking fine on my end. :-\
Title: Re: Clinched Routes Highway Shields
Post by: rschen7754 on January 12, 2017, 08:24:57 pm
As the original author of the shield generator, allow me to provide some clarity:

There is a cache on the site, which I manually clear out each time updated code or svg files come in.  I'll do that again now just to be safe.  It would be nice to add some code that automatically regenerates shields if the PHP code or any svg template has been changed.
The php function used to generate the shield has a force_reload parameter, which regenerates the cached version if set to true. It's used in low-volume applications (i.e. the Highway Browser, where you only need to display one shield)

--

The "easy" (code-wise) way to accomplish systems with alternate / multiple shieldstyles would be to simply create separate systems for the portions using the alternate shields (ie FL Toll routes, TN secondary routes). However, that (and just straight checking against a list of route numbers) would take a large amount of work. My proposed solution for this would involve adding a tags field (allowing OSM-like tags) to each system .csv file and storing it as a new column in the "routes" table in the database. Take usafl.csv, for example:
Code: [Select]
system;region;route;banner;city;abbrev;root;tags;
(tags separated by commas)
...
usafl;FL;FL397;;;;fl.fl397;;
usafl;FL;FL400;;;;fl.fl400;;
usafl;FL;FL401;;;;fl.fl401;;
usafl;FL;FL404;;;;fl.fl404;;
usafl;FL;FL405;;;;fl.fl405;;
usafl;FL;FL406;;;;fl.fl406;;
usafl;FL;FL407;;;;fl.fl407;;
usafl;FL;FL408;;;;fl.fl408;toll=yes;
usafl;FL;FL408;Spr;;;fl.fl408spr;
usafl;FL;FL414;;;;fl.fl414;toll=yes;
usafl;FL;FL415;;;;fl.fl415;;
usafl;FL;FL416;;;;fl.fl416;;
usafl;FL;FL417;;;;fl.fl417;toll=yes;
usafl;FL;FL419;;;;fl.fl419;;
usafl;FL;FL421;;;;fl.fl421;;
usafl;FL;FL423;;;;fl.fl423;;
usafl;FL;FL424;;;;fl.fl424;;
usafl;FL;FL426;;;;fl.fl426;;
usafl;FL;FL429;;;;fl.fl429;toll=yes;
usafl;FL;FL430;;;;fl.fl430;;
usafl;FL;FL434;;;;fl.fl434;;
usafl;FL;FL435;;;;fl.fl435;;
usafl;FL;FL436;;;;fl.fl436;;
usafl;FL;FL437;;;;fl.fl437;;
...
The shield generator would then be able to give the routes marked with "toll=yes" the toll shield. This seems like the most straightforward way and would minimize the amount of duplication needed.

--

The most foolproof method I've found for making shields is:
1. Download shield SVG from Wikimedia commons;
2. Edit shield in inkscape to turn into a template, with ***NUMBER*** in place of the route number;
3. Save as "Optimized SVG" with the name "template_{system name}(_wide, _wide4).svg";
4. Copy to /Web/shields;
5. Wash, rinse, repeat.

You have to make sure that the checkbox to leave the viewbox settings is enabled when you save as Optimized SVG, or you will get the sizing issues that I had earlier.
Title: Re: Clinched Routes Highway Shields
Post by: the_spui_ninja on January 15, 2017, 12:19:00 am
This seems like the most straightforward way and would minimize the amount of duplication needed.
Would this also work for the usanes system, as the links have a slightly different shield than the spurs?
Title: Re: Clinched Routes Highway Shields
Post by: yakra on January 16, 2017, 02:40:38 pm
I didn't see any notice here about the usanh shields. Thanks for including them.
ME NH113B (http://tm.teresco.org/hb/index.php?u=yakra&r=me.nh113b) shield looks fine.
ME NH153 (http://tm.teresco.org/hb/index.php?u=yakra&r=me.nh153) looks oogy. :)

In general, are there plans to remove the state abbreviation from "out-of-state" state route segments?
more (http://tm.teresco.org/hb/index.php?u=yakra&r=ct.ny120agre) examples (http://tm.teresco.org/hb/index.php?u=yakra&r=nh.me113cha)
Title: Re: Clinched Routes Highway Shields
Post by: rschen7754 on January 16, 2017, 08:59:48 pm
I didn't see any notice here about the usanh shields. Thanks for including them.
ME NH113B (http://tm.teresco.org/hb/index.php?u=yakra&r=me.nh113b) shield looks fine.
ME NH153 (http://tm.teresco.org/hb/index.php?u=yakra&r=me.nh153) looks oogy. :)

In general, are there plans to remove the state abbreviation from "out-of-state" state route segments?
more (http://tm.teresco.org/hb/index.php?u=yakra&r=ct.ny120agre) examples (http://tm.teresco.org/hb/index.php?u=yakra&r=nh.me113cha)

It is noted at https://github.com/TravelMapping/Web/issues/121.
Title: Re: Clinched Routes Highway Shields
Post by: Griffith on January 21, 2017, 03:15:51 pm
I've enabled "Disable Caching (slows loading) and it works for all chea shields correct now.
eure was correct 2 hours ago but the text is not displayed anymore since I've disabled caching for the first time. It's no longer working in the HB too.

I've checked it for 4 other users and it's always the same behavior: Minimum 1 chea shield is not replaced (default bk/wh instead of wh/rd) and some eure texts are displayed. After selecting "disable cache", all chea shields work but no eure text is displayed any more.

It's identical with FF or IE. That means, I "changed" the behavior only once with FF and it's identical when I load it with IE now.

How does the cache work, is the cache on my end or on the site? Do I generally change the behavior by selecting "disable cache" or is it just on my computer? Can anyone reproduce the same behavior?

I have the same issue. I tried FF, Safari and Opera on a variety of devices and on all of them the autb, cheh, and eure shields are blank.
Title: Re: Clinched Routes Highway Shields
Post by: michih on January 21, 2017, 04:22:59 pm
Thanks. It's a generally issue and I cannot fix it. I could remove the svg files so that the numbers are shown again.
Title: Re: Clinched Routes Highway Shields
Post by: theFXexpert on January 21, 2017, 04:59:32 pm
Thanks. It's a generally issue and I cannot fix it. I could remove the svg files so that the numbers are shown again.
Submitted something that will hopefully fix it. https://github.com/TravelMapping/Web/pull/143/commits/b0f8f69f60a851654f745c74845ab5842c1db0a7
The $routeNum variable in the autb, cheh, and eure cases never got the route numbers from the database ($row['route']) and just replaced ***NUMBER*** with an empty string.
Title: Re: Clinched Routes Highway Shields
Post by: michih on January 22, 2017, 03:49:53 am
Thanks. It's a generally issue and I cannot fix it. I could remove the svg files so that the numbers are shown again.
Submitted something that will hopefully fix it. https://github.com/TravelMapping/Web/pull/143/commits/b0f8f69f60a851654f745c74845ab5842c1db0a7
The $routeNum variable in the autb, cheh, and eure cases never got the route numbers from the database ($row['route']) and just replaced ***NUMBER*** with an empty string.

Thanks :) However, it's still the same. autb, cheh and eure don't work. $routeNum works fine for other systems.
Title: Re: Clinched Routes Highway Shields
Post by: Jim on January 22, 2017, 03:30:37 pm
I think I did not pull down the merged code before installing.  I did that now and I think things are a little better.
Title: Re: Clinched Routes Highway Shields
Post by: michih on January 22, 2017, 03:57:42 pm
Thanks, I think all my shields work now except the 3-digit autb, e.g.: http://tm.teresco.org/hb/?r=aut.b100. What's different to 2-digit B roads? A different (wider) svg file is loaded but the same code is processed.


Edit: I've checked the link of my post and... IT'S WORKING NOW ::)
Edit2: Got it (https://github.com/TravelMapping/Web/commit/0e72d17e95ad715eadc2e42cd4468f800ea9efb5)!


Again, when do I have to use "$routeNum" and "row['route']"?
Title: Re: Clinched Routes Highway Shields
Post by: theFXexpert on January 22, 2017, 05:00:56 pm
Again, when do I have to use "$routeNum" and "row['route']"?
For each case in the switch statement, $row['route'] has to be used or stored in a variable (which is usually $routeNum) at least once. This takes the route number from the database:
$routeNum = $row['route'];

or if letters need to be filtered out:
$routeNum = str_replace("US", "", $row['route']);

Whenever $routeNum is used later in the case block, it will contain the route number without the text. So if there are other characters that need to be filtered you can just use str_replace() on $routeNum from then on.
Title: Re: Clinched Routes Highway Shields
Post by: michih on January 23, 2017, 02:25:41 pm
Shame on me... I should think instead of blind copy-paste... Sorry!
Title: Re: Clinched Routes Highway Shields
Post by: rschen7754 on February 06, 2017, 12:26:27 am
How should we handle foreign (i.e. non-US) copyright for the shields?

This isn't something we generally have to worry about for most countries, because either the government explicitly releases the shields into public domain, or it's a colored rectangle with text that you can't copyright.

Example: https://en.wikipedia.org/wiki/File:Australian_national_highway_template.svg. The file was created by an American, is hosted on American servers, and under US copyright law cannot be copyrighted since it is too simple (the threshold of originality in the US is very high - see the more complex images at https://commons.wikimedia.org/wiki/Commons:Threshold_of_originality#United_States that are considered public domain). However, Australian copyright law differs and it would be considered copyrighted in Australia.
Title: Re: Clinched Routes Highway Shields
Post by: Duke87 on March 14, 2017, 09:14:49 pm
Firstly, I would think that as a US-based site US law would govern.

Secondly, I would think that the use of a route shield to refer to the route in question would have to fall under fair use even if the design itself is copyrighted (presumably to prevent its use in other contexts, e.g. Route 22 Pizza can't use Route 22 shields on their sign).
Title: Re: Clinched Routes Highway Shields
Post by: oscar on March 14, 2017, 10:48:35 pm
I would think that usually the worst that can possibly happen is a request/demand for us to take down our route marker images.

Countries like North Korea might be another story. Since I think shields are "nice but not necessary" (actually, just from my standpoint, not very important at all), I think we can not bother doing shields for such countries.
Title: Re: Clinched Routes Highway Shields
Post by: the_spui_ninja on March 15, 2017, 12:13:09 am
Countries like North Korea might be another story.
Does North Korea even have a signed highway system?
Title: Re: Clinched Routes Highway Shields
Post by: si404 on March 15, 2017, 07:51:55 am
Does North Korea even have a signed highway system?
It has Asian highways, but otherwise no.
Title: Re: Clinched Routes Highway Shields
Post by: mariethefoxy on July 23, 2017, 11:26:10 pm
Any updates on the shield generation, common systems like the Quebec Autoroutes still use generic shields
Title: Re: Clinched Routes Highway Shields
Post by: rschen7754 on July 24, 2017, 02:23:40 am
Any updates on the shield generation, common systems like the Quebec Autoroutes still use generic shields

I added a few last week but am still waiting for them to be pushed out (canab, mexd, twnf, cannf).

For Quebec, the SVG template on Wikimedia Commons https://commons.wikimedia.org/wiki/File:Quebec_Autoroute_template.svg is missing the design at the top (see https://commons.wikimedia.org/wiki/File:Quebec_Autoroute_920.svg for an example). I could manually add it (or manually make any shield that's missing a template on Wikimedia Commons), but that would take more time than I have at the present.
Title: Re: Clinched Routes Highway Shields
Post by: Jim on July 24, 2017, 10:04:45 am
I added a few last week but am still waiting for them to be pushed out (canab, mexd, twnf, cannf).

Should be live on site now.  Sorry about the delay.  I saw the pull request at an inconvenient time, then forgot to go back and merge and install.
Title: Re: Clinched Routes Highway Shields
Post by: mapcat on July 24, 2017, 12:05:58 pm
@rschen7754: thanks for all the work you put in on this.

Does Wikimedia Commons not have templates for Arkansas and Puerto Rico, or for the Nebraska links & spurs? Maybe I'm not sure how all the shields on the various Wikipedia pages for those routes were produced, but most of the individual Wikipedia route pages show shields.

Those seem to be the only ones missing from the US at this point.

Also, there's an issue with the Alberta routes showing AB## on the shield instead of just the number.
Title: Re: Clinched Routes Highway Shields
Post by: rschen7754 on July 24, 2017, 02:42:30 pm
@rschen7754: thanks for all the work you put in on this.

Does Wikimedia Commons not have templates for Arkansas and Puerto Rico, or for the Nebraska links & spurs? Maybe I'm not sure how all the shields on the various Wikipedia pages for those routes were produced, but most of the individual Wikipedia route pages show shields.

Those seem to be the only ones missing from the US at this point.

Also, there's an issue with the Alberta routes showing AB## on the shield instead of just the number.

I'll put in a pull request to fix AB soon. I'm hoping to spin up my own test instance to catch stuff like this soon, but haven't gotten the chance yet (and it will probably have to wait until my next hardware upgrade).

Unfortunately it seems that a lot of people don't upload their templates once they are done creating the shields (especially non-US/Canada shields). Looking at my notes PR had no template, and Nebraska links/spurs have a different font size for their suffixed route letters (I think Arkansas was in that category too). "No template" doesn't mean they can't be made, but it would take some extra work (which is possible - I believe that's how michich made some of the European ones). The different font sizes would probably also require some extra PHP knowhow, enough to where I would prefer to be able to test my code first rather than make Jim repeatedly upload it after discovering it doesn't work.
Title: Re: Clinched Routes Highway Shields
Post by: michih on July 24, 2017, 04:20:58 pm
I believe that's how michich made some of the European ones

Yes, wikimedia svg files for Europe are often crap and it was easier to make own svg files. However, European signs are much simpler than US or Canadian signs (usually just a frame and a number).

My files are also sometimes not good though...
Title: Re: Clinched Routes Highway Shields
Post by: Eth on August 15, 2017, 08:38:46 am
[...]and Nebraska links/spurs have a different font size for their suffixed route letters (I think Arkansas was in that category too). [...] The different font sizes would probably also require some extra PHP knowhow, enough to where I would prefer to be able to test my code first rather than make Jim repeatedly upload it after discovering it doesn't work.

This, I assume, would also affect Georgia's state auxiliaries, right? Shields for those currently display simply as their parent route, leading me to do a double-take every time I visit my clinched routes page and see GA 3 on there (though it links correctly to the far, far shorter GA 3 Connector). For what it's worth, the templates on Commons do include the banner text.
Title: Re: Clinched Routes Highway Shields
Post by: the_spui_ninja on August 15, 2017, 07:04:25 pm
Those seem to be the only ones missing from the US at this point.
Guam too, since that's under the US umbrella. I think they have a template already made too: https://commons.wikimedia.org/wiki/File:Guam_route_marker_blank.svg (https://commons.wikimedia.org/wiki/File:Guam_route_marker_blank.svg)
Title: Re: Clinched Routes Highway Shields
Post by: rschen7754 on August 16, 2017, 02:09:24 pm
[...]and Nebraska links/spurs have a different font size for their suffixed route letters (I think Arkansas was in that category too). [...] The different font sizes would probably also require some extra PHP knowhow, enough to where I would prefer to be able to test my code first rather than make Jim repeatedly upload it after discovering it doesn't work.

This, I assume, would also affect Georgia's state auxiliaries, right? Shields for those currently display simply as their parent route, leading me to do a double-take every time I visit my clinched routes page and see GA 3 on there (though it links correctly to the far, far shorter GA 3 Connector). For what it's worth, the templates on Commons do include the banner text.

I think so. I would prefer to take care of these cases with shields rather than have the incorrect ones (though others may think differently).

Those seem to be the only ones missing from the US at this point.
Guam too, since that's under the US umbrella. I think they have a template already made too: https://commons.wikimedia.org/wiki/File:Guam_route_marker_blank.svg (https://commons.wikimedia.org/wiki/File:Guam_route_marker_blank.svg)

Unfortunately that template is missing the text.

On a related note: I don't have the spreadsheet I was using, but I think we would be able to get shields for cannb if the system was split (see http://tm.teresco.org/forum/index.php?topic=2171.msg7316#msg7316)
Title: Re: Clinched Routes Highway Shields
Post by: yakra on August 16, 2017, 04:34:09 pm
On a related note: I don't have the spreadsheet I was using, but I think we would be able to get shields for cannb if the system was split (see http://tm.teresco.org/forum/index.php?topic=2171.msg7316#msg7316)
Nice. If you are or someone else is thinking of making shields and waiting on me to make the split, I can go ahead and do so.
I'm not familiar with how the shield generation code works, but I've no doubt that 3 systems for 3 shield types would be more easily doable than 3 shield types for 1 system.
Shall I go ahead and make the split?
Title: Re: Clinched Routes Highway Shields
Post by: rschen7754 on August 17, 2017, 10:00:13 pm
On a related note: I don't have the spreadsheet I was using, but I think we would be able to get shields for cannb if the system was split (see http://tm.teresco.org/forum/index.php?topic=2171.msg7316#msg7316)
Nice. If you are or someone else is thinking of making shields and waiting on me to make the split, I can go ahead and do so.
I'm not familiar with how the shield generation code works, but I've no doubt that 3 systems for 3 shield types would be more easily doable than 3 shield types for 1 system.
Shall I go ahead and make the split?

You can go ahead, but there's no rush at least on my end - it might be a while before I get to it.
Title: Re: Clinched Routes Highway Shields
Post by: rickmastfan67 on August 18, 2017, 04:50:14 am
Hope there's a way for us to figure out in future to show 2 shields for FL routes that have both 'toll' and non-toll segments since I'm getting really close to finishing the set and to send it to preview mode. :)
Title: Re: Clinched Routes Highway Shields
Post by: Bickendan on August 20, 2017, 04:38:23 am
Hope there's a way for us to figure out in future to show 2 shields for FL routes that have both 'toll' and non-toll segments since I'm getting really close to finishing the set and to send it to preview mode. :)
This would be very useful for the Oregon Highways set I'm going to be drafting soon.
Title: Re: Clinched Routes Highway Shields
Post by: rschen7754 on August 20, 2017, 01:34:55 pm
Hope there's a way for us to figure out in future to show 2 shields for FL routes that have both 'toll' and non-toll segments since I'm getting really close to finishing the set and to send it to preview mode. :)
This would be very useful for the Oregon Highways set I'm going to be drafting soon.

There are other systems where this would be needed, such as the aforementioned usapr, and some of the UK/Ireland routes where some parts are motorways and some are not.
Title: Re: Clinched Routes Highway Shields
Post by: si404 on August 20, 2017, 01:53:45 pm
some of the UK/Ireland routes where some parts are motorways and some are not.
Those have been two separate systems since before I took over (I split the Ax(M) routes from the M routes in GB & NI).

However, A roads (ignoring Ax(M)s) can be signed with black text on white (non-primary) or yellow text on green (primary). All Jersey's are primary, but elsewhere many are entirely primary, many are entirely non primary and many have parts that are primary and parts that are non-primary.
Title: Re: Clinched Routes Highway Shields
Post by: rschen7754 on August 20, 2017, 04:01:46 pm
Just put in a pull request for usaar (currently part of usansf) and mtqn (the same as fran). Some others might come later this week.
Title: Re: Clinched Routes Highway Shields
Post by: Jim on August 20, 2017, 05:22:46 pm
Just put in a pull request for usaar (currently part of usansf) and mtqn (the same as fran). Some others might come later this week.

These are live on the main site.
Title: Re: Clinched Routes Highway Shields
Post by: Jim on August 20, 2017, 05:26:08 pm
Arkansas ones are showing as "000A".
Title: Re: Clinched Routes Highway Shields
Post by: rschen7754 on August 20, 2017, 05:36:21 pm
Arkansas ones are showing as "000A".

I think this last pull request should do the trick. Probably time to set up my dev instance to catch these errors...
Title: Re: Clinched Routes Highway Shields
Post by: rschen7754 on August 22, 2017, 02:17:08 pm
usaar is fixed, and canqca is now live.
Title: Re: Clinched Routes Highway Shields
Post by: mapcat on August 22, 2017, 07:10:09 pm
The AR numbers are offset slightly (on AR 151, at least), and the 3-digit canqca numbers aren't all the same size: 1, 4, 5, 6, and 7 are slightly taller than 0, 2, 3, and 9.

Edit: at zooms less than 100% or greater than 175% on Chrome, the autoroute numbers are fine.
Title: Re: Clinched Routes Highway Shields
Post by: rschen7754 on August 22, 2017, 08:21:25 pm
The AR numbers are offset slightly (on AR 151, at least), and the 3-digit canqca numbers aren't all the same size: 1, 4, 5, 6, and 7 are slightly taller than 0, 2, 3, and 9.

Edit: at zooms less than 100% or greater than 175% on Chrome, the autoroute numbers are fine.

I looked at https://commons.wikimedia.org/wiki/Category:Diagrams_of_Arkansas_State_Highway_shields and it seems that there's different font sizes used depending on what digits are in the route number. It will take some more work to fix that, unfortunately.
Title: Re: Clinched Routes Highway Shields
Post by: mariethefoxy on August 22, 2017, 11:59:32 pm
theres an error on the routes NH 101 and NH 111, the word NH is being spelled out with the numbers
Title: Re: Clinched Routes Highway Shields
Post by: yakra on August 23, 2017, 12:52:09 am
theres an error on the routes NH 101 and NH 111, the word NH is being spelled out with the numbers
A consistent glitch across the entire usanh system:
All non-letter-suffixed routes are spelled out, with the "NH".
Letter-suffixed route shields look fine.
Title: Re: Clinched Routes Highway Shields
Post by: rschen7754 on August 23, 2017, 01:29:35 am
theres an error on the routes NH 101 and NH 111, the word NH is being spelled out with the numbers
A consistent glitch across the entire usanh system:
All non-letter-suffixed routes are spelled out, with the "NH".
Letter-suffixed route shields look fine.

Just put in a pull request to fix this and usatx, and add the first New Brunswick shield.

For the New Brunswick shields, the font is a bit off, but the Commons shields use a non-free font.
Title: Re: Clinched Routes Highway Shields
Post by: yakra on August 23, 2017, 01:31:59 am
Excellent! Thanks for all your work on this.
Title: Re: Clinched Routes Highway Shields
Post by: rschen7754 on August 27, 2017, 01:59:08 am
Excellent! Thanks for all your work on this.

Thanks for putting up with my coding errors.  :)

Anyway, the other New Brunswick shields were added, as were nclt and usanes (last one still in a pull request).

126/186 shields for active systems have been created - 67.74%.
Title: Re: Clinched Routes Highway Shields
Post by: yakra on January 25, 2018, 01:27:46 am
What can you do with this (see attachment)?
Title: Re: Clinched Routes Highway Shields
Post by: rschen7754 on January 25, 2018, 01:42:52 am
What can you do with this (see attachment)?

The main issue with canmb was the superscripted letters, which I'm not sure how to handle.

However, recently my colleague at Wikimedia Commons made shields for cannl and mexed, so hopefully those can be added soon.
Title: Re: Clinched Routes Highway Shields
Post by: yakra on January 25, 2018, 01:46:44 am
Quote
The main issue with canmb was the superscripted letters, which I'm not sure how to handle.
If we just say fudge-it-this-is-better-than-nothing and include regular letters, is that doable?
(I just downloaded inkscape an hour ago and am wicked excited.)
Title: Re: Clinched Routes Highway Shields
Post by: rschen7754 on January 25, 2018, 02:13:46 am
It is, and there are a few others in that category (PEI for example). Or we could just estimate.
Title: Re: Clinched Routes Highway Shields
Post by: rschen7754 on January 28, 2018, 02:57:18 am
Added a pull request for cannl, usaush, and mexed.
Title: Re: Clinched Routes Highway Shields
Post by: Jim on January 28, 2018, 08:51:38 am
Added a pull request for cannl, usaush, and mexed.

These are live on the tmtest site.  If after some testing all looks good, let me know and I'll install on the production site.
Title: Re: Clinched Routes Highway Shields
Post by: mapcat on January 28, 2018, 10:18:23 am
Shouldn't the usaush shields be more like this?

http://www.teresco.org/pics/toabq-20040122-25/24/P1240005.jpg (http://www.teresco.org/pics/toabq-20040122-25/24/P1240005.jpg)
Title: Re: Clinched Routes Highway Shields
Post by: rschen7754 on January 28, 2018, 12:39:56 pm
Shouldn't the usaush shields be more like this?

http://www.teresco.org/pics/toabq-20040122-25/24/P1240005.jpg (http://www.teresco.org/pics/toabq-20040122-25/24/P1240005.jpg)

I guess it depends on whether we want to go with the period shields or the modern-day historic ones.
Title: Re: Clinched Routes Highway Shields
Post by: yakra on January 28, 2018, 01:14:39 pm
I'd vote for modern-day historic.
Title: Re: Clinched Routes Highway Shields
Post by: mapcat on January 28, 2018, 02:14:49 pm
I guess it depends on whether we want to go with the period shields or the modern-day historic ones.

Shields for other systems typically match the posted shields. This system is made up of routes currently posted with a distinctive brown shield (with some minor variations by state); it's not all routes that once had US route shields.
Title: Re: Clinched Routes Highway Shields
Post by: Jim on January 28, 2018, 02:33:03 pm
I'd definitely like to see the current brown historic signage if we can make it happen.
Title: Re: Clinched Routes Highway Shields
Post by: si404 on January 28, 2018, 03:42:40 pm
Shields for other systems typically match the posted shields. This system is made up of routes currently posted with a distinctive brown shield (with some minor variations by state); it's not all routes that once had US route shields.
This.

Though the old US Highway signs are very nicely done, that's not what the system is.
Title: Re: Clinched Routes Highway Shields
Post by: rschen7754 on January 28, 2018, 04:46:49 pm
I'd definitely like to see the current brown historic signage if we can make it happen.

I'll see what I can do, but it probably won't be until the next batch. I don't think we can match the font exactly though.
Title: Re: Clinched Routes Highway Shields
Post by: yakra on January 31, 2018, 05:03:33 pm
Just thinking out loud here; I haven't looked into the ShieldGen code, as I don't grok the language it's written in, and thus don't understand, in detail, what makes it tick. It's possible that I'm missing something important.

The main issue with canmb was the superscripted letters, which I'm not sure how to handle.
If we just say fudge-it-this-is-better-than-nothing and include regular letters, is that doable?
It is, and there are a few others in that category (PEI for example). Or we could just estimate.
PEI GMSV examples: 17A (https://www.google.com/maps/@46.0574034,-62.5218872,3a,15y,20.9h,85.25t/data=!3m9!1e1!3m7!1sIHS3YJeVbrgLNvLCln7VOw!2e0!7i13312!8i6656!9m2!1b1!2i41), 18A (https://www.google.com/maps/@45.9792809,-62.5250358,3a,18y,4.88h,84.27t/data=!3m9!1e1!3m7!1sQW73CnWP_VtgI9BG6lYY6w!2e0!7i13312!8i6656!9m2!1b1!2i41), and 19A (https://www.google.com/maps/@46.1549469,-63.2950823,3a,15y,78.34h,84.14t/data=!3m9!1e1!3m7!1sjzhLGurtm9ai7Tplc1zS1g!2e0!7i13312!8i6656!9m2!1b1!2i41) (which uses a smaller font size 'A' than the first two examples)
I take "that category" to mean using letters in a smaller font size, thus complicating sizing & positioning of the text, and not necessarily superscript specifically.
usane has a similar route, NE25A (https://www.google.com/maps/@40.3933813,-101.0322297,3a,16.4y,36.68h,88.01t/data=!3m6!1e1!3m4!1sm36daFGXmIor2Q8vSp64ww!2e0!7i13312!8i6656), which is handled in the HB (http://tm.teresco.org/hb/index.php?r=ne.ne025a) like a normal 3dNE (http://tm.teresco.org/hb/index.php?r=ne.ne109) (Compare vanilla NE25 (http://tm.teresco.org/hb/index.php?r=ne.ne025)).
(To be clear, I'm perfectly fine with the way NE25A is handled in the HB; I'm just mentioning that here for completeness & comparison's sake.)

For how to handle these cases, the best comparison I can think of is usanh.
Like many other systems, ShieldGen already has to check whether a route is a 1d/2dNH (http://tm.teresco.org/hb/index.php?r=nh.nh009) or 3dNH (http://tm.teresco.org/hb/index.php?r=nh.nh109) to get the sizing & positioning of the text right. But it also has to check whether a route has a letter (http://tm.teresco.org/hb/index.php?r=nh.nh009a) suffix (http://tm.teresco.org/hb/index.php?r=nh.nh109a), in which case the text is handled differently.
From viewing the source in the HB, it looks like this is done via two <text> tags, each with different x= & y= variables in the <tspan> tag.
This should be adaptable to canpe & canmb... or is there more to it?
Title: Re: Clinched Routes Highway Shields
Post by: rschen7754 on February 01, 2018, 02:27:25 pm
For how to handle these cases, the best comparison I can think of is usanh.
Like many other systems, ShieldGen already has to check whether a route is a 1d/2dNH (http://tm.teresco.org/hb/index.php?r=nh.nh009) or 3dNH (http://tm.teresco.org/hb/index.php?r=nh.nh109) to get the sizing & positioning of the text right. But it also has to check whether a route has a letter (http://tm.teresco.org/hb/index.php?r=nh.nh009a) suffix (http://tm.teresco.org/hb/index.php?r=nh.nh109a), in which case the text is handled differently.
From viewing the source in the HB, it looks like this is done via two <text> tags, each with different x= & y= variables in the <tspan> tag.
This should be adaptable to canpe & canmb... or is there more to it?

The problem is that the SVG template doesn't have a space for the letter. That doesn't mean that someone couldn't estimate where it is and add it.

I generally prioritize shields where I don't have to do that sort of thing. Sometimes I am able to come back to more complex cases as my SVG/shield skills improve. I'm hoping to get more Nova Scotia shields done soon since those were added to Commons recently.
Title: Re: Clinched Routes Highway Shields
Post by: yakra on February 02, 2018, 12:33:18 am
Quote
That doesn't mean that someone couldn't estimate where it is and add it.
Willing to take a stab at it. A lot of learning to do, though. I just figured out "resize page to content" in Inkscape...
Title: Re: Clinched Routes Highway Shields
Post by: rschen7754 on February 02, 2018, 01:30:47 am
I would recommend starting with what Commons already has and working off that. For the letters, it may help to pull up an existing shield and estimate where the letter field would go from that.
Title: Re: Clinched Routes Highway Shields
Post by: yakra on February 02, 2018, 03:11:53 pm
Commons uses an older style, without the bison graphic. Based off this one example (https://www.google.com/maps/@50.145851,-96.8743299,3a,15.4y,173.19h,96.85t/data=!3m9!1e1!3m7!1slX2sjSnMwQZOqb1VYtQRFw!2e0!7i13312!8i6656!9m2!1b1!2i41), the text may be centered a bit differently too. I may just have to eyeball it.
I'm interested in doing this, yes, but it's a low priority. Got a few things on my plate. :)
Title: Re: Clinched Routes Highway Shields
Post by: yakra on February 03, 2018, 03:07:23 pm
Riscussion re Manitoba Provincial Roads shields split and merged into the Manitoba Provincial Roads thread.
http://tm.teresco.org/forum/index.php?topic=2344.msg8872#msg8872
Title: Re: Clinched Routes Highway Shields
Post by: yakra on February 04, 2018, 11:26:05 am
State abbreviations in out-of-state route segments:

tm.teresco.org/hb/?r=pa.ny017swa
tm.teresco.org/hb/?r=ct.ny120agre

tm.teresco.org/hb/?r=nh.me113cha
tm.teresco.org/hb/?r=nh.me113con
Title: Re: Clinched Routes Highway Shields
Post by: Eth on February 07, 2018, 05:26:25 pm
State abbreviations in out-of-state route segments:

tm.teresco.org/hb/?r=pa.ny017swa
tm.teresco.org/hb/?r=ct.ny120agre

tm.teresco.org/hb/?r=nh.me113cha
tm.teresco.org/hb/?r=nh.me113con

See also http://tm.teresco.org/hb/?r=ga.tn068.
Title: Re: Clinched Routes Highway Shields
Post by: Jim on May 15, 2018, 10:45:23 am
Does anyone know where the fonts were downloaded?  They're in our repository and I'm not sure they should be.  At the least, we need a credits entry about the fonts.
Title: Re: Clinched Routes Highway Shields
Post by: rschen7754 on May 15, 2018, 02:20:50 pm
2005: https://n1en.org/roadgeek-fonts/

2014: https://github.com/sammdot/roadgeek-fonts

There's a few one-off fonts in there that I would have to look closer at.
Title: Re: Clinched Routes Highway Shields
Post by: si404 on January 12, 2021, 04:16:05 pm
Some more basic cartouche style shields (though the list on page 1 isn't, IIRC, finished being implemented) as Jim is doing shield stuff this afternoon:

ausm*, ausa*, ausxxxb, ausxxxc, ausr - green background, yellow text, prefix
finst, frolv - white background, black text, no prefix
gbnb, nirb, irlr - white background, black text, prefix
fraxxxd - yellow background, black text, prefix (includes overseas stuff like reu, glp, guf, myt, mtq)
fraxxxm, fracort - cyan background, white text, prefix
ukrm - blue background, white text, prefix
espxx - orange background, white text, prefix with dash** (except for espct)
espn, espct - red background, white text, prefix with dash** (espn already done, just letting you know its the same template)

That'll be enough for now.

*some states use an National Highway sign with an alphanumeric number, but we'll leave that for now.
**espn has a dash between prefix and number automatically inserted. espxx and espa (which has shields) also have a dash between prefix and number.
Title: Re: Clinched Routes Highway Shields
Post by: michih on January 13, 2021, 01:15:54 pm
@Jim, please note that the svg files are also used in showroute.

e.g. bela shield looks good on clinched.php (https://tmstage.teresco.org/shields/clinched.php?u=michih&cort=traveled) but 1-digit numbers look bad on showroute.php (https://tmstage.teresco.org/hb/showroute.php?u=michih&r=bel.a001&cr) - it was the same with the old shield (https://travelmapping.net/hb/showroute.php?u=michih&r=bel.a001).

Just do make the shield shi* more complicated....
Title: Re: Clinched Routes Highway Shields
Post by: Jim on January 13, 2021, 01:38:26 pm
As you might have noticed, I'm starting to put some shield generation items from this thread into GitHub Issues, where I (and hopefully others) can more easily find them and discuss on a case-by-case basis and close when fixed/improved/implemented.
Title: Re: Clinched Routes Highway Shields
Post by: Jim on January 13, 2021, 01:43:00 pm
@Jim, please note that the svg files are also used in showroute.

e.g. bela shield looks good on clinched.php (https://tmstage.teresco.org/shields/clinched.php?u=michih&cort=traveled) but 1-digit numbers look bad on showroute.php (https://tmstage.teresco.org/hb/showroute.php?u=michih&r=bel.a001&cr) - it was the same with the old shield (https://travelmapping.net/hb/showroute.php?u=michih&r=bel.a001).

Just do make the shield shi* more complicated....

Reopened https://github.com/TravelMapping/Web/issues/590 for this.
Title: Re: Clinched Routes Highway Shields
Post by: michih on January 13, 2021, 01:46:19 pm
As you might have noticed

yep, I just needed a place for my general note that the shields are always used twice: on clinched.php and on showroute.php. One must always check that new shields work on both.
Title: Re: Clinched Routes Highway Shields
Post by: Jim on January 13, 2021, 05:48:35 pm
I've put the changes I made so far to the shield generator and to the clinched.php page up on the main server to get more eyes on it.  I am not sure how much more time I can put in on this, but at least I feel like I understand the code better and can be useful in improving it going forward.  There are also lots of GitHub Issues about various systems that need attention.  If you're interested in the shield generator, you can check those out at https://github.com/TravelMapping/Web/labels/Shield%20Generator

Title: Re: Clinched Routes Highway Shields
Post by: Markkos1992 on January 17, 2021, 09:26:02 am
I like the basis of what you did here.  We could probably add in "BUSINESS", "ALTERNATE", "TRUCK", etc. banners as shown in the field now without many changes.

Of course, who knows how we would handle the PA ALT TRUCK routes...
Title: Re: Clinched Routes Highway Shields
Post by: yakra on January 17, 2021, 11:22:11 am
2 banners.
Title: Re: Clinched Routes Highway Shields
Post by: Jim on January 17, 2021, 07:28:59 pm
canqc shields are live on the main site.  Surprisingly straightforward.  I might almost kind of sort of partially understand a bit about the SVG format and the shieldgen code.
Title: Re: Clinched Routes Highway Shields
Post by: Bickendan on January 20, 2021, 11:25:37 pm
I'll note that the AH routes in India have proper shields.
Title: Re: Clinched Routes Highway Shields
Post by: Jim on January 30, 2021, 06:42:39 pm
I had a few minutes and felt like tackling a small project - got canon shields live on the main site.  It looks like I can reasonably use the same for canonf.
Title: Re: Clinched Routes Highway Shields
Post by: mapcat on January 30, 2021, 08:15:08 pm
Thanks for working on these. The shapes look good, although the font is off.
Title: Re: Clinched Routes Highway Shields
Post by: Jim on January 30, 2021, 11:03:15 pm
Not sure what's up with the usaon font.

I'm working my way through shields for lots of usasf routes, mostly alphabetically but I jumped ahead for a few when convenient.  Will continue.
Title: Re: Clinched Routes Highway Shields
Post by: rickmastfan67 on January 31, 2021, 02:05:44 am
I had a few minutes and felt like tackling a small project - got canon shields live on the main site.  It looks like I can reasonably use the same for canonf.

Looks good Jim, however, those are what they use on BGS's (and occasional 'TO' shields on the ground using the Green color (https://goo.gl/maps/7rbkzmLNRfVDGLe79)).  These are the shields they use on the roads themselves (https://goo.gl/maps/jjatn4DcC4FeEjWb8) that you're more likely to see when you're nowhere near a highway that uses BGS's. https://en.wikipedia.org/wiki/Ontario_Highway_66#/media/File:Ontario_66.svg
Title: Re: Clinched Routes Highway Shields
Post by: Jim on January 31, 2021, 09:00:24 am
I had a few minutes and felt like tackling a small project - got canon shields live on the main site.  It looks like I can reasonably use the same for canonf.

Looks good Jim, however, those are what they use on BGS's (and occasional 'TO' shields on the ground using the Green color (https://goo.gl/maps/7rbkzmLNRfVDGLe79)).  These are the shields they use on the roads themselves (https://goo.gl/maps/jjatn4DcC4FeEjWb8) that you're more likely to see when you're nowhere near a highway that uses BGS's. https://en.wikipedia.org/wiki/Ontario_Highway_66#/media/File:Ontario_66.svg

Thatr's the one I really want but every SVG I've found is in a format that doesn't work with our shield generator.  I need one where the text of the route number can easily be replaced with a pattern that can then be replaced.  There's probably an easy way to save it in a format like we need, but I don't know what that way is...
Title: Re: Clinched Routes Highway Shields
Post by: rickmastfan67 on January 31, 2021, 01:45:24 pm
https://commons.wikimedia.org/wiki/Category:Ontario_Highway_shields#/media/File:Ontario_blank.svg ?  Hopefully you can also figure out how to do the 'A' & 'B' the way they are on those shields too.

Plus, when we do 'canonf', is there anyway we can get the 'blue' one for the 3 toll routes (407, 412, 418) & the yellow/blue one for the QEW (https://commons.wikimedia.org/wiki/Category:Ontario_Highway_shields#/media/File:Ontario_QEW.svg)?
Title: Re: Clinched Routes Highway Shields
Post by: Jim on January 31, 2021, 02:41:27 pm
https://commons.wikimedia.org/wiki/Category:Ontario_Highway_shields#/media/File:Ontario_blank.svg ?  Hopefully you can also figure out how to do the 'A' & 'B' the way they are on those shields too.

Same problems with those as the others I've seen - no obvious way to replace the text for the numbers with something suitable for search and replace by the script.

Quote
Plus, when we do 'canonf', is there anyway we can get the 'blue' one for the 3 toll routes (407, 412, 418) & the yellow/blue one for the QEW (https://commons.wikimedia.org/wiki/Category:Ontario_Highway_shields#/media/File:Ontario_QEW.svg)?

QEW and 407 went in yesterday.  I didn't know that 412 and 418 were also toll roads.  I suppose I could treat those also as special cases being only 3 of them total.

I'd like a general solution for the other canon/canonf routes.
Title: Re: Clinched Routes Highway Shields
Post by: rickmastfan67 on January 31, 2021, 02:52:33 pm
https://commons.wikimedia.org/wiki/Category:Ontario_Highway_shields#/media/File:Ontario_blank.svg ?  Hopefully you can also figure out how to do the 'A' & 'B' the way they are on those shields too.

Same problems with those as the others I've seen - no obvious way to replace the text for the numbers with something suitable for search and replace by the script.

Quote
Plus, when we do 'canonf', is there anyway we can get the 'blue' one for the 3 toll routes (407, 412, 418) & the yellow/blue one for the QEW (https://commons.wikimedia.org/wiki/Category:Ontario_Highway_shields#/media/File:Ontario_QEW.svg)?

QEW and 407 went in yesterday.  I didn't know that 412 and 418 were also toll roads.  I suppose I could treat those also as special cases being only 3 of them total.

I'd like a general solution for the other canon/canonf routes.

Yep, 412 & 418 are toll highways.

Well, hopefully we can get the Garnier & DVP out of canonf soon when we activate cannf to cut down on any issues too.

And can you provide me a link to a SVG that works for your purposes, and then I can take a look at the Ontario one inside of Inkscape and see what can be done to fix any issues?

Or is the issues you having is the 'ONTARIO' text on the bottom of the shield?  If that's the issue, I know how to convert that to non-text inside of Inkscape. (edit, nm on that, it's not text, it's already a shape, just checked)
Title: Re: Clinched Routes Highway Shields
Post by: Jim on January 31, 2021, 02:58:51 pm
You can see all of the current shield templates in GitHub in https://github.com/TravelMapping/Web/tree/master/shields in the template_ files.  You can see when you view the SVGs as text that most have a ***NUMBER*** that gets replaced to generate the actual shield.  The Ontario SVGs I've found so far all seem to go character by character with a lot of code I don't understand well.  Any help on this would be great!
Title: Re: Clinched Routes Highway Shields
Post by: rickmastfan67 on January 31, 2021, 03:12:24 pm
You can see all of the current shield templates in GitHub in https://github.com/TravelMapping/Web/tree/master/shields in the template_ files.  You can see when you view the SVGs as text that most have a ***NUMBER*** that gets replaced to generate the actual shield.  The Ontario SVGs I've found so far all seem to go character by character with a lot of code I don't understand well.  Any help on this would be great!

Interesting.  I'll see what I can do!  Might also 'cleanup' the Ontario shields as well (merge items together to make it smaller in size) as well.

Are all the ***NUMBER*** lines in Arial in each of the SVGs? If so, a copy/paste into the Ontario file should be easy.  All then would require is the cleanup I mentioned above to cut the file size down.
Title: Re: Clinched Routes Highway Shields
Post by: Jim on January 31, 2021, 03:28:49 pm
There are a variety of fonts used throughout the shield templates.  Maybe the right one's in there somewhere.
Title: Re: Clinched Routes Highway Shields
Post by: Jim on January 31, 2021, 03:48:31 pm
I am wondering whether the way these Ontario SVGs store the code for the numbers is done to avoid the need for the font, storing the geometry of each character right in the file.
Title: Re: Clinched Routes Highway Shields
Post by: andrepoiy on February 02, 2021, 10:54:34 am
So the 407 in Ontario has two sections, a privately-owned section and a government-owned section. The privately-owned section uses a different shield, which can be found here:
https://en.wikipedia.org/wiki/Ontario_Highway_407#/media/File:407_Express_Toll_Route_Traffic_Sign.svg

Here is a Google Streetview of the shield: https://www.google.ca/maps/@43.7884043,-79.5127916,3a,15y,94.69h,89.54t/data=!3m6!1e1!3m4!1sbhEcgy75GjdaiFvBdpjMdw!2e0!7i16384!8i8192

Title: Re: Clinched Routes Highway Shields
Post by: rickmastfan67 on February 02, 2021, 11:02:04 am
We know.  However, at this time, we can only have 1 shield.  Thus, the 'Ontario' version is the best option.

Had ETR built the new segments and used the same shield, we would have used that shield instead.
Title: Re: Clinched Routes Highway Shields
Post by: mapcat on February 02, 2021, 03:32:36 pm
We know.  However, at this time, we can only have 1 shield.  Thus, the 'Ontario' version is the best option.

Well, we certainly could have two shields if we had separate files for ON 407 and 407 ETR.
Title: Re: Clinched Routes Highway Shields
Post by: yakra on February 02, 2021, 05:23:22 pm
Tennessee, Vermont, Pennsylvania, IDK about Florida...

For cantch, CHM had animated gifs for Provinces where the route number changed, such as ON, QC or NS.
ISTR (rustier here) usapa was similar for routes that has "PA Turnpike ##"-shielded segments.

TM does SVG instead of GIF. Maybe add some JavaScript to shieldgen.php to continually swap out some innerHTML, SVG to SVG to SVG...?
https://github.com/TravelMapping/Web/issues/614
Title: Re: Clinched Routes Highway Shields
Post by: rickmastfan67 on February 02, 2021, 10:19:23 pm
I am wondering whether the way these Ontario SVGs store the code for the numbers is done to avoid the need for the font, storing the geometry of each character right in the file.

Who knows Jim.  Anyways, I'm still progressing on cleaning up the shield from Wikipedia.  Found a few flaws with it, like it wasn't properly centered at all, meaning a good amount of time making sure each side was properly synced & centered.  Once I'm done cleaning it up, I'll create fixed 407, 412, 418, & QEW shields too.

Which also reminds me, do we have access to the 'Blue Highway' font for the shields on the site?  I remember back in the day when I created the original Ontario shields for CHM (sadly, not compatible with SVG), that was the font I used for the lettering/numbers (Century Schoolbook for the QEW, but that can be turned into a vector at least).

Also, how hard is it to do 'Superscript' text?  That would be needed for the 'A' & 'B' highways in Ontario.
Title: Re: Clinched Routes Highway Shields
Post by: Jim on February 02, 2021, 11:00:06 pm
Thanks.  If the 407/412/418 can be a template, that would be good.  QEW is unique so that can be any SVG as long as it has an appropriate viewBox.

I'm not sure on font availability or how to find them.  Many of the SVGs seem to use various Roadgeek fonts.  You can see font specifications in many of the .svg templates, most of which were part of the initial implementation of the shield generator, which I was not involved in.

Best I can tell for the superscript, we would make that a separate replaceable text element like the ***NUMBER*** in most of the templates.
Title: Re: Clinched Routes Highway Shields
Post by: Duke87 on February 04, 2021, 12:03:41 am
Tennessee, Vermont, Pennsylvania, IDK about Florida...

For cantch, CHM had animated gifs for Provinces where the route number changed, such as ON, QC or NS.
ISTR (rustier here) usapa was similar for routes that has "PA Turnpike ##"-shielded segments.

TM does SVG instead of GIF. Maybe add some JavaScript to shieldgen.php to continually swap out some innerHTML, SVG to SVG to SVG...?
https://github.com/TravelMapping/Web/issues/614

I would prefer two shields side by side to an animation, personally.
Title: Re: Clinched Routes Highway Shields
Post by: yakra on February 04, 2021, 11:24:28 am
I would prefer two shields side by side to an animation, personally.
ON & QC TCH, though...
Title: Re: Clinched Routes Highway Shields
Post by: Bickendan on February 06, 2021, 04:30:21 am
I have Blue Highway, Blue Highway Condensed, and Blue Highway D installed on my computer.
If you need them, I can make it available.
Title: Re: Clinched Routes Highway Shields
Post by: vdeane on February 06, 2021, 06:55:59 pm
I would prefer two shields side by side to an animation, personally.
ON & QC TCH, though...
Right now they only use the generic shield, which is what's actually posted in the field.  Adding numbers would be creating shields that don't exist in reality.  The chances of Québec changing to putting the number in the shield is probably zero; not only do they have a, let's shall we say, interesting relationship with the rest of Canada, the mainline TCH is soon to be entirely concurrent with the autoroute system, and I imagine they would want to keep those shields as primary (unlike ON, where they use the same shield as the rest of the provincial system, just with a 4xx number).  Regarding Ontario, even if they did start posting the shields with a number in there, the only TCH section in TM that has more than two is the Georgian Bay one - and that will change when they get ON 400 completed.

Regarding ON 407 specifically, it could be argued that it's not disimilar to things like CO 470/E470 or I-590/NY 590, especially given this sign (https://www.asphaltplanet.ca/ON/hwy_407-409_images/407_dv_109_west_Jun16.jpg).
Title: Re: Clinched Routes Highway Shields
Post by: yakra on February 07, 2021, 10:24:27 am
I'll maintain that an animation would be the more future-proof solution, should there be anything using more than 2 shields in the future.
Title: Re: Clinched Routes Highway Shields
Post by: vdeane on February 07, 2021, 06:17:45 pm
I'm not really a fan of how the animation looked on CHM, though it might be better for things like the traveled routes/clinched routes pages as well.  I guess the question is, how often does this come up, and how much does it matter?  VT has a clear state route shield, with the other one being a way to show off which routes are maintained by towns.  It's a similar story for the PA Turnpike routes.  ON 407 arguably should be split.  And ON's TCH segments might need to be changed/split if they ever did switch, since the reason they're defined as they are is because they historically had shields with names in them.

And not everyone who's been on a route would have been on every shield... I imagine someone who's only been on PA 66 might be surprised with a PA Turnpike 66 shield blipping in and out on their pages.
Title: Re: Clinched Routes Highway Shields
Post by: Duke87 on February 07, 2021, 10:04:45 pm
Yeah I don't see the TCH being an issue since ON and QC don't put numbers in it. Only one shield would be needed for each route there.

If there's a need for more than two shields in the future, I mean, if we can do two shields side by side, why not three? I don't see this as inherently less future proof. I do see it as more aesthetically appealing. It also matches (https://en.wikipedia.org/wiki/Ontario_Highway_407) existing practice on Wikipedia. (https://en.wikipedia.org/wiki/Pennsylvania_Route_66)


On another note... what is that font on the Ontario shields?
Title: Re: Clinched Routes Highway Shields
Post by: yakra on February 07, 2021, 10:07:42 pm
https://en.wikipedia.org/wiki/Zero_one_infinity_rule
Title: Re: Clinched Routes Highway Shields
Post by: Jim on February 07, 2021, 10:09:16 pm
On another note... what is that font on the Ontario shields?

Those are hopefully temporary.  If I can get my hands on a version of the SVG for this style:

https://en.wikipedia.org/wiki/List_of_provincial_highways_in_Ontario#/media/File:Ontario_17.svg

that plays nicely with our text substitution for generating shields, I'll put them in place.  See https://github.com/TravelMapping/Web/issues/599 and discussions elsewhere on the forum.
Title: Re: Clinched Routes Highway Shields
Post by: Jim on February 07, 2021, 10:12:45 pm
I think a key point here is that in most cases, only one shield is needed.  If a route carries multiple designations, those are in different systems.  So if you're looking at canon or canonf, you'll see an Ontario shield, if you're looking at cantch, you should see a TCH shield.  I'm thinking for the other cases, the effort to get multiple shields in will far outweigh the benefit.
Title: Re: Clinched Routes Highway Shields
Post by: Duke87 on February 07, 2021, 10:30:35 pm
https://en.wikipedia.org/wiki/Zero_one_infinity_rule

I mean, when I say "if we can do two, why not three" the same logic says "if we can do n, why not n+1" for all positive integer values of n. It would get cumbersome as the number gets larger, but the same would be true of animations.

That said... what is the actual maximum number of distinct shields that exists for different segments of the same route? Puerto Rico would give us four. Any five or greater examples?
Title: Re: Clinched Routes Highway Shields
Post by: yakra on February 07, 2021, 10:51:44 pm
Larger values of n, if not animated, would take up a larger amount of real estate onscreen. Animation uses an extra (time) dimension to avoid that problem.
Title: Re: Clinched Routes Highway Shields
Post by: si404 on February 08, 2021, 06:16:47 am
I'd quite like double shields for British Islands (ENG, IMN, JEY, NIR, SCT, WLS) for routes with both primary and non-primary sections.

It'll be awkward though - I've got to go through gbna, imna, jeya, jeyb and nira and put them into three categories - primary, non-primary, both - and then the primary routes have yellow-on-green cartouches, the non-primary routes have black-on-white cartouches, and the both have both (either alternating or not).

It's a bit like Tennessee - there's a system of numbers, and then, on top, there's a set of roads classed as primary with different shields, but the numbers don't change.
Title: Re: Clinched Routes Highway Shields
Post by: Jim on February 09, 2021, 09:39:36 pm
Inner Loop got its shield within minutes of its inclusion in the DB, and I fixed the Lake Ontario State Parkway (which looked blank but was really just clipping a tiny corner of a giant image).
Title: Re: Clinched Routes Highway Shields
Post by: Bickendan on February 11, 2021, 04:03:08 am
Hungarian shields are miscentering text.
Title: Re: Clinched Routes Highway Shields
Post by: michih on February 11, 2021, 05:24:29 am
Hungarian shields are miscentering text.

yep, we know but have no clue why: https://github.com/TravelMapping/Web/issues/615 Anyone?
Title: Re: Clinched Routes Highway Shields
Post by: theFXexpert on February 11, 2021, 12:33:29 pm
Try readjusting the x coordinate in the tspan element so that it is centered for most cases (something like around 50).
Maybe reduce the letter spacing too.
Title: Re: Clinched Routes Highway Shields
Post by: Jim on February 11, 2021, 02:31:28 pm
Try readjusting the x coordinate in the tspan element so that it is centered for most cases (something like around 50).
Maybe reduce the letter spacing too.

Thanks for the tip.  I modified it so it looks quite a bit better.
Title: Re: Clinched Routes Highway Shields
Post by: theFXexpert on February 11, 2021, 06:50:04 pm
I reloaded the cache and still doesn't look quite right.

x="52" appears to work best

same with the hunf system.
Title: Re: Clinched Routes Highway Shields
Post by: michih on February 12, 2021, 02:18:59 am
I reloaded the cache and still doesn't look quite right.

It looks perfect on showroute.php (but isn't since the spaces and line break are still there) but not on clinched.php (well, M1-M5 are fine but M6 and the like are shitty)

(https://forum.travelmapping.net/index.php?action=dlattach;topic=288.0;attach=364)

same with the hunf system.

looks fine. I didn't spot anything wrong.
Title: Re: Clinched Routes Highway Shields
Post by: theFXexpert on February 12, 2021, 01:34:22 pm
Weird. This is what I see on clinched.php
Showroute.php looks the same. This is viewed with Chrome-based Microsoft Edge and it looks the same on Android Chrome
(https://i.imgur.com/lQI2qBH.png)
(https://i.imgur.com/IbsSivJ.png)
Title: Re: Clinched Routes Highway Shields
Post by: michih on February 12, 2021, 01:43:33 pm
This is viewed with Chrome-based Microsoft Edge and it looks the same on Android Chrome

yep, same here with Edge. Also bela shields are crap. My screenshot was taken with Firefox though.

The browser-dependencies are the reason why I don't deal with shield anymore.
Title: Re: Clinched Routes Highway Shields
Post by: Jim on February 14, 2021, 12:07:11 pm
I've got canon and canonf using the better shields now.  What other than 407 should use the blue version?
Title: Re: Clinched Routes Highway Shields
Post by: mapcat on February 14, 2021, 01:02:41 pm
The new ones look great! 412 needs a blue shield, and I assume 418 does too.
Title: Re: Clinched Routes Highway Shields
Post by: rickmastfan67 on February 14, 2021, 08:09:16 pm
I've got canon and canonf using the better shields now.  What other than 407 should use the blue version?

412 & 418

Still working on my cleaned up version.  Will let you know once it's done.
Title: Re: Clinched Routes Highway Shields
Post by: Jim on February 14, 2021, 08:44:15 pm
412 and 418 are blue now.  These are treated as special cases like 407.  Other canon and 40x use the template.
Title: Re: Clinched Routes Highway Shields
Post by: Jim on February 14, 2021, 10:08:16 pm
I've removed the extra letter from (all) usausb shields that shouldn't be in (most of) them.

The problematic cases are ones like US 20A in New York, which is signed as such rather than Alt US 20.  Not sure how best to handle those cases generically.  I could add a handful of special cases.
Title: Re: Clinched Routes Highway Shields
Post by: mapcat on February 14, 2021, 11:23:15 pm
I've removed the extra letter from (all) usausb shields that shouldn't be in (most of) them.

The problematic cases are ones like US 20A in New York, which is signed as such rather than Alt US 20.  Not sure how best to handle those cases generically.  I could add a handful of special cases.

If you could do special cases, that would be great. Alt US 20 in Ohio also uses the 20A format (that's the only one I'm aware of). Same for 31A, 41A, & 70A in Tennessee (but not 127 Alt).

Assume that you want to replace the "Bus", "Alt" etc wording above each with a banner eventually?

The "BL" & "BS" above the usaib shields seems unnecessary.

Do you need anything in order to create the KY parkway signs?
Title: Re: Clinched Routes Highway Shields
Post by: Jim on February 15, 2021, 08:13:03 am
If you could do special cases, that would be great. Alt US 20 in Ohio also uses the 20A format (that's the only one I'm aware of). Same for 31A, 41A, & 70A in Tennessee (but not 127 Alt).

Let's see if we can get a list.  I think Maine does US 1A rather than an Alt banner. 

Are those different from routes like 9W, and the E/W and N/S splits?  Should they be moved to usaus?

Quote
Assume that you want to replace the "Bus", "Alt" etc wording above each with a banner eventually?

Yes, longer term.  https://github.com/TravelMapping/Web/issues/618

Quote
The "BL" & "BS" above the usaib shields seems unnecessary.

They'd end up being a special case since those are specified in the "Banner" field.  I think if and when the banners are made into graphical shields, they could more easily be omitted.

Quote
Do you need anything in order to create the KY parkway signs?

I need SVGs for them.  Do the shields on this page look reasonable?  The files look like they should be good to drop in.

https://en.wikipedia.org/wiki/List_of_parkways_and_named_highways_in_Kentucky
Title: Re: Clinched Routes Highway Shields
Post by: mapcat on February 15, 2021, 08:34:43 am
Are those different from routes like 9W, and the E/W and N/S splits?  Should they be moved to usaus?

No, I think usausb is the right place for them.

Quote
I need SVGs for them.  Do the shields on this page look reasonable?  The files look like they should be good to drop in.

https://en.wikipedia.org/wiki/List_of_parkways_and_named_highways_in_Kentucky (https://en.wikipedia.org/wiki/List_of_parkways_and_named_highways_in_Kentucky)


Not quite. These SVGs are better, although the blue is off; it should be a brighter blue. UK basketball blue (https://en.wikipedia.org/wiki/Kentucky%E2%80%93Louisville_rivalry#/media/File:Kentucky_Wildcats_logo.svg).

Audubon (https://en.wikipedia.org/wiki/File:Audubon_Parkway_fair_use.svg#/media/File:Audubon_Parkway_fair_use.svg)
Bluegrass (https://en.wikipedia.org/wiki/File:Bluegrass_Parkway_fair_use.svg#/media/File:Bluegrass_Parkway_fair_use.svg)
Cumberland (https://en.wikipedia.org/wiki/Cumberland_Parkway#/media/File:Cumberland_Parkway_fair_use.svg)
Hal Rogers
 (https://en.wikipedia.org/wiki/Hal_Rogers_Parkway#/media/File:Hal_Rogers_Parkway_fair_use.svg)Mountain (https://en.wikipedia.org/wiki/File:Mountain_Parkway_fair_use.svg#/media/File:Mountain_Parkway_fair_use.svg)
Pennyrile (https://en.wikipedia.org/wiki/File:Pennyrile_Parkway_fair_use.svg#/media/File:Pennyrile_Parkway_fair_use.svg)
Purchase (https://en.wikipedia.org/wiki/Purchase_Parkway#/media/File:Purchase_Parkway_fair_use.svg)
Western KY (https://en.wikipedia.org/wiki/File:Western_Kentucky_Parkway_fair_use.svg#/media/File:Western_Kentucky_Parkway_fair_use.svg)
Title: Re: Clinched Routes Highway Shields
Post by: Jim on February 15, 2021, 09:41:47 am
Thanks for the links to the better SVGs.  Unfortunately, they're not public domain like all of the others I've brought in.  If anyone who knows the rules for this kind of thing better than I do can verify that we can legally use them on TM, let me know and I will bring them in.
Title: Re: Clinched Routes Highway Shields
Post by: yakra on February 15, 2021, 11:55:35 am
I've removed the extra letter from (all) usausb shields that shouldn't be in (most of) them.

The problematic cases are ones like US 20A in New York, which is signed as such rather than Alt US 20.  Not sure how best to handle those cases generically.  I could add a handful of special cases.
Personally, I've no big problem with the 'A' remaining in place as a stopgap until we get actual banners working, but what's done is done...
Getting Business banners etc. working would also be useful for state systems.

I think Maine does US 1A rather than an Alt banner.
For A/Alt specifically, that's correct.
The state's one Business route consistently uses a Business banner, though there is this (https://www.google.com/maps/@44.0314958,-69.5442899,3a,19.3y,33.3h,87.75t/data=!3m9!1e1!3m7!1sEJAFx9JNVC1P9COymsa2tQ!2e0!7i13312!8i6656!9m2!1b1!2i40) one (https://www.google.com/maps/@44.0315226,-69.5444849,3a,15y,53.82h,87.89t/data=!3m6!1e1!3m4!1sI28eqXu51MFVGjr2zRqpsA!2e0!7i13312!8i6656) longstanding oddity...

That said, if banners are implemented, I'd also have no problem with just implementing them consistently across the site. Consistent with how waypoint labels are done.
Or, if we wanna go the extra mile and acknowledge A/Alt and B/Bus distinctions as individual states actually do them, hey, that's cool too.

Assume that you want to replace the "Bus", "Alt" etc wording above each with a banner eventually?

The "BL" & "BS" above the usaib shields seems unnecessary.
Am I missing something? Was banner text briefly included above the shield images, and then reverted?
Title: Re: Clinched Routes Highway Shields
Post by: rickmastfan67 on February 16, 2021, 04:02:45 am
Thanks for the links to the better SVGs.  Unfortunately, they're not public domain like all of the others I've brought in.  If anyone who knows the rules for this kind of thing better than I do can verify that we can legally use them on TM, let me know and I will bring them in.

We could always talk to HB over @ AARoads since he does work for Kentucky.  He even did provide me the decals for those routes that we used on the old CHM site.
Title: Re: Clinched Routes Highway Shields
Post by: Duke87 on February 16, 2021, 06:55:10 pm
Let's see if we can get a list.  I think Maine does US 1A rather than an Alt banner. 

Are those different from routes like 9W, and the E/W and N/S splits?  Should they be moved to usaus?

Maine and Arkansas both use letter suffixes consistently in lieu of banners. Connecticut's single surviving contribution is also "US 1A"

But this is a question of style - the rule holds that A = Alt, B = Business, etc. and so these routes do belong in usausb. This is distinct from directional suffixes (N/S/E/W) where the route is part of the primary rather than the auxiliary system.

Thanks for the links to the better SVGs.  Unfortunately, they're not public domain like all of the others I've brought in.  If anyone who knows the rules for this kind of thing better than I do can verify that we can legally use them on TM, let me know and I will bring them in.

The IP issue here is that the "Unbridled Spirit" logo is trademarked. Since this is part of the shield, it is not possible for a public domain graphic to exist unless it is modified to remove that logo.

Nonetheless, if Wikipedia is able to make a solid fair use case for using the partially trademarked shield in an article about the road, I think we'd be in the clear using the same to refer to the road.

Consider the four criteria for fair use under US law:
Quote
1) the purpose and character of the use, including whether such use is of a commercial nature or is for nonprofit educational purposes;
2)the nature of the copyrighted work;
3) the amount and substantiality of the portion used in relation to the copyrighted work as a whole; and
4) the effect of the use upon the potential market for or value of the copyrighted work.

Against these:
1) Our use would certainly be nonprofit and in some ways could be considered educational
2) The work is plastered all over Kentucky (not just on highway signs!), so it's not like they're shy about its publication. They're also not charging for copies of it so it's not like we'd be denying them any revenue.
3) We'd be using the whole work but it's a single logo
4) Our use would not diminish the value of the logo to the commonwealth of Kentucky, nor would it mislead any consumers into thinking something is associated or affiliated with them which isn't (a key consideration when dealing with trademarks specifically) - we're using their logo to identify their road.

If we're still concerned, we could always use the old shields (https://en.wikipedia.org/wiki/Audubon_Parkway#/media/File:Audubon_Parkway_Shield.png) that lack the Unbridled Spirit logo. ;)
Title: Re: Clinched Routes Highway Shields
Post by: Jim on February 16, 2021, 07:52:30 pm
Suggestion on the usausb routes that have the A or B suffix in their shields: leave them in usausb, but remove the banner field, and add the suffix to the route name.
Title: Re: Clinched Routes Highway Shields
Post by: yakra on February 16, 2021, 09:27:47 pm
Downvote.
Title: Re: Clinched Routes Highway Shields
Post by: the_spui_ninja on February 18, 2021, 12:38:12 am
If you could do special cases, that would be great. Alt US 20 in Ohio also uses the 20A format (that's the only one I'm aware of). Same for 31A, 41A, & 70A in Tennessee (but not 127 Alt).

Let's see if we can get a list.  I think Maine does US 1A rather than an Alt banner. 
The states I maintain use banners pretty much everywhere; since I'm from SD US 14A and US 16A are suffixed but all other usausb routes use banners.
Title: Re: Clinched Routes Highway Shields
Post by: the_spui_ninja on February 18, 2021, 01:54:39 pm
FYI the Northwest Parkway in Denver has a shield: ex. 1 (http://www.northwestparkway.org/) ex. 2 (https://www.google.com/maps/@39.9886637,-104.9872022,3a,15y,181.02h,121.65t/data=!3m6!1e1!3m4!1s6dXvrtdBFRyn-59MF8p-Nw!2e0!7i16384!8i8192)
I can't find a SVG of it anywhere, and I don't know enough about that type of coding to make one myself (otherwise I would and wouldn't bother you about it).
Title: Re: Clinched Routes Highway Shields
Post by: SSOWorld on February 18, 2021, 05:37:26 pm
FYI the Northwest Parkway in Denver has a shield: ex. 1 (http://www.northwestparkway.org/) ex. 2 (https://www.google.com/maps/@39.9886637,-104.9872022,3a,15y,181.02h,121.65t/data=!3m6!1e1!3m4!1s6dXvrtdBFRyn-59MF8p-Nw!2e0!7i16384!8i8192)
I can't find a SVG of it anywhere, and I don't know enough about that type of coding to make one myself (otherwise I would and wouldn't bother you about it).
ex. 3 (https://goo.gl/maps/vR6M1i5ecvvGBjZAA)
Title: Re: Clinched Routes Highway Shields
Post by: Jim on February 18, 2021, 05:54:09 pm
Easy enough to add if we can get an SVG-format version.
Title: Re: Clinched Routes Highway Shields
Post by: the_spui_ninja on February 18, 2021, 10:19:28 pm
Easy enough to add if we can get an SVG-format version.
I got it down to a PNG, then tried to convert that to an SVG using an online converter and it didn't work (see attached).
Title: Re: Clinched Routes Highway Shields
Post by: rschen7754 on February 20, 2021, 02:57:37 am
If I remember correctly there was talk of a major change to the shield generator that would necessitate redoing all of the shields. Is that still going forward? That was the main reason I stopped adding them.

As far as the turnpike shields, English Wikipedia (not Wikimedia Commons) is using them under fair use. (Wikimedia Commons, the central repository for Wikimedia projects, does not allow fair use). I don't know if what is being done here would qualify under fair use.
Title: Re: Clinched Routes Highway Shields
Post by: Jim on February 20, 2021, 09:37:20 am
If I remember correctly there was talk of a major change to the shield generator that would necessitate redoing all of the shields. Is that still going forward? That was the main reason I stopped adding them.

I think at this point, with recent additions and enhancements, and at least a few people who have a basic understanding of the code, we're likely to stick with what we have.  I'm not aware of anyone working on a major revamp.

A general offer related to this: if anyone wants to experiment with web front-end enhancements, including adding or improving shields, I can make you your own development/staging area on the TM server so you could try things out as you go and not have to submit pull requests and wait for me to put them up to see how things look.
Title: Re: Clinched Routes Highway Shields
Post by: Jim on February 20, 2021, 07:06:06 pm
PEI shields are on the main site.
Title: Re: Clinched Routes Highway Shields
Post by: Jim on February 20, 2021, 09:34:20 pm
BC shields are up, font is not right.  Anyone good at fonts?
Title: Re: Clinched Routes Highway Shields
Post by: theFXexpert on February 20, 2021, 10:45:06 pm
I assume you're trying to use series D for the BC shields?
The font families in the <text> and <tspan> elements are different. The inner most one <tspan> using series B takes precedent.
Title: Re: Clinched Routes Highway Shields
Post by: Jim on February 20, 2021, 11:25:09 pm
I assume you're trying to use series D for the BC shields?
The font families in the <text> and <tspan> elements are different. The inner most one <tspan> using series B takes precedent.

Thanks for catching that.  I wanted B or D depending on the number of digits.  Fixed.

What I was originally trying to do was to use "Swis721 BT" as in https://upload.wikimedia.org/wikipedia/commons/c/ce/BC-20.svg and https://upload.wikimedia.org/wikipedia/commons/2/23/BC-395.svg but it's clear I don't understand all the steps.  I put some font files I downloaded into our /fonts to test but none seemed to take effect.
Title: Re: Clinched Routes Highway Shields
Post by: theFXexpert on February 21, 2021, 03:42:04 pm
What I was originally trying to do was to use "Swis721 BT" as in https://upload.wikimedia.org/wikipedia/commons/c/ce/BC-20.svg and https://upload.wikimedia.org/wikipedia/commons/2/23/BC-395.svg but it's clear I don't understand all the steps.  I put some font files I downloaded into our /fonts to test but none seemed to take effect.
The relevant file appears to be roadgeek.css in the fonts directory https://github.com/TravelMapping/Web/blob/master/fonts/roadgeek.css
This css file establishes the font families utilized by the SVGs and associates them with font files on the server.
Title: Re: Clinched Routes Highway Shields
Post by: the_spui_ninja on February 23, 2021, 08:28:15 pm
Grand Tour of Switzerland SVG attached.
Title: Re: Clinched Routes Highway Shields
Post by: the_spui_ninja on February 24, 2021, 04:02:03 pm
Easy enough to add if we can get an SVG-format version.
I got it down to a PNG, then tried to convert that to an SVG using an online converter and it didn't work (see attached).
Attempted this a second time with the logo I pulled off the website; don't think there's copyright concerns since it's just text with geometric shapes.
Title: Re: Clinched Routes Highway Shields
Post by: Duke87 on February 24, 2021, 07:12:39 pm
Suggestion on the usausb routes that have the A or B suffix in their shields: leave them in usausb, but remove the banner field, and add the suffix to the route name.

I see this as being potentially messy since it would, for example, make it no longer possible to pull up every business route by querying the banner field.

I do like the idea of rendering shields in accordance with local custom, but this would most cleanly be done by having a flag specifically for that purpose rather than rearranging existing database fields.
Title: Re: Clinched Routes Highway Shields
Post by: yakra on February 27, 2021, 06:25:02 pm
Looks fine in firefox, but here are some screenshots from Chromium. Chrome behaves the same. Similar issues for bela & belb too.
Title: Re: Clinched Routes Highway Shields
Post by: theFXexpert on April 15, 2021, 10:51:03 am
Added some new shields late last night https://github.com/TravelMapping/Web/pull/640

Manatoba Provincial Roads (the secondary system canmbp), Northwest Territory, Guam, and Texas Recreation Roads.

The Winnipeg City Routes also had really really bold numbers on them that didn't look right compared to the field posts on Streetview, so I trimmed them down.

I don't know how well the Guam shields will look since they are vertically oriented unlike almost everything else we have.

While setting up a case statement for usatxre in shieldgen to parse the numbers, I think I came up with a solution to the long standing problem of shields getting messed up when a region's tier 4 routes cross into other regions. I set up a regular expression to strip out prefixes that are exactly 2 uppercase letters. This works better than the default case which does a simple string replace based on the region. The regular expression can handle edge cases like FLA1A, TXOSR, and VTF5 easily too. With few exceptions that are already handled elsewhere, this can parse most tier 4/5 systems in the US and Canada. In the pull request, I'm using cannt as a pilot for this (a small system that crosses into Alberta a couple times). I don't think I want to make this the default case since the default case may handle prefixes we want to keep or something else.
Title: Re: Clinched Routes Highway Shields
Post by: theFXexpert on April 21, 2021, 02:13:20 pm
4 character wide templates added for CT, MA, ME and VI https://github.com/TravelMapping/Web/pull/642
Other minor adjustments to other templates included.

cannt and usatxre look good using regex for shield generation, so I'll adjust most other tier 4/5 US and Canada systems to use it in a later pull request.
Title: Re: Clinched Routes Highway Shields
Post by: theFXexpert on April 29, 2021, 02:37:08 pm
cannt and usatxre look good using regex for shield generation, so I'll adjust most other tier 4/5 US and Canada systems to use it in a later pull request.
and here is the rest of it https://github.com/TravelMapping/Web/pull/644
I also modified the American Samoa template in this pull request.
Title: Re: Clinched Routes Highway Shields
Post by: theFXexpert on May 07, 2021, 01:20:35 pm
The above is live on the main site with a bonus canmb template although suffixes are plain for now.

What shields I plan to do next:
- canabs Alberta 500+ https://github.com/TravelMapping/Web/issues/606
- canons Ontario Secondary
- frad France Routes Départementales https://github.com/TravelMapping/Web/issues/594
- Great Britain/Northern Ireland B Roads; Ireland Regional https://github.com/TravelMapping/Web/issues/597
- Refined superscripted suffixes for canbc, canmb, canon

I'm looking into later doing:
- Australia systems https://github.com/TravelMapping/Web/issues/595
- Refining Arkansas + (special 980 Airport shields? Marine Fuel Tax shields?)
- Refining bannered Georgia Routes
Title: Re: Clinched Routes Highway Shields
Post by: theFXexpert on May 11, 2021, 01:09:13 pm
https://github.com/TravelMapping/Web/pull/648 Big one

New templates:
- frad, fram
- gbnb, nirb, irlr
- canabs
- canons

Updated/Optimized templates:
- Generic wide
- canbc refined suffixes
- canmb refined suffixes
- canon refined suffixes
- canonf
- hunm, hunf - Ran these through the Inkscape optimizer and got rid of a couple of useless scale transforms. Maybe this will help with the rendering inconsistences going on with it. https://github.com/TravelMapping/Web/issues/615

Let shields auto scale to fit height on clinched.php https://github.com/TravelMapping/Web/issues/71
Title: Re: Clinched Routes Highway Shields
Post by: Jim on May 11, 2021, 04:07:16 pm
https://github.com/TravelMapping/Web/pull/648 Big one

This has been pulled in and is up for testing at tmstage.teresco.org .
Title: Re: Clinched Routes Highway Shields
Post by: rickmastfan67 on May 11, 2021, 11:26:14 pm
theFXexpert, the Ontario secondary shields look great!  Plus thanks for getting the suffixes working on all the Ontario shields looking correct now!  ;D
Title: Re: Clinched Routes Highway Shields
Post by: si404 on May 12, 2021, 07:15:07 am
- gbnb, nirb, irlr
Liking these. And the B roads templates can be reused for other systems - the non-primary A roads, crown dependency stuff.

Need to work out an easy way to say which routes from those systems need what shields - primary, non-primary or both. I've made a .csv documenting this (https://github.com/TravelMapping/HighwayData/blob/master/hwy_data/ENG/pnpb.csv). It really ought to be a semi-automated process, as manually throwing in hundreds of exceptions isn't going to be good.

imnb and jeyc can use these white shields now, as they are all non-primary. The others (gnba, nira, imna, jeya and jeyb) have a mix.

---

Should the R road template not have slightly rounded external corners rather than square external ones? The signs (https://en.wikipedia.org/wiki/File:IMG_NumberedLane5597.jpg) have rounded corners, but not rounded as much as the internal boundary. The square corners look odd.

---

Mostly for me, but yellow shielded R roads. Seems like (cf R135 sign, where one direction is yellow, one isn't, and it's all the same vintage) its only meant to be parts (where the parallel road is a motorway? Or perhaps on some routes specifically a tolled motorway - eg M8). Only one or two routes are even mostly signed with yellow, rather than white. Ignore for now. It seems like when signs are replaced, they put the yellow on. But most of these signs are pretty new (as they came up with the idea after most of the motorway network had been built), so we're looking at a good decade from now, if not longer, before most of the signs are even thought of wrt replacement.

Thankfully it's only a few routes that would need these shields:
Title: Re: Clinched Routes Highway Shields
Post by: theFXexpert on May 12, 2021, 03:27:39 pm
Need to work out an easy way to say which routes from those systems need what shields - primary, non-primary or both. I've made a .csv documenting this (https://github.com/TravelMapping/HighwayData/blob/master/hwy_data/ENG/pnpb.csv). It really ought to be a semi-automated process, as manually throwing in hundreds of exceptions isn't going to be good.
I agree. Regardless of display method, identifying this some way in the csv side would be better for maintainability.
Or A Roads could be split into further subsystems (Motorways, primary, non-primary) but, I doubt that would be practical.

Should the R road template not have slightly rounded external corners rather than square external ones? The signs (https://en.wikipedia.org/wiki/File:IMG_NumberedLane5597.jpg) have rounded corners, but not rounded as much as the internal boundary. The square corners look odd.
The outside corner radius is 10 which looks quite square in clinched.php. (inside radius is 25)
The below modified mockup has 20 outer, 30 inner radius and increased border size from 5 to 10.

(https://i.imgur.com/ItT5bap.png)
         current | modified
Title: Re: Clinched Routes Highway Shields
Post by: si404 on May 20, 2021, 02:33:56 pm
Need to work out an easy way to say which routes from those systems need what shields - primary, non-primary or both. I've made a .csv documenting this (https://github.com/TravelMapping/HighwayData/blob/master/hwy_data/ENG/pnpb.csv). It really ought to be a semi-automated process, as manually throwing in hundreds of exceptions isn't going to be good.
I agree. Regardless of display method, identifying this some way in the csv side would be better for maintainability.
Or A Roads could be split into further subsystems (Motorways, primary, non-primary) but, I doubt that would be practical.
The motorways are already separate. Primary vs non-primary is difficult for multiple reasons:

1) Routes can and do change back and forth multiple times
2) signage can muck about and be ambiguous as to where the changes are
3) splitting is a whole lot more work - and not just for me, but also for travellers

I think the best we can do is working out whether a road is primary, non-primary or has bits of both - which I've already done - and then using multiple shields. But then that's more work on the web design.
Quote
The outside corner radius is 10 which looks quite square in clinched.php. (inside radius is 25)
The below modified mockup has 20 outer, 30 inner radius and increased border size from 5 to 10.

(https://i.imgur.com/ItT5bap.png)
         current | modified
The modified is better, I think.
Title: Re: Clinched Routes Highway Shields
Post by: yakra on May 25, 2021, 01:05:44 am
https://travelmapping.net/hb/showroute.php?r=ar.ar9152
https://travelmapping.net/hb/showroute.php?r=ar.ar7221a

I checked out a couple similar hyphenated routes in usala and those look good.
Title: Re: Clinched Routes Highway Shields
Post by: theFXexpert on May 29, 2021, 12:41:21 pm
https://travelmapping.net/hb/showroute.php?r=ar.ar9152
https://travelmapping.net/hb/showroute.php?r=ar.ar7221a

I checked out a couple similar hyphenated routes in usala and those look good.
Yeah. The hyphenated Arkansas routes have special "Marine Fuel Tax" shields that I'm interested in adding.
https://commons.wikimedia.org/wiki/File:Arkansas_915-2.svg

The shield generator has trouble parsing hyphenated routes that have a suffix too.
Title: Re: Clinched Routes Highway Shields
Post by: yakra on May 29, 2021, 01:08:44 pm
I've never really peeked under the hood of the shield generator. What's the relevant part of the code?
Title: Re: Clinched Routes Highway Shields
Post by: theFXexpert on May 29, 2021, 02:42:14 pm
Around line 658 of the latest version of shielden.php.
This is where the Arkansas specific case is.

Code: [Select]
    case 'usaar': // Arkansas
            $matches = [];
            $routeNum = str_replace('AR', "", $row['route']);
            if (preg_match('/(?<number>[0-9]+)(?<letter>[A-Za-z]+)/', $routeNum, $matches)) {
                $svg = str_replace("***NUMBER***", $matches['number'], $svg);
                $svg = str_replace("***LETTER***", $matches['letter'], $svg);
                break;
            }
The preg_match function takes each sub-pattern (?<number> and ?<letter>) and puts it into a corresponding array key in the array $matches.

[0-9]+ will match one or more numbers and store it in $matches['number'].
[A-Za-z]+ will match one or more letters case-insensitive and store it in $matches['letter'].

The str_replace functions then replace each array value into the SVG to give the effect of superscripted suffixes.

Hyphens are not accounted for in the matching code* and sees a number after a hyphen as another separate number. This will overwrite the number detected before the hyphen. Which is why 722-1A becomes just 1A.


*Hyphens have special meaning to depict ranges in a character class. [0-9] means: match the character '0' through character '9'. Literal hyphens can be included in a character class if it's escaped with a backslash '\' or placed where they can't be interpreted as a range such as [-0-9].
Title: Re: Clinched Routes Highway Shields
Post by: theFXexpert on July 17, 2021, 11:57:17 am
Pull for frad suffix refinement, irlr adjustment, and for imnb and jeyc to use the Great Britain B Roads template.

https://github.com/TravelMapping/Web/pull/656
Title: Re: Clinched Routes Highway Shields
Post by: theFXexpert on July 22, 2021, 09:03:45 pm
These Github tickets related to shields can probably be closed now

https://github.com/TravelMapping/Web/issues/71
https://github.com/TravelMapping/Web/issues/121
https://github.com/TravelMapping/Web/issues/194
https://github.com/TravelMapping/Web/issues/594
https://github.com/TravelMapping/Web/issues/596
https://github.com/TravelMapping/Web/issues/597
https://github.com/TravelMapping/Web/issues/603
https://github.com/TravelMapping/Web/issues/604
https://github.com/TravelMapping/Web/issues/606
https://github.com/TravelMapping/Web/issues/608
Title: Re: Clinched Routes Highway Shields
Post by: Jim on July 22, 2021, 10:03:51 pm
These Github tickets related to shields can probably be closed now ...

Thanks, closed.  And thanks for all the work improving the shields.
Title: Re: Clinched Routes Highway Shields
Post by: yakra on November 05, 2021, 04:23:14 pm
Should shields for double-bannered routes be shown in the opposite order, i.e. with the 1st listed banner on bottom & 2nd listed banner on top?
https://travelmapping.net/hb/showroute.php?r=tn.us070altbyphum
Title: Re: Clinched Routes Highway Shields
Post by: rickmastfan67 on November 08, 2021, 03:02:23 am
I think it should be.

Would also be better if we could instead have the shield show '70A' instead, due to that's how TN signs the base Alternate route(s).
Title: Re: Clinched Routes Highway Shields
Post by: the_spui_ninja on November 08, 2021, 06:27:27 pm
I think it should be.

Would also be better if we could instead have the shield show '70A' instead, due to that's how TN signs the base Alternate route(s).

This came up when the banners were introduced (starting at the below post on page 12), but I don't think there ever was an agreed-upon solution.

I've removed the extra letter from (all) usausb shields that shouldn't be in (most of) them.

The problematic cases are ones like US 20A in New York, which is signed as such rather than Alt US 20.  Not sure how best to handle those cases generically.  I could add a handful of special cases.
Title: Re: Clinched Routes Highway Shields
Post by: the_spui_ninja on November 08, 2021, 06:36:33 pm
Easy enough to add if we can get an SVG-format version.
I got it down to a PNG, then tried to convert that to an SVG using an online converter and it didn't work (see attached).
Attempted this a second time with the logo I pulled off the website; don't think there's copyright concerns since it's just text with geometric shapes.
This topic coming up again reminded me of the Northwest Parkway again; I took the PNG from Wikipedia and used an online SVG converter to make the attached file. It's a little janky but at the scale we'd be using it for I think it would be fine.
Title: Re: Clinched Routes Highway Shields
Post by: yakra on January 16, 2022, 08:27:16 pm
Is https://en.wikipedia.org/wiki/Fort_Bend_Parkway#/media/File:Fort_Bend_Parkway_Toll_Road_logo.png usable?