Select to view content in your preferred language

The conversion method of scale and resolution in Lods and the coefficient of the semi-axis of the earth in the geographic coordinate system

449
0
07-31-2022 09:33 PM
yujinpan
New Contributor

I want use the `lod.scale` to calculate resolution with custom method, but the result is difference with lod.resolution. like this:

 

// wkid: 4490

// json result
const source = {
  scale: 5000000,
  resolution: 0.011897305029151402
}

// custom method
const metersPerInch = 0.0254;
const dpi = 96;
const metersPerDegrees = (2 * Math.PI * 6378137) / 360;
const customResolution = ((metersPerInch / dpi) * source.scale) / metersPerDegrees;

// customResolution = 0.011897305029149903
// difference = 1.4988010832439613e-15

 

thank your!

Tags (3)
0 Kudos
0 Replies