[mapserver-users] Min/max pixelsize vs. min/max scaledenom
Rahkonen Jukka
jukka.rahkonen at mmmtike.fi
Tue Aug 27 04:53:53 PDT 2013
Hi,
Not quite identical because I can write my suggestion shorter. I think that this was my meaning:
"If I set MINPIXELSIZE in a mapfile, let Mapserver to multiply it by 2834.645669 and use the result as MINSCALEDENOM and do the same thing with MAXPIXELSIZE and MAXSCALEDENOM."
I am not sure anymore if it is worth the pain if it is really that simple. The formula for converting pixel size into scale could be added to MINSCALEDENOM/MAXSCALEDENOM documentation in http://mapserver.org/mapfile/layer.html or some other suitable place with a notice that it suits for meters.
-Jukka-
thomas bonfort wrote:
>
> 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