[mapserver-users] Min/max pixelsize vs. min/max scaledenom
Rahkonen Jukka
jukka.rahkonen at mmmtike.fi
Wed Aug 28 13:48:30 PDT 2013
Hi,
Your spreadsheet may be trivial but still was useful. I had used resolution of 72 DPI in my scale-to-pixel-size conversion because I had understood that it is what Mapserver is using when it calculates the WMS scalehint. But now I see that when playing with min/maxscaledenominators the screen pixel size of 0.28 mm is used which makes 91 DPI. Could someone who knows the Mapserver code say the final word and verify that scaledenominator 3.571,4286 is producing 1 metre pixels?
-Jukka Rahkonen-
Frank Broniewski wrote:
> Hey there,
> yes, that's me again :-)
> I'm currently poking around in map rendering software like mapserver and
> mapnik. I'd like to find out how I can organize my map publishing scheme
> most efficiently. It seems I'm hitting the same spot with all rendering
> softwares.
> I wrote my mapserver question Thomas refers to, to the mapserver-dev
> list because I thought this would be a more appropriate place than the
> general user list. So I guess it didn't trigger that much attention ...
> BTW. I created a google spreadsheet [1] for calculating a scale based on
> a desired meter / pixel value. Probably very trivial but maybe helpful
> in some situations ...
[1]
https://docs.google.com/spreadsheet/ccc?key=0ArIoTsX_X90tdFRLQzI5MlRVUXk3NFdfM3dNdE1wYmc&usp=sharing
Am 2013-08-27 13:14, schrieb thomas bonfort:
> 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
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
--
Frank BRONIEWSKI
METRICO s.à r.l.
géomètres
technologies d'information géographique
rue des Romains 36
L-5433 NIEDERDONVEN
tél.: +352 26 74 94 - 28
fax.: +352 26 74 94 99
http://www.metrico.lu
_______________________________________________
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