My current setup so far is a running Apache webserver with tilecache.cgi script and a mapnik rendering engine connecting to my postgis database containing my OSM data.

The problem is very easy to describe. All roadnames, roadnumbers, descriptions are to close to each other. I set up tilecache with MetaTile=true, TileSize=8x8 and it doesn't change. What am I doing wrong?



  • Can you make use of the TextSymbolizer? github.com/mapnik/mapnik/wiki/TextSymbolizer Feb 20 '12 at 20:57
  • 1
    How did you import your data? I am asking because the streets looks like they've been split at intersections - this is not the standard for OSM data.
    – diciu
    Feb 21 '12 at 12:06
  • with osm2pgsql - Can you show me your command line? I might have choosen wrong params...
    – Styp
    Feb 21 '12 at 15:52
  • osm2pgsql should be fine and the command line arguments won't change how the data is imported.
    – diciu
    Feb 21 '12 at 20:19

If the problem is the name for "Rue de l'Abbe Bovet" (you're most likely rendering the OSM data from here) is appearing twice, I don't think there's a problem with the data (it's a single object in OSM, see here but rather the renderer (mapnik/tilecache).

As suggested in the comments (by Michael Markieta) check your TextSymbolizer definitions. The relevant attribute is called spacing E.g.:

<Filter>[highway] = 'tertiary'</Filter>
  <TextSymbolizer name="name" ... placement="line" spacing="500"/>

would cause tertiary road labels to be repeated every 500 pixels.

Another thing that may be worth tinkering with is mapnik's parameter called buffer_size. I'm not sure how this works in tilecache (I've only used it in the python mapnik extensions).

As far as I remember what buffer_size does is: whenever mapnik renders something it looks at whatever is rendered through a window of buffer_size - if you want mapnik to realize it has to avoid painting a label because it's already there the label candidate and the already painted label have to coexist within the same rendering window.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.