[Geoserver-devel] Compensating printer DPI: what param name?

Hi,
I have someone interested in sponsoring better support for
raster printouts on high resolution devices.

Basically they want to generate an image that when printed
at 300dpi will look like what you get on the screen, which
really means you need:
- a bigger image
- scaled up labels, strokes and whatnot
- the scale computation taking into account the scale up
   and ending up with the same scale denominator as the
   image on the screen

This is how MapServer is doing it:
http://mapserver.org/development/rfc/ms-rfc-55.html

So they state the image size and the target dpi separately.
Seems like a sane way to proceed to me.

What do you think?

I believe that the mapfish print is already doing something along those
lines when setting the target dpi but not sure exactly what, do you
have any insight?

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Andrea Aime ha scritto:

Hi,
I have someone interested in sponsoring better support for
raster printouts on high resolution devices.

Basically they want to generate an image that when printed
at 300dpi will look like what you get on the screen, which
really means you need:
- a bigger image
- scaled up labels, strokes and whatnot
- the scale computation taking into account the scale up
   and ending up with the same scale denominator as the
   image on the screen

This is how MapServer is doing it:
http://mapserver.org/development/rfc/ms-rfc-55.html

Btw, MapGuide has such param too, it's called "setdisplaydpi"
(it's part of their custom web api, not wms):

http://trac.osgeo.org/mapguide/wiki/HttpApi/RenderingService#SetDisplayDpi1.0

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Andrea Aime ha scritto:

Hi,
I have someone interested in sponsoring better support for
raster printouts on high resolution devices.

Basically they want to generate an image that when printed
at 300dpi will look like what you get on the screen, which
really means you need:
- a bigger image
- scaled up labels, strokes and whatnot
- the scale computation taking into account the scale up
   and ending up with the same scale denominator as the
   image on the screen

This is how MapServer is doing it:
http://mapserver.org/development/rfc/ms-rfc-55.html

Oh, DeeGree does it too at the api level, not sure if
it is exposed any way as a wms param, they call it
targetresolution:

http://download.deegree.org/deegree2.1/api/org/deegree/ogcwebservices/wmps/configuration/PrintMapParam.html#getTargetResolution()

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Andrea Aime ha scritto:

Hi,
I have someone interested in sponsoring better support for
raster printouts on high resolution devices.

Basically they want to generate an image that when printed
at 300dpi will look like what you get on the screen, which
really means you need:
- a bigger image
- scaled up labels, strokes and whatnot
- the scale computation taking into account the scale up
   and ending up with the same scale denominator as the
   image on the screen

This is how MapServer is doing it:
http://mapserver.org/development/rfc/ms-rfc-55.html

So they state the image size and the target dpi separately.
Seems like a sane way to proceed to me.

Btw, I cooked a proof of concept that seems to work fine.

I just have one final doubt, it's about the parameter
name and location.

At the moment I have it running off the format options
for raster data:
...&format_options=dpi:270

What do you think, good choice?

Here is a sample of what happens when the rescaling
is applied (the second image had widht and height
equals to 900, the rescaling just inflated all
the symbolizers):
http://sigma.openplans.org/~aaime/normalDpi.png
http://sigma.openplans.org/~aaime/rescaledDpi.png

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

On 18/06/2010, at 7:03 PM, Andrea Aime wrote:

Btw, I cooked a proof of concept that seems to work fine.

I just have one final doubt, it's about the parameter
name and location.

At the moment I have it running off the format options
for raster data:
...&format_options=dpi:270

What do you think, good choice?

Yep nice and simple and a good format options.

Here is a sample of what happens when the rescaling
is applied (the second image had widht and height
equals to 900, the rescaling just inflated all
the symbolizers):
http://sigma.openplans.org/~aaime/normalDpi.png
http://sigma.openplans.org/~aaime/rescaledDpi.png

Looks good; thanks for catching that halo also needed resizing. Do we also need to resize the spacing when a line symbolizer pattern is used?

Jody Garnett ha scritto:

On 18/06/2010, at 7:03 PM, Andrea Aime wrote:

Btw, I cooked a proof of concept that seems to work fine.

I just have one final doubt, it's about the parameter
name and location.

At the moment I have it running off the format options
for raster data:
...&format_options=dpi:270

What do you think, good choice?

Yep nice and simple and a good format options.

Here is a sample of what happens when the rescaling
is applied (the second image had widht and height
equals to 900, the rescaling just inflated all
the symbolizers):
http://sigma.openplans.org/~aaime/normalDpi.png
http://sigma.openplans.org/~aaime/rescaledDpi.png

Looks good; thanks for catching that halo also needed resizing. Do we also need to resize the spacing when a line symbolizer pattern is used?

Ah, good catch, yeah, that is needed as well. The dash pattern!

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Hi Andrea,

i tested dpi parameter and is seem to do a nice job! Compliments for
this nice and valuable addition.

Question: dpi parameter is applied only to getMap request? I guess
that it make sense to apply DPI to getLegendGraphic also right?

Im willing to work on this one with your help. Should i open jira
ticket for this?

Thank you&regards,
Ivan

On Fri, Jun 18, 2010 at 12:29 PM, Andrea Aime <aaime@anonymised.com> wrote:

Jody Garnett ha scritto:

On 18/06/2010, at 7:03 PM, Andrea Aime wrote:

Btw, I cooked a proof of concept that seems to work fine.

I just have one final doubt, it's about the parameter
name and location.

At the moment I have it running off the format options
for raster data:
...&format_options=dpi:270

What do you think, good choice?

Yep nice and simple and a good format options.

Here is a sample of what happens when the rescaling
is applied (the second image had widht and height
equals to 900, the rescaling just inflated all
the symbolizers):
http://sigma.openplans.org/~aaime/normalDpi.png
http://sigma.openplans.org/~aaime/rescaledDpi.png

Looks good; thanks for catching that halo also needed resizing. Do we also need to resize the spacing when a line symbolizer pattern is used?

Ah, good catch, yeah, that is needed as well. The dash pattern!

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Ivan Grcic wrote:

Hi Andrea,

i tested dpi parameter and is seem to do a nice job! Compliments for
this nice and valuable addition.

Question: dpi parameter is applied only to getMap request? I guess
that it make sense to apply DPI to getLegendGraphic also right?

Im willing to work on this one with your help. Should i open jira
ticket for this?

Yeah, go ahead and make a ticket.
Unfortunately I'm not very familiar with the legend graphics code,
it's the one bit of WMS that I worked less with (if I did anything at
all, don't remember).
But yeah, I can try to help by reviewing a design and/or a patch.

Cheers
Andrea