logo separator

[mkgmap-dev] How to display highway shields with numbers only

From Mark Bradley ethnicfoodisgreat at gmail.com on Thu Jan 1 13:49:01 GMT 2015

Hi list members,

 

A few weeks ago I proposed the following problem.  I did not receive any
help, so I will ask again, in case any of you can shed some light.

 

Table 4.4 in the Conversion Style Manual shows highway shields displaying
numbers only, which is what I would like to achieve.  In Table 4.3 (the list
of substitution filters), the description for the highway-symbol filter says
that the filer "Prepares the value as a highway reference such as 'A21'
'I-80' and so on.  A code is added to the front of the string so that a
highway shield is displayed, spaces are removed and the text is truncated so
as not to overflow the symbol."  The description does not explain (from what
I can tell) how to remove the alphabetic characters, leaving only the
numbers.  I've tried several possibilities of the filter without success.
Where I live, there's a motorway called Interstate 70 which is labeled "I70"
in OSM.  I would like to create shields with only the number in the shields,
similar to the example in Table 4.4.  How do I do this?

 

To add a little more information:  The description in Table 4.4 for each of
the first three symbols says "digits only."  If I apply the substitution
filter to the ref values as is, the symbols on the resulting map do NOT
contain digits only, they also include the alpha characters in front of the
numbers that describe what type of highway the highway is, such as "I" for
interstate or "SR" for state road.  Based on this, I have to conclude that
it is up to the mapper to strip off these alpha characters first, before
applying the highway symbol filter.  Again, I have tried numerous
combinations of the style filters and commands without success.  The problem
is that the number of alpha characters preceding the digits can vary.
Sometimes there are no alpha characters at all.  I know how to add "dummy"
spaces to the ref tag for those features that don't have a ref value at all,
but how to strip the alpha characters when the number of characters can
vary, and the separator character is a space?

 

I would've thought this would be a common desire for users in the U. S. and
that it would've been solved a long time ago.  Maybe not?

 

Mark

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20150101/4e8cc3cd/attachment.html>


More information about the mkgmap-dev mailing list