13 #include <osgEarth/TileSource>
18 namespace makVrv {
namespace oe {
namespace CDB
20 using namespace osgEarth;
22 #define OSG_CDB_LOD_OFFSET 9 // New OSG-CDB LOD mapping
56 CDBTile(std::string& CdbRootDir);
63 inline bool getLatLon(
unsigned int wsg84_lod,
double coord_x,
double coord_y,
64 std::string& lat_str, std::string& lon_str,
int& cdb_lod,
int& DLonZone, std::string& path_lod_str,
CDBTileCache* TileCachePtr);
68 bool getPathComponents(
unsigned int wgs84_lod,
double x_coord,
double y_coord,
69 std::string& lat_str, std::string& lon_str, std::string& lod_str, std::string& path_lod_str,
70 std::string& uref_str, std::string& rref_str,
CDBTileCache* TileCachePtr);
73 int calcDLonZone(
double coord_y);
77 int getNumTilesFoundOnDisk(
const std::vector<TileKey>& intersectingKeys,
78 int CdbDatasetCode,
int CdbComponentSelector1,
int CdbComponentSelector2,
int lod,
CDBTileCache* TileCachePtr);
84 bool getTileName(
unsigned int wgs84_lod,
double x_coord,
double y_coord,
85 int CdbDatasetCode,
int CdbComponentSelector1,
int CdbComponentSelector2,
86 std::string& tile_name,
CDBTileCache* TileCachePtr,
bool exitIfGeocellDoesNotExist =
false);
89 inline std::string getTileFullPath(
const std::string& lat_str,
const std::string& lon_str,
90 int CdbDatasetCode,
int CdbComponentSelector1,
int CdbComponentSelector2,
91 const std::string& lod_string,
const std::string& uref_string,
const std::string& rref_string,
bool secondaryExt=
false)
const;
94 inline std::string getTileFolder(
const std::string& lat_string,
const std::string& lon_string,
95 const std::string& uref_string,
const std::string& lod_string,
int CdbDatasetCode)
const;
98 inline std::string getTileFilename(
const std::string& lat_str,
const std::string& lon_str,
99 int CdbDatasetCode,
int CdbComponentSelector1,
int CdbComponentSelector2,
100 const std::string& lod_string,
const std::string& uref_string,
const std::string& rref_string,
101 const std::string& FACC,
const std::string& FSC,
const std::string& modelName)
const;
104 inline std::string getTileFilename(
const std::string& lat_str,
const std::string& lon_str,
105 int CdbDatasetCode,
int CdbComponentSelector1,
int CdbComponentSelector2,
106 const std::string& lod_string,
const std::string& uref_string,
const std::string& rref_string,
bool secondaryExt =
false)
const;
109 inline std::string getLodString(
int lod)
const;