logo separator

[mkgmap-dev] Code for Highway Symbols

From Clinton Gladstone clinton.gladstone at googlemail.com on Wed Apr 8 17:17:38 BST 2009

On Tue, Apr 7, 2009 at 8:27 PM, Toby Speight <T.M.Speight.90 at cantab.net> wrote:
> Here's a patch that I think I like.  I've given it a reasonable
> exercise, including the error cases I could think of, and I didn't
> see any of the magic smoke escaping.

I'll try to check out your patch. In the meantime, I have another
related patch, which may be interesting for those wishing to use the
highway symbols.

I found out how to do regexes in Java, and added coding to
Element.java which performs the following:

- Removes the highway symbols from unreasonable names. (Names which
are too long, non-numeric, etc.)
- Removes spaces from names, so that they can be properly displayed as
highway symbols (Changes "A 1" to "A1", "SR 32" to "SR32", etc.)

This seems to correctly work for about 95% of all cases which I have
encountered.

The code is still a hack, and is far from optimal, but it may be
useful when implementing a proper solution. I'd be interested in
feedback.

Cheers.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cg-magic-symbols-v2.patch
Type: application/octet-stream
Size: 2568 bytes
Desc: not available
Url : http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20090408/a8af225e/attachment.obj 


More information about the mkgmap-dev mailing list