osgEarth 2.1.1
|
Public Member Functions | |
TMSCache (const TMSCacheOptions &options=TMSCacheOptions()) | |
TMSCache (const TMSCache &rhs, const osg::CopyOp &op=osg::CopyOp::DEEP_COPY_ALL) | |
META_Object (osgEarth, TMSCache) | |
const bool & | getInvertY () |
void | setInvertY (const bool &invertY) |
virtual std::string | getFilename (const TileKey &key, const CacheSpec &spec) const |
Private Attributes | |
bool | _invertY |
TMSCacheOptions | _options |
Disk-based cache that stores image tiles according the the OSGeo TMS specification. TODO: move this imlpementation into a proper driver plugin
TMSCache::TMSCache | ( | const TMSCacheOptions & | options = TMSCacheOptions() | ) |
Definition at line 474 of file Caching.cpp.
TMSCache::TMSCache | ( | const TMSCache & | rhs, |
const osg::CopyOp & | op = osg::CopyOp::DEEP_COPY_ALL |
||
) |
Definition at line 481 of file Caching.cpp.
Gets the filename to cache to for the given TileKey
Reimplemented from osgEarth::DiskCache.
Definition at line 489 of file Caching.cpp.
{ unsigned int x,y; key.getTileXY(x, y); unsigned int lod = key.getLevelOfDetail(); unsigned int numCols, numRows; key.getProfile()->getNumTiles(lod, numCols, numRows); if ( _options.invertY() == false ) { y = numRows - y - 1; } std::stringstream buf; buf << getPath() << "/" << spec.cacheId() << "/" << lod << "/" << x << "/" << y << "." << spec.format(); std::string bufStr; bufStr = buf.str(); return bufStr; }
const bool& osgEarth::TMSCache::getInvertY | ( | ) | [inline] |
osgEarth::TMSCache::META_Object | ( | osgEarth | , |
TMSCache | |||
) |
void osgEarth::TMSCache::setInvertY | ( | const bool & | invertY | ) | [inline] |
bool osgEarth::TMSCache::_invertY [private] |
TMSCacheOptions osgEarth::TMSCache::_options [private] |
Reimplemented from osgEarth::DiskCache.