Lat Lon Zoom to Tile X Y (c++)

Help! I've seen multiple discussions of this and have tried multiple implementations without close but not exact results. The two tiles at level 0 thing seems to be implicated, however...

I'm in c++ and can't use the cesium api...simply want to provide a lat / lon / zoom level and get back the tile x y for quantized-mesh (.terrain) file.

https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Core/CesiumTerrainProvider.jsPlease provide more information about the problem you are having and what you’ve tried. You could look for inspiration for your c++ implementation in the JavaScript implementation that’s in CesiumJS starting at CesiumTerrainProvider.js.

Scott

Scott, thanks for the references. I'm good with handling the data once I find the correct tile, what I'm having difficulty with is finding the correct tile. I've got a small area of terrain data (Hawaii) cached on disk that I need to access via a lat/lon/zoom and I've not been able to formulate the correct z x y to find the tile.

I've tried implementations from most of the references found via google on this topic, ie. Bing Map Tile System, Slippy Tile names, Google Devs map tile api, OSGeo, GDAL and a bunch of Wiki references...they all seem close but break down at varying degrees of higher zoom levels. I'm currently trying to work through some of the js code from the Cesium project in particular the WebMercatorTilingScheme.js file to try to get the proper tile references from lat/lon/zoom...