[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Maposmatic-dev] Details on why we use Cairo scaling?

From: Maxime Petazzoni
Subject: Re: [Maposmatic-dev] Details on why we use Cairo scaling?
Date: Mon, 26 Mar 2012 10:09:14 -0700
User-agent: Mutt/1.5.21 (2010-09-15)

* David Decotigny <address@hidden> [2012-03-25 21:46:19]:

> Since we wanted to control the level of details without having to be
> constrained by the exact mapnik graphical rendering area, we decided to
> render+rescale. We had to determine a good graphical rendering area that
> would be compatible with a predefined zoom level (it's defined in one of
> our config files and related to the google pixels), and then render the
> associated geographical area in it. For example, when asked to render
> Paris, we first compute that the ideal graphical rendering area for a
> zoom level 16 is 64328x57423px (random numbers). Then mapnik
> automagically uses zoom level 16, and stylesheets follow. After that,
> all we had to do was to rescale this into the effective graphical
> rendering area we had, based on the "paper size" we wanted. That was the
> theory, in a perfect world where people don't mess up with the
> transformation matrix...


> Max, can you please confirm?

This is what I remember too. Unless we missed it, it seems that (at the
time we wrote ocitysmap2 at least) Mapnik lacked the feature that allows
us to specify the target rendering size *and* the zoom level we wanted.
So we had to go for the latter, and rescale on our own the rendered zone
after the fact -- with the unfortunate side effects that we know.

Maxime Petazzoni <>
 ``One by one, the penguins took away my sanity.''
Writing software in California

Attachment: signature.asc
Description: Digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]