Get highest available LOD for a tilesource

classic Classic list List threaded Threaded
3 messages Options
DanielMartin DanielMartin
Reply | Threaded
Open this post in threaded view
|

Get highest available LOD for a tilesource

Hello,

I am attempting to produce images from selections of a map, and would like to use the highest-possible quality image, regardless of the cameras perspective. Therefor, I need to use the highest available LOD.
Is there a way to query a tilesource / individual tiles about what the highest LOD they support is?
Or, would I need to start at LOD 23 and work my way down, until I found an LOD that a tilesource can produce an image from?

Obviously, starting at LOD 23 and working my way down will take a long time -- but that is not of major concern. But, it would be much better if I could query a tilesource and see that the highest LOD it supports is actually 17 or 19 or 10.

Thank you
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: Get highest available LOD for a tilesource

Daniel,

You can call TileSource::getDataExtents(), which returns a list of extents that *might* include maximum LOD information.

However, a TileSource is not required to provide this information. Furthermore, the maximum LOD can be different for different parts of the dataset. Some TileSources may not even have a maximum at all -- for example, a rasterized vector source has no "natural" maximum.

Hope this helps!
Glenn Waldron / Pelican Mapping
DanielMartin DanielMartin
Reply | Threaded
Open this post in threaded view
|

Re: Get highest available LOD for a tilesource

Drats! Well, it was worth a try. I had tried this, and it seems like I was getting the current LOD I was viewing the tilesource at (I have one image where the max LOD is 16, but querying the tilesource's dataExtents was telling me the max LOD was 4).

Oh well, starting at 23 and working my way down seems to be the way to go.
Thanks for the help!