Hi,
I am trying to render a very simplistic map of my region (from OSM data),
and would like to add shields for the motorways and primaries to it. As I
will have to do some post-processing (removal of unwanted content, shifting
of labels, etc.), I would like to render to SVG.
When rendering to PNG my map looks as expected and wanted. Unfortunately,
when rendering to SVG I get a whole lot more shields than when rendering to
PNG.
It seems to me, the problem is that the "min_distance" parameter of the
ShieldSymbolizer is not taken into account, when rendering to SVG (or PDF).
To be more specific, I have the impression, that each separate way gets its
own shield, even if they are too close together (they even overlap in
places). While when rendering to PNG, separate way segments do not
necessarily get their own shield, but only if it is not too close to the
others (of same text?). Changing "min_distance" has an effect when
rendering to PNG, but does not reduce the number of shields when rendering
to PDF/SVG.
Is this a know problem (I could not find a trac ticket), am I doing
something wrong, or should I create a ticket for this? I have not done much
development with mapnik yet, so I am not sure whether I am doing everything
right here.
I am basically using the OSM-mapnik script "generate_image.py" (from SVN)
for rendering to PNG (just changed the bounding box), and adapted that same
script to use the Cairo rendering instead of AGG for SVG and PDF rendering:
...
file = open(map_uri, 'w')
surface = cairo.SVGSurface(file.name, m.width, m.height)
render(m, surface)
surface.finish()
instead of standard OSM-SVN code:
...
im = Image(imgx,imgy)
render(m, im)
view = im.view(0,0,imgx,imgy) # x,y,width,height
view.save(map_uri,'png')
If it would be of help, I have example renderings in PNG and PDF/SVG
available and can of course also provide the styles I used (based on
cascadenic, which is really a lot of help, when developing new styles!) ...
Cheers,
--
Holger Schoener [EMAIL PROTECTED]
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users