VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
osgEarth::CDBFeatureSource Class Reference

FeatureSource that reads feature tiles from a parameterized "CDB" source.

Inheritance diagram for osgEarth::CDBFeatureSource:
Inheritance graph
[legend]

Classes

class  Options
 

Public Member Functions

 META_Layer (osgEarth, CDBFeatureSource, Options, TiledFeatureSource, cdbfeatures)
 
void setDataset (const int &value)
 
const int & getDataset () const
 
void setComponentSelector1 (const int &value)
 
const int & getComponentSelector1 () const
 
void setComponentSelector2 (const int &value)
 
const int & getComponentSelector2 () const
 
void setCdbRoot (const std::string &value)
 
const std::string & getCdbRoot () const
 
void setMakVrfLayer (const std::string &value)
 
const std::string & getMakVrfLayer () const
 
Status insert (const TileKey &key, const FeatureList &features, bool overwrite) override
 
Status openImplementation () override
 
bool isWritable () const override
 

Protected Member Functions

void init () override
 
FeatureCursor * createFeatureCursorImplementation (const Query &query, ProgressCallback *progress) const override
 
int getCDBMaxLOD ()
 
void readFeatureFromCache (const osgEarth::optional< osgEarth::TileKey > &osgEarthTileKey, FeatureList &currentCdbTileFeatures, FeatureList &osgEarthFeatures) const
 
virtual ~CDBFeatureSource ()
 
bool isFeatureDatasetSupported ()
 
bool openCDBDatabase ()
 
void readCDBDatasetInfo (osgEarth::GeoExtent &cdbGeoExtent)
 
void readCDBTilesToCache (ProgressCallback *progress) const
 
void getCDBTilesForOsgEarthTileKey (const osgEarth::optional< osgEarth::TileKey > &osgEarthTileKey, makVrv::oe::CDB::DtCDBUtils::CdbTileOrderedSet &cdbTiles) const
 
void readFeaturesFromCDBTiles (const osgEarth::optional< osgEarth::TileKey > &osgEarthTileKey, const makVrv::oe::CDB::DtCDBUtils::CdbTileOrderedSet &cdbTiles, FeatureList &osgEarthFeatures, ProgressCallback *progress) const
 
bool fileInCache (const std::string shpInstanceFile, FeatureList &currentCdbTileFeatures) const
 

Private Member Functions

void debugPrintCacheFeatures (const osgEarth::optional< osgEarth::TileKey > &osgEarthTileKey, const FeatureList &currentCdbTileFeatures, const std::string shpInstanceFile) const
 
void debugPrintOutputFromCacheFeatures (const osgEarth::optional< osgEarth::TileKey > &osgEarthTileKey, const FeatureList &osgEarthFeatures, const std::string shpInstanceFile) const
 

Private Attributes

osg::ref_ptr
< makVrv::oe::CDB::DtCDBDatabase > 
myCdbDatabase
 
makVrv::oe::CDB::DatasetInfo myDatasetInfo
 
makVrv::oe::CDB::CDBTile * myCdbTilePtr
 
osg::ref_ptr
< makVrv::oe::CDB::CDBTileCache > 
myTileCache
 
osg::ref_ptr
< osgEarth::SpatialReference > 
myWgs84
 
osg::ref_ptr
< makVrv::oe::CDB::DtCDBVectorFeature > 
myVector
 
osg::ref_ptr
< makVrv::oe::CDB::DtCDBVectorFeature > 
myCacheVector
 
makVrv::DtDe * myDe
 
makVrv::oe::CDB::CacheVectorDataMap myCacheVectorData
 
osgEarth::Threading::Mutex myMutex
 
bool myReadCacheFilesDone
 
GeoExtent myCdbDatasetExtent
 
bool myFoundDataForDataset
 

Constructor & Destructor Documentation

virtual osgEarth::CDBFeatureSource::~CDBFeatureSource ( )
inlineprotectedvirtual

Member Function Documentation

osgEarth::CDBFeatureSource::META_Layer ( osgEarth  ,
CDBFeatureSource  ,
Options  ,
TiledFeatureSource  ,
cdbfeatures   
)
void osgEarth::CDBFeatureSource::setDataset ( const int &  value)

Read the CDB dataset.

const int& osgEarth::CDBFeatureSource::getDataset ( ) const
void osgEarth::CDBFeatureSource::setComponentSelector1 ( const int &  value)

Read the CDB Component Selector1.

const int& osgEarth::CDBFeatureSource::getComponentSelector1 ( ) const
void osgEarth::CDBFeatureSource::setComponentSelector2 ( const int &  value)

Read the CDB Component Selector2.

const int& osgEarth::CDBFeatureSource::getComponentSelector2 ( ) const
void osgEarth::CDBFeatureSource::setCdbRoot ( const std::string &  value)

Read the CDB root directory.

const std::string& osgEarth::CDBFeatureSource::getCdbRoot ( ) const
void osgEarth::CDBFeatureSource::setMakVrfLayer ( const std::string &  value)

Read the mak_vrf_layer directory.

const std::string& osgEarth::CDBFeatureSource::getMakVrfLayer ( ) const
Status osgEarth::CDBFeatureSource::insert ( const TileKey &  key,
const FeatureList &  features,
bool  overwrite 
)
override

Inserts a full tile of features to the feature source.

Status osgEarth::CDBFeatureSource::openImplementation ( )
override

Open the source.

void osgEarth::CDBFeatureSource::init ( )
overrideprotected

Initialize the layer.

FeatureCursor* osgEarth::CDBFeatureSource::createFeatureCursorImplementation ( const Query &  query,
ProgressCallback *  progress 
) const
overrideprotected

Return the features if exist for the given query (tile key)

int osgEarth::CDBFeatureSource::getCDBMaxLOD ( )
protected

Get the maximum CDB LOD supported by this dataset.

void osgEarth::CDBFeatureSource::readFeatureFromCache ( const osgEarth::optional< osgEarth::TileKey > &  osgEarthTileKey,
FeatureList &  currentCdbTileFeatures,
FeatureList &  osgEarthFeatures 
) const
protected

Read features from cache if available.

bool osgEarth::CDBFeatureSource::isWritable ( ) const
override
bool osgEarth::CDBFeatureSource::isFeatureDatasetSupported ( )
protected

List of CDB datasets supported by this feature source.

bool osgEarth::CDBFeatureSource::openCDBDatabase ( )
protected

Open the CDB database.

void osgEarth::CDBFeatureSource::readCDBDatasetInfo ( osgEarth::GeoExtent &  cdbGeoExtent)
protected

Read the CDB dataset info (extent and LOD)

void osgEarth::CDBFeatureSource::readCDBTilesToCache ( ProgressCallback *  progress) const
protected

read all CDB tiles we want to cache (LC, LOD0, LOD1) only once for the whole dataset

void osgEarth::CDBFeatureSource::getCDBTilesForOsgEarthTileKey ( const osgEarth::optional< osgEarth::TileKey > &  osgEarthTileKey,
makVrv::oe::CDB::DtCDBUtils::CdbTileOrderedSet &  cdbTiles 
) const
protected

Get CDB dataset tiles listing that intersect the given osgEarth tile key.

void osgEarth::CDBFeatureSource::readFeaturesFromCDBTiles ( const osgEarth::optional< osgEarth::TileKey > &  osgEarthTileKey,
const makVrv::oe::CDB::DtCDBUtils::CdbTileOrderedSet &  cdbTiles,
FeatureList &  osgEarthFeatures,
ProgressCallback *  progress 
) const
protected

Read features from the CDB tiles.

bool osgEarth::CDBFeatureSource::fileInCache ( const std::string  shpInstanceFile,
FeatureList &  currentCdbTileFeatures 
) const
protected

Check if the given shpInstanceFile is already in the cache.

void osgEarth::CDBFeatureSource::debugPrintCacheFeatures ( const osgEarth::optional< osgEarth::TileKey > &  osgEarthTileKey,
const FeatureList &  currentCdbTileFeatures,
const std::string  shpInstanceFile 
) const
private

Debug function print the cached features.

void osgEarth::CDBFeatureSource::debugPrintOutputFromCacheFeatures ( const osgEarth::optional< osgEarth::TileKey > &  osgEarthTileKey,
const FeatureList &  osgEarthFeatures,
const std::string  shpInstanceFile 
) const
private

Debug function print the the output from cached features.

Member Data Documentation

osg::ref_ptr<makVrv::oe::CDB::DtCDBDatabase> osgEarth::CDBFeatureSource::myCdbDatabase
private

CDB database object.

makVrv::oe::CDB::DatasetInfo osgEarth::CDBFeatureSource::myDatasetInfo
private

Current CDB Dataset information.

makVrv::oe::CDB::CDBTile* osgEarth::CDBFeatureSource::myCdbTilePtr
private

CDB Tile utility object.

osg::ref_ptr<makVrv::oe::CDB::CDBTileCache> osgEarth::CDBFeatureSource::myTileCache
private

CDB Tile cache object.

osg::ref_ptr< osgEarth::SpatialReference > osgEarth::CDBFeatureSource::myWgs84
private

Spatial reference pointer geocentric.

osg::ref_ptr<makVrv::oe::CDB::DtCDBVectorFeature> osgEarth::CDBFeatureSource::myVector
private

pointer to manage different types of vector feature object Vrv This will be used for reading/clipping/cropping features to return the osgEarth tile

osg::ref_ptr<makVrv::oe::CDB::DtCDBVectorFeature> osgEarth::CDBFeatureSource::myCacheVector
private

pointer to manage different types of vector feature object Vrv This one will only be used for LC/LOD0/LOD1 caching It will not be clip or cropped like myVector in order to have full features for caching

makVrv::DtDe* osgEarth::CDBFeatureSource::myDe
private

Pointer to DtDe object.

makVrv::oe::CDB::CacheVectorDataMap osgEarth::CDBFeatureSource::myCacheVectorData
private

Cache vector data to reduce re-read of the same vector files and conversion to features We want to cache LC, LOD 0 and LOD 1 for now.

osgEarth::Threading::Mutex osgEarth::CDBFeatureSource::myMutex
mutableprivate

Mutex object to allow thread safety.

bool osgEarth::CDBFeatureSource::myReadCacheFilesDone
private

Flag to indicate if we already read cache files (LC, LOD0, LOD1) for the whole CDB dataset.

GeoExtent osgEarth::CDBFeatureSource::myCdbDatasetExtent
private

CDB Dataset GeoExtent.

bool osgEarth::CDBFeatureSource::myFoundDataForDataset
private

Flag to indicate if there is no data for this dataset.


The documentation for this class was generated from the following file:

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)