[Benchmarking] Scale and pixel resolution formulas
dane at dbsgeo.com
Thu Aug 12 11:04:22 EDT 2010
Thanks for these details. As far as I know Mapnik sticks fully to SLD for the scale calculations, using the OGC assumed PIXEL size that you describe below.
On Aug 12, 2010, at 4:02 AM, Andrea Aime wrote:
> scale computation this year is going to make a difference
> in tests so I'd like to make sure we're all on the same page,
> otherwise servers will do a different amount of work.
> The SLD spec suggests the following formulas for scale
> denominator computation:
> sd_non_geographic = (bbox_width / image_width) * (DPI / 0.0254)
> sd_geographic = (bbox_width / OGC_DEG_TO_METER) * (DPI / 0.0.254)
> DPI = 25.4 / 0.28 --> 90.714
> OGC_DEG_TO_METER = 6378137.0 * 2.0 * PI / 360
> The above are actually the formulas used by GeoServer.
> As far as I know OpenLayers and MapServer use the same, but with
> To get the servers make the same work we all need to have a similar
> scale computation setup. Are we? :-)
> Also, Frank W. tool likes to work using pixel resolutions instead
> of scale denominators, so I used the above formulas, along
> with (resolution = image_width / bbox_width)
> to get to a formula that converts the scales we agreed upon
> to pixel resolutions:
> res_non_geographic = scale_den * 0.28 / 1000
> res_geographic = scale_den * 0.28 / (1000 * OGC_DEG_TO_METER)
> Would be nice if someone could double check the above
> Andrea Aime
> OpenGeo - http://opengeo.org
> Expert service straight from the developers.
> Benchmarking mailing list
> Benchmarking at lists.osgeo.org
More information about the Benchmarking