mapnik-org/mapnik — Issue #194: Support dynamic pixels
Author: artemp
Created: 2011-10-11 07:41:40+00:00
State: open
Labels: Core_Library

the assumption of '0.00028' meter pixel is based on the OGC SLD spec and assuming a screen ppi of around 90.1 pixels per inch, which of course is not always the case depending on screen resolution/size. So we need to properly investigate exposing to the user the ability to set this option.

source:trunk/src/scale_denominator.cpp#L37

{{{
>>> from mapnik import Map
>>> m= Map(256,256)
>>> m.scale_denominator
-8834880.2216889616
>>> m.pixel_size # in units of projection
0.00028
>>> m.pixel_size = 0.00030
>>> m.scale_denominator() # would change...
}}}