libosmscout
0.1
|
#include <AreaIndex.h>
Classes | |
struct | TypeData |
Public Member Functions | |
AreaIndex ()=default | |
AreaIndex (AreaIndex &&)=delete | |
AreaIndex (const AreaIndex &)=delete | |
void | Close () |
std::string | GetFilename () const |
bool | GetOffsets (const GeoBox &boundingBox, const TypeInfoSet &types, std::vector< FileOffset > &offsets, TypeInfoSet &loadedTypes) const |
bool | IsOpen () const |
bool | Open (const TypeConfigRef &typeConfig, const std::string &path, bool memoryMappedData) |
AreaIndex & | operator= (AreaIndex &&)=delete |
AreaIndex & | operator= (const AreaIndex &)=delete |
virtual | ~AreaIndex () |
Protected Member Functions | |
AreaIndex (const std::string &indexFileName) | |
void | GetOffsets (const TypeData &typeData, const GeoBox &boundingBox, std::unordered_set< FileOffset > &offsets) const |
virtual void | ReadTypeData (const TypeConfigRef &typeConfig, TypeData &data)=0 |
Protected Attributes | |
FileScanner | scanner |
Scanner instance for reading this file. More... | |
Generic area index for lookup objects by area
|
explicitprotected |
|
default |
|
delete |
|
delete |
|
virtual |
References Close().
void osmscout::AreaIndex::Close | ( | ) |
|
inline |
bool osmscout::AreaIndex::GetOffsets | ( | const GeoBox & | boundingBox, |
const TypeInfoSet & | types, | ||
std::vector< FileOffset > & | offsets, | ||
TypeInfoSet & | loadedTypes | ||
) | const |
References osmscout::TypeInfoSet::Clear(), osmscout::Log::Error(), osmscout::IOException::GetDescription(), osmscout::GeoBox::GetDisplayText(), osmscout::StopClock::GetMilliseconds(), GetOffsets(), osmscout::TypeInfoSet::IsSet(), osmscout::log, osmscout::StopClock::ResultString(), osmscout::TypeInfoSet::Set(), osmscout::StopClock::Stop(), and osmscout::Log::Warn().
|
protected |
References osmscout::AreaIndex::TypeData::bitmapOffset, osmscout::AreaIndex::TypeData::boundingBox, osmscout::AreaIndex::TypeData::dataOffsetBytes, osmscout::AreaIndex::TypeData::GetCellOffset(), osmscout::AreaIndex::TypeData::GetDataOffset(), osmscout::TileIdBox::GetMaxX(), osmscout::TileIdBox::GetMaxY(), osmscout::TileIdBox::GetMinX(), osmscout::TileIdBox::GetMinY(), osmscout::AreaIndex::TypeData::indexLevel, osmscout::TileIdBox::Intersection(), osmscout::GeoBox::Intersects(), osmscout::TileIdBox::Intersects(), osmscout::FileScanner::ReadFileOffset(), osmscout::FileScanner::ReadUInt32Number(), osmscout::FileScanner::ReadUInt64Number(), scanner, osmscout::FileScanner::SetPos(), and osmscout::AreaIndex::TypeData::tileBox.
Referenced by GetOffsets().
|
inline |
References osmscout::FileScanner::IsOpen().
bool osmscout::AreaIndex::Open | ( | const TypeConfigRef & | typeConfig, |
const std::string & | path, | ||
bool | memoryMappedData | ||
) |
References osmscout::AppendFileToDir(), osmscout::AreaIndex::TypeData::bitmapOffset, osmscout::AreaIndex::TypeData::boundingBox, osmscout::AreaIndex::TypeData::dataOffsetBytes, osmscout::Log::Error(), osmscout::FileScanner::FastRandom, osmscout::TileIdBox::GetBoundingBox(), osmscout::IOException::GetDescription(), osmscout::FileScanner::HasError(), osmscout::AreaIndex::TypeData::indexLevel, osmscout::log, osmscout::FileScanner::Open(), osmscout::FileScanner::ReadFileOffset(), ReadTypeData(), osmscout::FileScanner::ReadUInt32(), osmscout::FileScanner::ReadUInt32Number(), osmscout::FileScanner::ReadUInt8(), scanner, and osmscout::AreaIndex::TypeData::tileBox.
|
protectedpure virtual |
Referenced by Open().
|
mutableprotected |
Scanner instance for reading this file.
Referenced by Close(), GetOffsets(), and Open().