[OSM-dev] Improvement of tile rendering
Matt Amos
zerebubuth at gmail.com
Sat Mar 21 15:20:37 GMT 2009
On Sat, Mar 21, 2009 at 1:08 AM, Udo Giacomozzi <udo.osm at nova-sys.net> wrote:
> One could even think of avoiding Mapnik completely and writing a
> custom OSM renderer using AGG (which would also allow fixing the
> labeling issues). In fact that would not be too hard to do (once you
> understand the strange way how AGG works, drawing strokes and such is
> quite simple). AFAIK Mapnik is highly configurable so that you can
> style your map the way you like without having to touch the code.
> Designing such a configuration would be probably more time consuming
> than the rendering itself.
mapnik already uses AGG. although parsing the configuration is
time-consuming, it only needs to be done once when the daemon is
started. in my experience most of the per-tile time is in data
lookup/transfer. part of this can be solved with better queries (some
return a lot of data which mapnik then filters out) and part of it
with sensible choice of indexes.
> I think that a specialized rendering daemon using AGG (and no Mapnik)
> would be able to render 10-30 tiles per second per core (probably
> more) on a normal processor.
>
> AGG is extremely fast for being a software renderer and could render
> even 100 tiles or more per second, but managing/loading data and
> calculating optimal positions for labels would be probably the
> bottleneck.
the problem with calculating optimal label positions is that it is a
global optimisation problem. the placement (or not) of a label can
cascade across large numbers of tiles. alternative heuristic
algorithms (like a strict rendering order) have their own problems.
> Unfortunately I haven't the time to write this beast myself...
and i have a truly marvellous proof of Fermat's Last Theorem, but i
haven't the time to write it here :-)
cheers,
matt
More information about the dev
mailing list