[mapserver-dev] Better resolution handling for printing

Brent Fraser bfraser at geoanalytic.com
Wed Feb 18 17:30:12 EST 2009



Tamas Szekeres wrote:
> 
> 
> 2009/2/18 Brent Fraser <bfraser at geoanalytic.com 
> <mailto:bfraser at geoanalytic.com>>
> 
> 
>      Daniel says "it is not sufficient to update the map->resolution
>     setting since all the label and symbol sizes as well as line widths
>     also need updating if you want to maintain the same map appearance."
> 
>      Perhaps we just need to allow a SIZEUNIT of POINTS (in addition to
>     the current PIXELS, FT, etc), as in "Font Points" (e.g 72 per inch).
>      That way you could set the map (output image) resolution to
>     whatever you want and the text, symbols, and line widths will always
>     be the same readable size on the printed output.
> 
> 
> Brent,
> 
> In my understanding we don't want to alter the settings of the mapfile 
> in many places like changing the SIZEUNITS for each layer, but just 
> rescale the whole image by a single parameter. In the first case we 
> would have an option to set SYMBOLSCALE to a proper value for each layer 
> to allow the scale dependent sizing of the symbols and the labels but it 
> would require to "specialize" the mapfile in this regard.
> 
> 
> Best regards,
> 
> Tamas

In my usage scenario, the SIZEUNITS would be set only once to POINTS (for each layer) at mapfile authoring time.  The map RESOLUTION would be set to 72 for normal web browsing at that time too. Then when high-resolution output was desired by the user, the RESOLUTION would be re-set (via a CGI parameter or scripting, etc) to 300 for printing.  No other mapfile changes would be necessary.  For example, text would be generated at 0.5 inches if its SIZE was set to 36 regardless if the RESOLUTION was set to 72 or 300, because the author specified 36 POINTS (not 36 PIXELS).

  The conceptual change here is the RESOLUTION value would only be used for the resolution of the output image, and not related to the "plot" units of the styling/symbology as it.  Every other mapfile parameter would act as it does now, even SYMBOLSCALE.

Brent


More information about the mapserver-dev mailing list