Select to view content in your preferred language

LOD - How calculate resolution?

6032
7
01-22-2013 02:19 AM
FabianoScardua
Emerging Contributor
How can I calculate the resolution (Resolution in map units of each pixel in a tile for each level.) of LOD?

I need setting the LODs for the map manually of my  custom Tiled, but I don't know how calculate this value.

http://resources.arcgis.com/en/help/flex-api/apiref/index.html

Thank's for help
Tags (2)
0 Kudos
7 Replies
IvanBespalov
Frequent Contributor
Tiled map service has all needed information - via this property tileInfo you can access this information in flex
Tile Info:
[INDENT]Height: 512
Width: 512
DPI: 96
[INDENT]Levels of Detail: (# Levels: 16)
Level ID: 0 [Start Tile, End Tile]
Resolution: 0,3515625
Scale: 147748799,285417
Level ID: 1 [Start Tile, End Tile]
Resolution: 0,17578125
Scale: 73874399,6427087[/INDENT][/INDENT]
...


Additional info:
find paragraph "Map Scale and Resolution:"
Mathematical relationships...
0 Kudos
EstherColero
Occasional Contributor
Hello Fabiano,

Another easy way is create a cache map service in ArcGIS Server (only the service, images are optional) with your own scales and check the rest API (like Ivan hint) or the file c:\arcgisserver\arcgiscache\<serviceName>\Layers\conf.xml.

<LODInfo xsi:type="typens:LODInfo">
    <LevelID>0</LevelID>
    <Scale>500000000</Scale>
    <Resolution>1.1897305029151397</Resolution>
</LODInfo>


Hope it helps 🙂

Regards
Esther
0 Kudos
FabianoScardua
Emerging Contributor
Thanks for responding.

Ok, but I'm creating the tiles from tilemil (tiles in sqlite) to a mobile application.

The tiles generated by tilemil not have this information.

I will use this tile in the application offline.
0 Kudos
IvanBespalov
Frequent Contributor
WebTiledLayer sample
Description:
    This sample demonstrates how to add various third-party (tiled|cached)
    map services to your ArcGIS API for Flex application using the WebTiledLayer class
...


Sample of extending TiledMapServiceLayer
0 Kudos
FabianoScardua
Emerging Contributor
Thanks for the reply.

I've managed to extend the class and load the tiles from a local database (sqlite). The problem is precisely the method buildTileInfo.
How can I get the values �??�??of the resolution if what you have is only png images of each tile? How to calculate this value?

I can load the tiles however they are with some error in the projection which I believe is because of the LOD.
0 Kudos
EstherColero
Occasional Contributor

I've managed to extend the class and load the tiles from a local database (sqlite). The problem is precisely the method buildTileInfo.
How can I get the values �??�??of the resolution if what you have is only png images of each tile? How to calculate this value?

I can load the tiles however they are with some error in the projection which I believe is because of the LOD.


Hi again,

I do not know how to do that, but if your application always works with the same spatial reference and LODs you can precalculate these values creating a map service with these scales in ArcGIS Server.

If you do not have one, tell me your spatial reference and LODs to help you.

Regards
Esther
0 Kudos
YannCabon
Esri Contributor
Hi,

The resolutions of the tiles generated through Tilemill are the same as OpenStreetMap or the tile services served via arcgis.com

See the tiling scheme of the Light Gray Canvas.
http://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer

The resolution of the next level is the half of the current one.
0 Kudos