wms capabilities and mapfile scale correspondence

Daniel Morissette dmorissette at DMSOLUTIONS.CA
Thu Apr 21 10:32:56 EDT 2005


Nuno Gil wrote:
> Hi Tom,
> The problem is that they display different values... :s
> In the map file I have
>     MINSCALE 45000001
>     MAXSCALE 999999999999
> and in the capabilities file this same layer has
>         <ScaleHint min="22450.6" max="4.98903e+08" />
>
> Any idea why? Maybe a unit related issue? I have UNITS DD set up in
> the MAP element of the map file.

The different values are normal.

MapServer's scale values are what you are used to seeing on paper maps
as scale denominator, e.g. 1:50000, etc.

... and with respect to the scalehint value in WMS capabilities:

> ** (see WMS 1.1.0 sect. 7.1.5.4) The WMS defines the scalehint values as
> ** the ground distance in meters of the southwest to northeast diagonal of
> ** the central pixel of a map.  ScaleHint values are the min and max
> ** recommended values of that diagonal.

You can see how we convert from one to the other in function
msWMSPrintScaleHint() in mapwms.c

Daniel
--
------------------------------------------------------------
  Daniel Morissette               dmorissette at dmsolutions.ca
  DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------



More information about the mapserver-users mailing list