[wms-dev] BBox ResX/ResY & Scale Hint questions
Craig Bruce
csbruce@cubewerx.com
Tue, 18 May 2004 18:48:34 -0400
julia.harrell@ncmail.net wrote:
> RF minimum / 3846.15 = scalehint_min
Actually, something like this does make sense for translating true scales.
If we take a standard pixel size as being a square that is 0.28mm on
each side, the length of the hypotenuse is 0.396mm. (The scale hint is
defined in terms of a diagonal distance.)
If we accept a nominal true scale as giving the real-Earth scales in
both X and Y directions, which is reasonable, then we can compute an
easy conversion factor to translate from scale denominators to real-Earth
diagonal meters relative to a standard pixel. The conversion factor is
simply the number of meters in the standard-pixel diagonal, 0.000396m,
or you can divide by the inverse, 2525.25.
It looks like the referenced formula uses a standard pixel size of 0.26mm
but forgets to compute the diagonal distance, making it wrong for use here.
Since SLD uses 0.28mm and WMS version 1.3 adopts the SLD scale definitions
and conventions, 0.28mm is the better standard pixel size to use.
So, if your viewable true scale range is 1:20K to 1:1M, the scale hints
to use with WMS 1.1.0 would be:
min = 20000 * 0.000396m = 7.92m (pixel diagonal)
max = 1000000 * 0.000396m = 396m (pixel diagonal)
--------------------------+------------------------+--------------------------
Dr. Craig S. Bruce | Tel: 819-771-8303 x205 | CubeWerx Inc.
Senior Software Developer | Fax: 819-771-8388 | Gatineau, Québec, Canada
csbruce@cubewerx.com | http://www.csbruce.com | http://www.cubewerx.com/
--------------------------+------------------------+--------------------------
"Men stumble over the truth from time to time, but most pick themselves
up and hurry off as if nothing happened." -- Sir Winston Churchill