libosmscout 1.1.1
Loading...
Searching...
No Matches
osmscout::locidx::CLASS_FINAL Class Reference

#include <libosmscout-import/include/osmscoutimport/GenLocationIndex.h>

Collaboration diagram for osmscout::locidx::CLASS_FINAL:

Public Types

using PostalAreaMap = std::unordered_map<std::string, PostalArea>

Public Member Functions

 RegionMetrics ()=default
 RegionPOI (const std::string &name, const ObjectFileRef &object)
bool operator< (const RegionPOI &other) const
 RegionAddress (const std::string &name, const ObjectFileRef &object)
bool operator< (const RegionAddress &other) const
std::string GetName () const
 PostalArea (const std::string &name)
void AddLocationObject (const std::string &name, const ObjectFileRef &objectRef)
 Region ()
void CalculateMinMax ()
bool CouldContain (const GeoBox &boundingBox) const
bool CouldContain (const Region &region, bool strict) const
bool Contains (Region &child) const
GeoBox GetBoundingBox () const
 Checks whether child is within this.
std::vector< GeoBox > GetAreaBoundingBoxes () const
void AddAlias (const RegionAlias &location, const GeoCoord &node)
void AddPOINode (const FileOffset &fileOffset, const std::string &name, bool &added)
void AddPOIArea (const FileOffset &fileOffset, const std::string &name, const std::vector< Point > &nodes, const GeoBox &boundingBox, bool &added)
bool AddPOIWay (const FileOffset &fileOffset, const std::string &name, const std::vector< Point > &nodes, const GeoBox &boundingBox, bool &added)
void AddLocationObject (const std::string &name, const std::string &postalCode, const ObjectFileRef &objectRef)
bool AddLocationArea (const Area &area, const std::vector< Point > &nodes, const std::string &name, const std::string &postalCode, const GeoBox &boundingBox)
bool AddLocationWay (const Way &way, const std::string &name, const std::string &postalCode, const GeoBox &boundingBox)
bool AddRegion (const RegionRef &region, bool assume_contains=true)
 RegionIndex (double cellWidth, double cellheight)
void IndexRegions (const std::vector< std::list< locidx::RegionRef > > &regionTree)
RegionRef GetRegionForNode (const RegionRef &rootRegion, const GeoCoord &coord) const

Public Attributes

uint32_t minRegionChars =std::numeric_limits<uint32_t>::max()
uint32_t maxRegionChars =0
uint32_t minRegionWords =std::numeric_limits<uint32_t>::max()
uint32_t maxRegionWords =0
uint32_t maxPOIWords =0
uint32_t minLocationChars =std::numeric_limits<uint32_t>::max()
uint32_t maxLocationChars =0
uint32_t minLocationWords =std::numeric_limits<uint32_t>::max()
uint32_t maxLocationWords =0
uint32_t maxAddressWords =0
FileOffset reference
 Reference to the node that is the alias.
std::string name
 The alias itself.
std::string altName
ObjectFileRef object
 Object.
std::unordered_map< std::string, size_t > names
 map of names in different case used for this location and their use count
FileOffset dataOffsetOffset
 Offset of place where the address list offset is stored.
std::list< ObjectFileRef > objects
 Objects that represent this location.
std::list< RegionAddressaddresses
 Addresses at this location.
std::map< std::string, RegionLocation > locations
 list of indexed objects in this region
FileOffset indexOffset
 Offset into the index file.
FileOffset dataOffset
 Offset into the index file.
ObjectFileRef reference
 Reference to the object this area is based on.
std::string isIn
 Name of the parent region as stated in OSM (is_in tag).
std::list< RegionAlias > aliases
 Location that are represented by this region.
int8_t level {-1}
 Admin level or -1 if not set.
std::vector< std::vector< GeoCoord > > areas
 the geometric area of this region
std::list< RegionPOIpois
 A list of POIs in this region.
PostalAreaMap postalAreas
 Collection of objects without a postal code.
PostalAreaMap::iterator defaultPostalArea
 PostalArea for postal code "".
std::list< RegionRefregions
 A list of sub regions.

Detailed Description

Holds some metrics regarding names in the given region. These metrics are input for some heuristics regarding searching.

An region can contain an number of location nodes. Since they do not have their own area we define the node name as an alias for the containing region, since this is the best approximation.

A POI within a region

An address within a region (normally a house number)

A location within a region. A location is represented by a number of objects. A location holds a list of addresses.

A postal area is a list of locations that are represented by an id.

An region is an area. An region represents a administrative region like a city, a country, ...

The region has a name, is represented by an objects and may have a number of aliases (that also name the region or parts of the region).

It may also have an admin level.

A region consists of a number of areas that represent the region. The areas and the region itself have bounding boxes.

An region can have child regions (suburbs, ...).

The region may have a list of POIs within its area. An region holds a number of postal areas. There is always an (unnamed9 default postal area.

Member Typedef Documentation

◆ PostalAreaMap

using osmscout::locidx::CLASS_FINAL::PostalAreaMap = std::unordered_map<std::string, PostalArea>

Member Function Documentation

◆ AddAlias()

void osmscout::locidx::CLASS_FINAL::AddAlias ( const RegionAlias & location,
const GeoCoord & node )

◆ AddLocationArea()

bool osmscout::locidx::CLASS_FINAL::AddLocationArea ( const Area & area,
const std::vector< Point > & nodes,
const std::string & name,
const std::string & postalCode,
const GeoBox & boundingBox )

◆ AddLocationObject() [1/2]

void osmscout::locidx::CLASS_FINAL::AddLocationObject ( const std::string & name,
const ObjectFileRef & objectRef )

◆ AddLocationObject() [2/2]

void osmscout::locidx::CLASS_FINAL::AddLocationObject ( const std::string & name,
const std::string & postalCode,
const ObjectFileRef & objectRef )

◆ AddLocationWay()

bool osmscout::locidx::CLASS_FINAL::AddLocationWay ( const Way & way,
const std::string & name,
const std::string & postalCode,
const GeoBox & boundingBox )

◆ AddPOIArea()

void osmscout::locidx::CLASS_FINAL::AddPOIArea ( const FileOffset & fileOffset,
const std::string & name,
const std::vector< Point > & nodes,
const GeoBox & boundingBox,
bool & added )

◆ AddPOINode()

void osmscout::locidx::CLASS_FINAL::AddPOINode ( const FileOffset & fileOffset,
const std::string & name,
bool & added )

◆ AddPOIWay()

bool osmscout::locidx::CLASS_FINAL::AddPOIWay ( const FileOffset & fileOffset,
const std::string & name,
const std::vector< Point > & nodes,
const GeoBox & boundingBox,
bool & added )

◆ AddRegion()

bool osmscout::locidx::CLASS_FINAL::AddRegion ( const RegionRef & region,
bool assume_contains = true )

◆ CalculateMinMax()

void osmscout::locidx::CLASS_FINAL::CalculateMinMax ( )

◆ Contains()

bool osmscout::locidx::CLASS_FINAL::Contains ( Region & child) const

◆ CouldContain() [1/2]

bool osmscout::locidx::CLASS_FINAL::CouldContain ( const GeoBox & boundingBox) const

◆ CouldContain() [2/2]

bool osmscout::locidx::CLASS_FINAL::CouldContain ( const Region & region,
bool strict ) const

◆ GetAreaBoundingBoxes()

std::vector< GeoBox > osmscout::locidx::CLASS_FINAL::GetAreaBoundingBoxes ( ) const
inline

◆ GetBoundingBox()

GeoBox osmscout::locidx::CLASS_FINAL::GetBoundingBox ( ) const
inline

Checks whether child is within this.

◆ GetName()

std::string osmscout::locidx::CLASS_FINAL::GetName ( ) const

◆ GetRegionForNode()

RegionRef osmscout::locidx::CLASS_FINAL::GetRegionForNode ( const RegionRef & rootRegion,
const GeoCoord & coord ) const

◆ IndexRegions()

void osmscout::locidx::CLASS_FINAL::IndexRegions ( const std::vector< std::list< locidx::RegionRef > > & regionTree)

◆ operator<() [1/2]

bool osmscout::locidx::CLASS_FINAL::operator< ( const RegionAddress & other) const
inline

◆ operator<() [2/2]

bool osmscout::locidx::CLASS_FINAL::operator< ( const RegionPOI & other) const
inline

◆ PostalArea()

osmscout::locidx::CLASS_FINAL::PostalArea ( const std::string & name)
inlineexplicit

◆ Region()

osmscout::locidx::CLASS_FINAL::Region ( )

◆ RegionAddress()

osmscout::locidx::CLASS_FINAL::RegionAddress ( const std::string & name,
const ObjectFileRef & object )
inline

◆ RegionIndex()

osmscout::locidx::CLASS_FINAL::RegionIndex ( double cellWidth,
double cellheight )

◆ RegionMetrics()

osmscout::locidx::CLASS_FINAL::RegionMetrics ( )
default

◆ RegionPOI()

osmscout::locidx::CLASS_FINAL::RegionPOI ( const std::string & name,
const ObjectFileRef & object )
inline

Member Data Documentation

◆ addresses

std::list<RegionAddress> osmscout::locidx::CLASS_FINAL::addresses

Addresses at this location.

◆ aliases

std::list<RegionAlias> osmscout::locidx::CLASS_FINAL::aliases

Location that are represented by this region.

◆ altName

std::string osmscout::locidx::CLASS_FINAL::altName

◆ areas

std::vector<std::vector<GeoCoord> > osmscout::locidx::CLASS_FINAL::areas

the geometric area of this region

◆ dataOffset

FileOffset osmscout::locidx::CLASS_FINAL::dataOffset

Offset into the index file.

◆ dataOffsetOffset

FileOffset osmscout::locidx::CLASS_FINAL::dataOffsetOffset

Offset of place where the address list offset is stored.

Offset into the index file.

◆ defaultPostalArea

PostalAreaMap::iterator osmscout::locidx::CLASS_FINAL::defaultPostalArea

PostalArea for postal code "".

◆ indexOffset

FileOffset osmscout::locidx::CLASS_FINAL::indexOffset

Offset into the index file.

◆ isIn

std::string osmscout::locidx::CLASS_FINAL::isIn

Name of the parent region as stated in OSM (is_in tag).

◆ level

int8_t osmscout::locidx::CLASS_FINAL::level {-1}

Admin level or -1 if not set.

◆ locations

std::map<std::string,RegionLocation> osmscout::locidx::CLASS_FINAL::locations

list of indexed objects in this region

◆ maxAddressWords

uint32_t osmscout::locidx::CLASS_FINAL::maxAddressWords =0

◆ maxLocationChars

uint32_t osmscout::locidx::CLASS_FINAL::maxLocationChars =0

◆ maxLocationWords

uint32_t osmscout::locidx::CLASS_FINAL::maxLocationWords =0

◆ maxPOIWords

uint32_t osmscout::locidx::CLASS_FINAL::maxPOIWords =0

◆ maxRegionChars

uint32_t osmscout::locidx::CLASS_FINAL::maxRegionChars =0

◆ maxRegionWords

uint32_t osmscout::locidx::CLASS_FINAL::maxRegionWords =0

◆ minLocationChars

uint32_t osmscout::locidx::CLASS_FINAL::minLocationChars =std::numeric_limits<uint32_t>::max()

◆ minLocationWords

uint32_t osmscout::locidx::CLASS_FINAL::minLocationWords =std::numeric_limits<uint32_t>::max()

◆ minRegionChars

uint32_t osmscout::locidx::CLASS_FINAL::minRegionChars =std::numeric_limits<uint32_t>::max()

◆ minRegionWords

uint32_t osmscout::locidx::CLASS_FINAL::minRegionWords =std::numeric_limits<uint32_t>::max()

◆ name

std::string osmscout::locidx::CLASS_FINAL::name

The alias itself.

The name of this area.

name of the postal area

The house number.

Name of the POI.

◆ names

std::unordered_map<std::string, size_t> osmscout::locidx::CLASS_FINAL::names

map of names in different case used for this location and their use count

◆ object

ObjectFileRef osmscout::locidx::CLASS_FINAL::object

Object.

Object with the given address.

◆ objects

std::list<ObjectFileRef> osmscout::locidx::CLASS_FINAL::objects

Objects that represent this location.

◆ pois

std::list<RegionPOI> osmscout::locidx::CLASS_FINAL::pois

A list of POIs in this region.

◆ postalAreas

PostalAreaMap osmscout::locidx::CLASS_FINAL::postalAreas

Collection of objects without a postal code.

◆ reference [1/2]

ObjectFileRef osmscout::locidx::CLASS_FINAL::reference

Reference to the object this area is based on.

◆ reference [2/2]

FileOffset osmscout::locidx::CLASS_FINAL::reference

Reference to the node that is the alias.

◆ regions

std::list<RegionRef> osmscout::locidx::CLASS_FINAL::regions

A list of sub regions.


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