libosmscout  0.1
osmscout::GeoBoxPartitioner Class Reference

Helper class to divide a given GeoBox in multiple equally sized parts. More...

#include <Geometry.h>

Public Types

enum  Direction { Direction::HORIZONTAL, Direction::VERTICAL }
 

Public Member Functions

void Advance ()
 
 GeoBoxPartitioner (const GeoBox &box, Direction direction, size_t parts)
 
GeoBox GetCurrentGeoBox () const
 
size_t GetCurrentIndex () const
 

Detailed Description

Helper class to divide a given GeoBox in multiple equally sized parts.

The partitioning can ether be done horizontally or vertically.

TODO: An alternative design is possible where all the magic is placed inside iterators and there is a strategy (the iterator has two different (global instances) stateless implementations) for either iterating horizontally or vertically.

Member Enumeration Documentation

◆ Direction

Enumerator
HORIZONTAL 
VERTICAL 

Constructor & Destructor Documentation

◆ GeoBoxPartitioner()

osmscout::GeoBoxPartitioner::GeoBoxPartitioner ( const GeoBox box,
Direction  direction,
size_t  parts 
)
inline

Member Function Documentation

◆ Advance()

void osmscout::GeoBoxPartitioner::Advance ( )
inline

◆ GetCurrentGeoBox()

GeoBox osmscout::GeoBoxPartitioner::GetCurrentGeoBox ( ) const
inline

◆ GetCurrentIndex()

size_t osmscout::GeoBoxPartitioner::GetCurrentIndex ( ) const
inline

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