Increase character limit for shields #937
Comments
Author: tom[at]compton.nu There is certainly a length limit as I have only rendered the shield images up to a certain width. I'd have to check the source to see what that limt is though. |
Author: tom[at]compton.nu The current limit is 4 for motorways and 5 for everything else. The worst case in your examples seems to be a trunk with an 8 character reference? My only concern (other than all the duplication in the stylesheet) is that the shields are going to start getting pretty big if we allow that many characters... |
Author: craigermcgreger[at]yahoo.com Replying to [comment:2 tom[at]compton.nu]:
Ahh, that explains a lot. This has been driving me crazy for a long time...I should have come here sooner. :)
Sorry, I am not familiar with the stylesheet. As for the limit: in cases like this, I am not a fan of arbitrary limits. Who is to say what is too long? One person's legitimate need for a, say, 14-character shield may be another person's "too long". I would prefer that there were no limits, and shields that are perceived as being too long be addressed on a case-by-case basis. If there has to be a limit, however, 16 characters seems to be a good place to start. As you can see from the above, I have a legitimate need for 8-character shields; there is a possibility of longer shields, as we have some four-digit routes that must fit on to shields, spaces and all. |
Author: tom[at]compton.nu Because the shields are fixed bitmaps we have to pregenerate each one in varying widths to allow for the different sizes of reference that we may need to fit on them. That then means that we need to duplicate the logic for rendering shields for each length so that it can choose the right bitmap to render under the text. That's why I'm not keen on adding more widths than are strictly needed... Hopefully at some point mapnik will support the use of vector images that can be resized as required to fit the text. |
Author: craigermcgreger[at]yahoo.com Replying to [comment:4 tom[at]compton.nu]:
Ahh, I was not aware that the shields were generated in this manner. That definitely precludes unlimited shield length! However, while I understand and sympathize with the current situation, four and five characters is just too few for most of my shields. While I suggested 16 characters earlier, six would be a good start, and eight would make my day. For that matter, simply removing the four-character limit for motorways and letting them use five would go a long way. Thanks for your help. |
Author: tomhughes (In [8007]) Support shields up to 6 characters for motorways and 8 characters for |
Author: chriscf Re-opening. We have some strays in the UK for which this isn't rendering. They include little things such as "A404(M)", and more major entities such as "M6 Toll" (which properly includes a space". I believe that the only eight-character refs we have had were "A6127(M)" and "A6144(M)", of which the former has been renumbered and the latter downgraded, however, it remains possible that another four-digit A-road is upgraded in future, or a two-digit motorway by-passed with a toll road, so eight characters needs to be supported on motorways too. |
Author: chriscf Examples: [http://www.openstreetmap.org/?lat=52.6489&lon=-1.8497&zoom=12&layers=B000FTF M6 Toll] [http://www.openstreetmap.org/?lat=51.4317&lon=-0.8589&zoom=12&layers=B000FTF A329(M)] [http://www.openstreetmap.org/?lat=51.4987&lon=-0.7404&zoom=13&layers=B000FTF A308(M) A404(M)] [http://www.openstreetmap.org/?lat=54.9289&lon=-1.5275&zoom=13&layers=B000FTF A194(M)] [http://www.openstreetmap.org/?lat=54.97767&lon=-1.60822&zoom=15&layers=B000FTF A167(M)] [http://www.openstreetmap.org/?lat=54.13364&lon=-2.75239&zoom=15&layers=B000FTF A601(M)] [http://www.openstreetmap.org/?lat=56.0428&lon=-3.4138&zoom=14&layers=B000FTF A823(M)]. |
Author: steve8[at]mdx.ac.uk Now all resolved |
Reporter: craigermcgreger[at]yahoo.com
[Submitted to the original trac issue database at 6.38am, Thursday, 29th May 2008]
For a number of months, I have been trying to figure out why, for seemingly no reason, shields are not rendered in Mapnik for certain highways, even though they render correctly for surrounding highways.
I have been playing around to see if it was a tag or a combination of tag values that was causing this behavior, to no avail.
At one point, I thought it might be that a shield would not render if the "ref" tag was more than five characters long, but I no longer believe this.
The following are just several examples that I have found of highways that I think should be getting shields but are not:
The text was updated successfully, but these errors were encountered: