[udig-devel] dpi issues
Jody Garnett
jgarnett at refractions.net
Wed Mar 26 13:24:58 PDT 2008
Vince Darley wrote:
> At 15:55 26/03/2008, Jody Garnett wrote:
> >I *did* preprocess my map and adjust all the Scales and Font sizes in
> the GeoTools Style objects (since they >are expressed in pixels it
> needed to be done).
>
> Just to clarify this, since I've not really looked closely at GeoTools
> Style definitions, *must* they be defined in pixels, or can they be
> defined in points? (1 pixel = 1 point if operating at 72 dpi,
> otherwise they differ).
The geotools style definitions are actually not "defined" in geotools;
they are part of the formal specification here:
- http://www.opengeospatial.org/standards/sld
My understanding is they are defining it in pixels; the only reason I am
going along with this is so when we print out at high resolution we can
be *exact* about what we want and get line widths and so on exactly
right for cartographic output.
> The most natural thing for my use-case is to consider defining them in
> points. Given a gradual trend towards device-independent &
> resolution-independent display mechanisms & drivers (e.g. MacOS X,
> Cairo, etc), it would seem the future is in this area.
I agree, so we got a bit of a balance to do. We could read the SLD 1.1
specification and check if it offers further clarification on this
matter. Also note that lineWidth is not a *number*, but an expression.
The general idea is to make an expression involving DPI when you want
device independence.
Jody
More information about the udig-devel
mailing list