Le Friday 19 October 2007 16:24:03 Daniel Morissette, vous avez écrit : > Jacolin Yves wrote: > > Hi list, > > > > After a GetCapabilities resquest on a mapserver server, I find this line > > inside my xml file: > > <ScaleHint min="9.97805696859274" max="249.451424214819" /> > > > > In my mapfile, I defined min et max scale values with: > > MINSCALE 20000 > > MAXSCALE 500000 > > > > How can I convert the scaleHint value to the mapfile value? In other > > words, what does scaleHint values means? > > 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) > > It is calculated in msWMSPrintScaleHint() in MapServer's mapwms.c: > > diag = sqrt(2.0); > > if (minscaledenom > 0) > scalehintmin = > diag*(minscaledenom/resolution)/msInchesPerUnit(MS_METERS,0); > if (maxscaledenom > 0) > scalehintmax = > diag*(maxscaledenom/resolution)/msInchesPerUnit(MS_METERS,0); > > > The use of inchesPerUnit conversion is because resolution is in pixels > per inch, and we need the result in meters. > > I'll leave it as an exercise to you to figure out the reverse conversion > (scalehint -> scaledenom). ;) > > Daniel
Fine, thanks Daniel. I will do my homework this week end and come back on monday :) Y. -- Yves Jacolin --- http://softlibre.gloobe.org
