14 #include <osg/ref_ptr>
17 #include <osgEarth/GeoData>
27 namespace makVrv {
namespace oe {
namespace CDB
46 void createCdbGeoCellIndex(
const DatasetInfo& datasetInfo, osgEarth::GeoExtent& CdbGeoExtent,
bool readMaxLod);
49 bool isCdbGeocellAvailable(
const std::string& latitude,
const std::string& longitude)
const;
52 bool isCdbGeocellAvailable(
const int latitude,
const int longitude)
const;
58 osg::Image* getImage(
const std::string& CdbTile);
64 float imageHitPercentage();
67 osg::HeightField* getHeightField(
const std::string& CdbTile);
73 float heightFieldHitPercentage();
76 void setCacheSize(
int cacheSize);
82 int maxElevationLod()
const;
85 int maxImageryLod()
const;
88 int maxRasterMaterialLod()
const;
91 int maxT2dGeometryLod()
const;
94 int minT2dGeometryLod()
const;
109 std::map<std::string, DtLogitudeGeocellMap> myCdbGeoCellMap;
125 static bool doesElevationCacheExist(
const std::string& shpInstanceFile,
const std::string& cachePath);
127 static bool getElevationFromCache(
const std::string& shpInstanceFile,
const std::string& cachePath, std::vector<osg::Vec3d>& modelPoints);
129 static bool saveElevationToCache(
const std::string& shpInstanceFile,
const std::string& cachePath,
const std::vector<osg::Vec3d>& modelPoints);
static int theMinT2dLod
Minimum LOD of the t2d model geometry dataset.
Definition: DtCDBTileCache.h:164
Threading::Mutex myMutex
Mutex object to allow thread safety.
Definition: DtCDBTileCache.h:182
std::map< std::string, bool > DtLogitudeGeocellMap
type for the longitude map as a string representation
Definition: DtCDBTileCache.h:97
CDB Tile cache manager Used by CDBTileSource to try to avoid reading the the same CDB tile many time ...
Definition: DtCDBTileCache.h:34
Least-recently-used cache class.
Definition: DtOsgLRUCache.h:41
used to export/import dll function from this dll to another (osgdb_osgearth_cdb)
CDB Class that hold the Dataset informationNote: A DUPLICATED class also exist in the Openflight Plug...
ElevationCDBsCache myCdbElevationCache
LRU cache map for elevation.
Definition: DtCDBTileCache.h:144
std::map< int, bool > DtLogitudeGeocellIntMap
type for the longitude map as an integer representation
Definition: DtCDBTileCache.h:100
#define DT_DLL_OSGEARTH_CDB_UTILS
Definition: DtCDBExport.h:18
static int theMaxImageryLod
Maximum LOD of the imagery dataset.
Definition: DtCDBTileCache.h:158
makVrv::LRUCache< std::string, osg::ref_ptr< osg::HeightField > > ElevationCDBsCache
LRU cache map type for elevation.
Definition: DtCDBTileCache.h:141
static int theMaxLatitude
Max Latitude.
Definition: DtCDBTileCache.h:179
std::map< int, DtLogitudeGeocellIntMap > myCdbGeoCellIntMap
latitude and longitude map as an integer representation (its set once at the start and used by many) ...
Definition: DtCDBTileCache.h:111
for each CDB database keep track of the lat/lon geocell that exist
Definition: DtCDBTileCache.h:103
static int theMaxElevationLod
Maximum LOD of the elevation dataset.
Definition: DtCDBTileCache.h:155
osgEarth::GeoExtent myCdbExtent
database extent
Definition: DtCDBTileCache.h:115
static int theMaxLongitude
Max Longitude.
Definition: DtCDBTileCache.h:173
static int theMinLatitude
Min Latitude.
Definition: DtCDBTileCache.h:176
makVrv::LRUCache< std::string, osg::ref_ptr< osg::Image > > ImageCDBsCache
LRU cache map type for imagery.
Definition: DtCDBTileCache.h:134
std::vector< DatasetInfo > myDatasetList
List of datasets using this map.
Definition: DtCDBTileCache.h:113
size_t myNbCacheSize
Default number of cache file 20, but can be set via the config.
Definition: DtCDBTileCache.h:149
CDB Dataset information class.
Definition: DtCDBDatasetInfo.h:23
IMGUI_API void Image(ImTextureID user_texture_id, const ImVec2 &size, const ImVec2 &uv0=ImVec2(0, 0), const ImVec2 &uv1=ImVec2(1, 1), const ImVec4 &tint_col=ImVec4(1, 1, 1, 1), const ImVec4 &border_col=ImVec4(0, 0, 0, 0))
Threading::Mutex myCdbImageryCacheMutex
Image Mutex object to allow thread safety.
Definition: DtCDBTileCache.h:138
std::string myCdbRootPath
Current CDB Root path.
Definition: DtCDBTileCache.h:152
OpenThreads::Mutex Mutex
Definition: DtOsgThreadingUtils.h:12
ImageCDBsCache myCdbImageryCache
LRU cache map for imagery.
Definition: DtCDBTileCache.h:136
static int theMinLongitude
Min Longitude.
Definition: DtCDBTileCache.h:170
std::map< std::string, osg::ref_ptr< CDBDatabaseGeocellMap > > DtDatabasesGeocellMap
Type for the map of the existing geocell by CDB database.
Definition: DtCDBTileCache.h:119
static int theMaxRasterMaterialLod
Maximum LOD of the raster material dataset.
Definition: DtCDBTileCache.h:161
Threading::Mutex myCdbElevationCacheMutex
Elevation Mutex object to allow thread safety.
Definition: DtCDBTileCache.h:146
static int theMaxT2dLod
Maximum LOD of the t2d model geometry dataset.
Definition: DtCDBTileCache.h:167