[OSM-talk] Playing with Mapnik rendering

Cameron Patrick cameron at patrick.wattle.id.au
Fri Jul 27 08:41:14 BST 2007


Artem Pavlenko wrote:

> It works, but produces some artifacts. I think we can do better, but  
> thanks again for your patch.

I agree, I noticed this too (though the effect is more dramatic in your
example because mostly I'm using dy=2 or 3).  As others have pointed
out, having north-south street names rendered in a consistent direction
and on a consistent side would be nice too.

I also have a small litany of rendering issues that I intend to look at,
some of which are made more obvious by offsetting the text like I did:

http://largestprime.net/cameron/osm-tmp/misc-rendering-glitches.png

  - sometimes Mapnik decides to start rendering a name in one tile and
    not finish it off in an adjacent tile.  I think this one is a
    genuine bug (supposed to work but doesn't).

  - dual carriageways look horrible. They always have, and with the
    street names on the side, it's even worse.  The name should only be
    rendered once unless you're zoomed in enough that the carriageways
    look like separate roads (typically zoom 17, but depends on the road).

  - there should be some metric for deciding which side of the road to
    write the name when the name.

  - you could squeeze more names in by treating spaces between words as
    something that you can stretch.  This is most noticeable when there
    are grids of north-south and east-west streets intersecting.

  - when you have text offset to the side of the line, you can squeeze
    in longer street names by having one word on one side of the line
    and one word on the other.

Cameron





More information about the talk mailing list