libosmscout  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups
osmscout::AreaAreaIndex Class Reference

AreaAreaIndex allows you to find areas in a given region. More...

#include <AreaAreaIndex.h>

Public Member Functions

 AreaAreaIndex (size_t cacheSize)
 
void Close ()
 
void DumpStatistics ()
 
bool GetAreasInArea (const TypeConfig &typeConfig, const GeoBox &boundingBox, size_t maxLevel, const TypeInfoSet &types, std::vector< DataBlockSpan > &spans, TypeInfoSet &loadedTypes) const
 Returns references in form of DataBlockSpans to all areas within the given area,. More...
 
bool IsOpen () const
 
bool Open (const std::string &path)
 
virtual ~AreaAreaIndex ()
 

Static Public Attributes

static const char * AREA_AREA_IDX ="areaarea.idx"
 

Detailed Description

AreaAreaIndex allows you to find areas in a given region.

For areas result can be limited by the maximum level (which in turn defines the minimum size of the resulting areas since an area in a given level must fit into the cell size (but can cross cell borders)) and the maximum number of areas found.

Internally the index is implemented as quadtree. As a result each index entry has 4 children (besides entries in the lowest level).

Constructor & Destructor Documentation

osmscout::AreaAreaIndex::AreaAreaIndex ( size_t  cacheSize)
osmscout::AreaAreaIndex::~AreaAreaIndex ( )
virtual

References Close().

Member Function Documentation

void osmscout::AreaAreaIndex::Close ( )
void osmscout::AreaAreaIndex::DumpStatistics ( )
bool osmscout::AreaAreaIndex::GetAreasInArea ( const TypeConfig &  typeConfig,
const GeoBox &  boundingBox,
size_t  maxLevel,
const TypeInfoSet &  types,
std::vector< DataBlockSpan > &  spans,
TypeInfoSet &  loadedTypes 
) const

Returns references in form of DataBlockSpans to all areas within the given area,.

Parameters
typeConfigType configuration
maxLevelThe maximum index level to load areas from
typesSet of types to load data for
maxCountMaximum number of elements to return
spansList of DataBlockSpans referencing the the found areas

References osmscout::Log::Error(), osmscout::IOException::GetDescription(), osmscout::log, and osmscout::Log::Warn().

bool osmscout::AreaAreaIndex::IsOpen ( ) const
inline
bool osmscout::AreaAreaIndex::Open ( const std::string &  path)

Member Data Documentation

const char * osmscout::AreaAreaIndex::AREA_AREA_IDX ="areaarea.idx"
static

Referenced by DumpStatistics(), and Open().


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