[mapserver-users] Min/max pixelsize vs. min/max scaledenom

thomas bonfort thomas.bonfort at gmail.com
Tue Aug 27 04:14:10 PDT 2013


Jukka,
I would say that Frank also raised this issue on the mapserver list
[1]. Am I mistaken or is your request identical?

regards,
thomas

[1] http://osgeo-org.1560.x6.nabble.com/Scales-and-raster-maps-td5071674.html

On 27 August 2013 12:49, Rahkonen Jukka <jukka.rahkonen at mmmtike.fi> wrote:
> Hi,
>
> Frank Broniewski wrote the following question to the Mapnik users list a few hours ago and I started to think that I would like to have such min/max pixelsize setting in Mapserver.  I can simply get the native pixel size of our maps with gdalinfo or something and I can estimate that when I am showing a topographic map with 1 m native pixel size on the screen the texts are readable and map looks good approximately at resolutions between 0.75 - 1.5 m/pixel. Now it would be nice to write into mapfile the scale range as
> MINPIXELSIZE "0.75"
> MAXPIXELSIZE "1.5"
>
> I know that scale in Mapserver is based on a resolution on 72 dots per inch and that inch is 0.0254 meters and I can calculate that the native resolution of the map expressed as "one image pixel drawn as one dot on the 72 DPI screen" means scale of 1:2836.65 and that I can write my good resolution range in a mapfile as
> MINSCALEDENOM "2126"
> MAXSCALEDENOM "4252".
>
> However, as Frank Broniewski writes, OpenLayers and tile cache programs like MapCaceh, MapProxy and GeoWebcache are configured by using "units per pixel".  Why not to let Mapserver users use the same system in mapfile as an alternative for minscaledenom/maxscaledemon?
>
> And this is what Frank wrote
>
> " Hi all,
>
> is it possible to use a resolution parameter (meter / pixel, that what map.scale() outputs) instead of Min/Maxscaledenominator? That would be really helpful in order to arrange map styles between different software.
>
> Let's say I'm creating a map with a number of zoom levels and on each zoom level I'm changing the map, doing generalization or displaying more detail. The map is planned to be used in a web context with the Javascript OpenLayers Map library. Inbetween there is a proxy software like Mapproxy. Both OpenLayers and Mapproxy understand the principle of resolutions, ie natural distances per pixel. So I can define my map in OpenLayers with a list of resolutions like [500, 200, 100, etc.]. I can continue to use this list in Mapproxy so that each resolution matches a certain map layout. Unfortunately this breaks now because Mapnik uses scales in correlation with the dpi setting."
>
> -Jukka Rahkonen-
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users



More information about the MapServer-users mailing list