[OSM-dev] Intelligent fitting street names in OSMarender

Robert Hart Robert.Hart at BuroHappold.com
Sat Mar 10 01:22:31 GMT 2007


Barry/tiles at home crowd,

Inspired by your lines2curves, I have hacked together a proof-of-concept script to fix up names to fit in the ways they are on.

Basically for each text path, it tries to abbreviate the text so that it will fit into the way, or if it can't it hides the text.

As it works in basically the same way as lines2curves, and needs much of the same info, I created a single unified script.

See http://wiki.openstreetmap.org/index.php/Osmarender/TextFitting

Issues:

* needs code to read osmarender styles - currently hard coded to default style
* needs calibration - I assume each character is equal to the fontsize in width
* needs non-anglo centric abbreviations, and probably separate conf file for abbreviations
* can't deal with XML-escaped text. May not be UTF-8 safe either.
* ugly perl.

Rob

p.s. there's a bug in your regex when run on non-uploaded OSM (hint way ids can be negative).




This message has been scanned for viruses by MailControl - www.mailcontrol.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20070310/cc0eedd0/attachment.html>


More information about the dev mailing list