[Mapserver-users] WMS Capabilities and ScaleHint

Daniel Morissette dmorissette at dmsolutions.ca
Mon Jan 26 07:07:52 PST 2004


Christina Biakowski wrote:
> Hello,
> 
> we would like to use the ScaleHint-tag of the WMS Capabilities-Document for
> some functions in our WMS Client.
> For example I have a layer with
> 
> MINSCALE 0
> MAXSCALE 6000000
> 
> using a planar projection (Gauss-Krüger (epsg:31493), map units meters).
> 
> This is what I get in the Capabilities-document:
> - <Layer queryable="0">
>   <Name>patch</Name>
>   <Title>patch</Title>
>   <SRS>epsg:31494</SRS>
>   <LatLonBoundingBox minx="10.8144" miny="49.2336" maxx="11.432"
> maxy="49.6507" />
>   <BoundingBox SRS="EPSG:31494" minx="4.41439e+006" miny="5.45572e+006"
> maxx="4.45865e+006" maxy="5.50159e+006" />
> 
>   <ScaleHint min="0" max="2993.42" />
> 
>   </Layer>
> 
> Now I wonder in which units the ScaleHint is displayed, I tried it with inch
> an miles but it does not fit.
> 

This Scalehint thing is always confusing. Here is the theory:

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. (See WMS 1.1.0 sect. 7.1.5.4)


The units aren't defined by the spec, but looking at the code, it seems 
that MapServer uses meters as the units for the Scalehint value and 
that's probably what most servers use.  So the Layer definition above 
means that this layer can be served at scales that result in pixel 
diagonal sizes ranging from 0 to 2993 meters.

In the WMS 1.2/1.3 spec (to be released soon hopefully), the ScaleHint 
will be replaced by MinScaleDenominator and MaxScaleDenominator which 
makes much more sense.  You can already find the definition of those two 
elements in the SLD 1.0 specification.

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




More information about the MapServer-users mailing list