Hello,

I have a question about computing the values for the LevelOfDetail class, which is necessary for a custom tile cache implementation. How they are computed/calculated?

First a short description of my problem. I have WebMercator based tile caches with only a single level. Each of the tile caches are created from a single GeoTiff with GDAL 2.x. Displaying these caches is solved through an implementation of a custom tile cache as a ServiceImageTiledLayer. Because the GeoTiffs for different scales don't have the same bounds/extens sometimes, each is one tile cache.

So far, everything is fine, but the level ordering bases on the scale of the LevelOfDetail. To get the caches in the right order and visible levels this value is necessary, but I don't know how I can compute it or get it from somewhere.

As I understand it, the resolution must be the value of one pixel in map units (here meters) and the scale would be for example one meter screen to meters on map. Is this right? If yes, how can I get/calculate this value?

Links:

- LevelOfDetail Class
- resolution | Definition - Esri Support GIS Dictionary
- scale | Definition - Esri Support GIS Dictionary

Thanks and best regards,

Oliver

In the meantime, I solved the problem. Because the scale is depends on the screen resoultion (DPI). The formula is as folllowing:

The scale ist the denominator of 1:scale. We know the resoultion, which means the map units per pixel. Thus, we have to figure out the, how many pixel per meter on the screen we have. This is done by dpi * (1m / 1inch) and all together is the formula.

Maybe that helps someone else.

@Esri: I would be nice to have a method to calc this or getting the DPI of a GeoView.