Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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?

Thanks!

Screeny

share|improve this question
    
Can you make use of the TextSymbolizer? github.com/mapnik/mapnik/wiki/TextSymbolizer –  Michael Markieta 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
add comment

1 Answer

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.:

<Rule>
<Filter>[highway] = 'tertiary'</Filter>
  &maxscale_zoom17;
  &minscale_zoom18;
  <TextSymbolizer name="name" ... placement="line" spacing="500"/>
</Rule>

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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