libosmscout 1.1.1
Loading...
Searching...
No Matches
osmscout::StyleConfig Class Reference

Index selectors by type and level. More...

#include <libosmscout-map/include/osmscoutmap/StyleConfig.h>

Collaboration diagram for osmscout::StyleConfig:

Public Member Functions

 StyleConfig (const TypeConfigRef &typeConfig)
virtual ~StyleConfig ()
bool RegisterLabelProviderFactory (const std::string &name, const LabelProviderFactoryRef &factory)
LabelProviderRef GetLabelProvider (const std::string &name) const
bool HasFlag (const std::string &name) const
bool GetFlagByName (const std::string &name) const
void AddFlag (const std::string &name, bool value)
std::unordered_map< std::string, bool > GetFlags () const
StyleConstantRef GetConstantByName (const std::string &name) const
void AddConstant (const std::string &name, const StyleConstantRef &variable)
bool RegisterSymbol (const SymbolRef &symbol)
const SymbolRefGetSymbol (const std::string &name) const
void Postprocess ()
TypeConfigRef GetTypeConfig () const
size_t GetFeatureFilterIndex (const Feature &feature) const
StyleConfigSetWayPrio (const TypeInfoRef &type, size_t prio)
void AddNodeTextStyle (const StyleFilter &filter, TextPartialStyle &stype)
void AddNodeIconStyle (const StyleFilter &filter, IconPartialStyle &style)
void AddWayLineStyle (const StyleFilter &filter, LinePartialStyle &style)
void AddWayPathTextStyle (const StyleFilter &filter, PathTextPartialStyle &style)
void AddWayPathSymbolStyle (const StyleFilter &filter, PathSymbolPartialStyle &style)
void AddWayPathShieldStyle (const StyleFilter &filter, PathShieldPartialStyle &style)
void AddAreaFillStyle (const StyleFilter &filter, FillPartialStyle &style)
void AddAreaBorderStyle (const StyleFilter &filter, BorderPartialStyle &style)
void AddAreaTextStyle (const StyleFilter &filter, TextPartialStyle &style)
void AddAreaIconStyle (const StyleFilter &filter, IconPartialStyle &style)
void AddAreaBorderTextStyle (const StyleFilter &filter, PathTextPartialStyle &style)
void AddAreaBorderSymbolStyle (const StyleFilter &filter, PathSymbolPartialStyle &style)
void AddRouteLineStyle (const StyleFilter &filter, LinePartialStyle &style)
void AddRoutePathTextStyle (const StyleFilter &filter, PathTextPartialStyle &style)
void GetNodeTypesWithMaxMag (const Magnification &maxMag, TypeInfoSet &types) const
void GetWayTypesWithMaxMag (const Magnification &mag, TypeInfoSet &types) const
void GetAreaTypesWithMaxMag (const Magnification &maxMag, TypeInfoSet &types) const
void GetRouteTypesWithMaxMag (const Magnification &maxMag, TypeInfoSet &types) const
size_t GetWayPrio (const TypeInfoRef &type) const
bool HasNodeTextStyles (const TypeInfoRef &type, const Magnification &magnification) const
void GetNodeTextStyles (const FeatureValueBuffer &buffer, const Projection &projection, std::vector< TextStyleRef > &textStyles) const
size_t GetNodeTextStyleCount (const FeatureValueBuffer &buffer, const Projection &projection) const
IconStyleRef GetNodeIconStyle (const FeatureValueBuffer &buffer, const Projection &projection) const
void GetWayLineStyles (const FeatureValueBuffer &buffer, const Projection &projection, std::vector< LineStyleRef > &lineStyles) const
void GetWayPathSymbolStyle (const FeatureValueBuffer &buffer, const Projection &projection, std::vector< PathSymbolStyleRef > &symbolStyles) const
PathTextStyleRef GetWayPathTextStyle (const FeatureValueBuffer &buffer, const Projection &projection) const
bool HasWayPathTextStyle (const Projection &projection) const
PathShieldStyleRef GetWayPathShieldStyle (const FeatureValueBuffer &buffer, const Projection &projection) const
bool HasWayPathShieldStyle (const Projection &projection) const
PathTextStyleRef GetRoutePathTextStyle (const FeatureValueBuffer &buffer, const Projection &projection) const
void GetRouteLineStyles (const FeatureValueBuffer &buffer, const Projection &projection, std::vector< LineStyleRef > &lineStyles) const
FillStyleRef GetAreaFillStyle (const TypeInfoRef &type, const FeatureValueBuffer &buffer, const Projection &projection) const
void GetAreaBorderStyles (const TypeInfoRef &type, const FeatureValueBuffer &buffer, const Projection &projection, std::vector< BorderStyleRef > &borderStyles) const
bool HasAreaTextStyles (const TypeInfoRef &type, const Magnification &magnification) const
void GetAreaTextStyles (const TypeInfoRef &type, const FeatureValueBuffer &buffer, const Projection &projection, std::vector< TextStyleRef > &textStyles) const
size_t GetAreaTextStyleCount (const TypeInfoRef &type, const FeatureValueBuffer &buffer, const Projection &projection) const
IconStyleRef GetAreaIconStyle (const TypeInfoRef &type, const FeatureValueBuffer &buffer, const Projection &projection) const
PathTextStyleRef GetAreaBorderTextStyle (const TypeInfoRef &type, const FeatureValueBuffer &buffer, const Projection &projection) const
PathSymbolStyleRef GetAreaBorderSymbolStyle (const TypeInfoRef &type, const FeatureValueBuffer &buffer, const Projection &projection) const
FillStyleRef GetLandFillStyle (const Projection &projection) const
FillStyleRef GetSeaFillStyle (const Projection &projection) const
FillStyleRef GetCoastFillStyle (const Projection &projection) const
FillStyleRef GetUnknownFillStyle (const Projection &projection) const
LineStyleRef GetCoastlineLineStyle (const Projection &projection) const
LineStyleRef GetOSMTileBorderLineStyle (const Projection &projection) const
LineStyleRef GetOSMSubTileBorderLineStyle (const Projection &projection) const
void GetNodeTextStyleSelectors (size_t level, const TypeInfoRef &type, std::list< TextStyleSelector > &selectors) const
void GetAreaFillStyleSelectors (size_t level, const TypeInfoRef &type, std::list< FillStyleSelector > &selectors) const
void GetAreaTextStyleSelectors (size_t level, const TypeInfoRef &type, std::list< TextStyleSelector > &selectors) const
bool LoadContent (const std::string &filename, const std::string &content, ColorPostprocessor colorPostprocessor=nullptr, bool submodule=false, Log &log=osmscout::log)
bool Load (const std::string &styleFile, ColorPostprocessor colorPostprocessor=nullptr, bool submodule=false, Log &log=osmscout::log)
const std::list< StyleError > & GetErrors () const
const std::list< StyleError > & GetWarnings () const

Public Attributes

TypeConfigRef typeConfig
 Reference to the type configuration.
std::vector< TypeInfoSet > nodeTypeSets
std::vector< TypeInfoSet > wayTypeSets
 way types with defined style by magnification level
std::vector< TypeInfoSet > areaTypeSets
std::vector< TypeInfoSet > routeTypeSets

Detailed Description

Index selectors by type and level.

A complete style definition

Internals:

  • Fastpath: Fastpath means, that we can directly return the style definition from the style sheet. This is normally the case, if there is exactly one match in the style sheet. If there are multiple matches a new style has to be allocated and composed from all matches.

Constructor & Destructor Documentation

◆ StyleConfig()

osmscout::StyleConfig::StyleConfig ( const TypeConfigRef & typeConfig)
explicit

◆ ~StyleConfig()

virtual osmscout::StyleConfig::~StyleConfig ( )
virtual

Member Function Documentation

◆ AddAreaBorderStyle()

void osmscout::StyleConfig::AddAreaBorderStyle ( const StyleFilter & filter,
BorderPartialStyle & style )

◆ AddAreaBorderSymbolStyle()

void osmscout::StyleConfig::AddAreaBorderSymbolStyle ( const StyleFilter & filter,
PathSymbolPartialStyle & style )

◆ AddAreaBorderTextStyle()

void osmscout::StyleConfig::AddAreaBorderTextStyle ( const StyleFilter & filter,
PathTextPartialStyle & style )

◆ AddAreaFillStyle()

void osmscout::StyleConfig::AddAreaFillStyle ( const StyleFilter & filter,
FillPartialStyle & style )

◆ AddAreaIconStyle()

void osmscout::StyleConfig::AddAreaIconStyle ( const StyleFilter & filter,
IconPartialStyle & style )

◆ AddAreaTextStyle()

void osmscout::StyleConfig::AddAreaTextStyle ( const StyleFilter & filter,
TextPartialStyle & style )

◆ AddConstant()

void osmscout::StyleConfig::AddConstant ( const std::string & name,
const StyleConstantRef & variable )

◆ AddFlag()

void osmscout::StyleConfig::AddFlag ( const std::string & name,
bool value )

◆ AddNodeIconStyle()

void osmscout::StyleConfig::AddNodeIconStyle ( const StyleFilter & filter,
IconPartialStyle & style )

◆ AddNodeTextStyle()

void osmscout::StyleConfig::AddNodeTextStyle ( const StyleFilter & filter,
TextPartialStyle & stype )

◆ AddRouteLineStyle()

void osmscout::StyleConfig::AddRouteLineStyle ( const StyleFilter & filter,
LinePartialStyle & style )

◆ AddRoutePathTextStyle()

void osmscout::StyleConfig::AddRoutePathTextStyle ( const StyleFilter & filter,
PathTextPartialStyle & style )

◆ AddWayLineStyle()

void osmscout::StyleConfig::AddWayLineStyle ( const StyleFilter & filter,
LinePartialStyle & style )

◆ AddWayPathShieldStyle()

void osmscout::StyleConfig::AddWayPathShieldStyle ( const StyleFilter & filter,
PathShieldPartialStyle & style )

◆ AddWayPathSymbolStyle()

void osmscout::StyleConfig::AddWayPathSymbolStyle ( const StyleFilter & filter,
PathSymbolPartialStyle & style )

◆ AddWayPathTextStyle()

void osmscout::StyleConfig::AddWayPathTextStyle ( const StyleFilter & filter,
PathTextPartialStyle & style )

◆ GetAreaBorderStyles()

void osmscout::StyleConfig::GetAreaBorderStyles ( const TypeInfoRef & type,
const FeatureValueBuffer & buffer,
const Projection & projection,
std::vector< BorderStyleRef > & borderStyles ) const

◆ GetAreaBorderSymbolStyle()

PathSymbolStyleRef osmscout::StyleConfig::GetAreaBorderSymbolStyle ( const TypeInfoRef & type,
const FeatureValueBuffer & buffer,
const Projection & projection ) const

◆ GetAreaBorderTextStyle()

PathTextStyleRef osmscout::StyleConfig::GetAreaBorderTextStyle ( const TypeInfoRef & type,
const FeatureValueBuffer & buffer,
const Projection & projection ) const

◆ GetAreaFillStyle()

FillStyleRef osmscout::StyleConfig::GetAreaFillStyle ( const TypeInfoRef & type,
const FeatureValueBuffer & buffer,
const Projection & projection ) const

◆ GetAreaFillStyleSelectors()

void osmscout::StyleConfig::GetAreaFillStyleSelectors ( size_t level,
const TypeInfoRef & type,
std::list< FillStyleSelector > & selectors ) const

◆ GetAreaIconStyle()

IconStyleRef osmscout::StyleConfig::GetAreaIconStyle ( const TypeInfoRef & type,
const FeatureValueBuffer & buffer,
const Projection & projection ) const

◆ GetAreaTextStyleCount()

size_t osmscout::StyleConfig::GetAreaTextStyleCount ( const TypeInfoRef & type,
const FeatureValueBuffer & buffer,
const Projection & projection ) const

◆ GetAreaTextStyles()

void osmscout::StyleConfig::GetAreaTextStyles ( const TypeInfoRef & type,
const FeatureValueBuffer & buffer,
const Projection & projection,
std::vector< TextStyleRef > & textStyles ) const

◆ GetAreaTextStyleSelectors()

void osmscout::StyleConfig::GetAreaTextStyleSelectors ( size_t level,
const TypeInfoRef & type,
std::list< TextStyleSelector > & selectors ) const

◆ GetAreaTypesWithMaxMag()

void osmscout::StyleConfig::GetAreaTypesWithMaxMag ( const Magnification & maxMag,
TypeInfoSet & types ) const

◆ GetCoastFillStyle()

FillStyleRef osmscout::StyleConfig::GetCoastFillStyle ( const Projection & projection) const

◆ GetCoastlineLineStyle()

LineStyleRef osmscout::StyleConfig::GetCoastlineLineStyle ( const Projection & projection) const

◆ GetConstantByName()

StyleConstantRef osmscout::StyleConfig::GetConstantByName ( const std::string & name) const

◆ GetErrors()

const std::list< StyleError > & osmscout::StyleConfig::GetErrors ( ) const

◆ GetFeatureFilterIndex()

size_t osmscout::StyleConfig::GetFeatureFilterIndex ( const Feature & feature) const

◆ GetFlagByName()

bool osmscout::StyleConfig::GetFlagByName ( const std::string & name) const

◆ GetFlags()

std::unordered_map< std::string, bool > osmscout::StyleConfig::GetFlags ( ) const
inline

◆ GetLabelProvider()

LabelProviderRef osmscout::StyleConfig::GetLabelProvider ( const std::string & name) const

◆ GetLandFillStyle()

FillStyleRef osmscout::StyleConfig::GetLandFillStyle ( const Projection & projection) const

◆ GetNodeIconStyle()

IconStyleRef osmscout::StyleConfig::GetNodeIconStyle ( const FeatureValueBuffer & buffer,
const Projection & projection ) const

◆ GetNodeTextStyleCount()

size_t osmscout::StyleConfig::GetNodeTextStyleCount ( const FeatureValueBuffer & buffer,
const Projection & projection ) const

◆ GetNodeTextStyles()

void osmscout::StyleConfig::GetNodeTextStyles ( const FeatureValueBuffer & buffer,
const Projection & projection,
std::vector< TextStyleRef > & textStyles ) const

◆ GetNodeTextStyleSelectors()

void osmscout::StyleConfig::GetNodeTextStyleSelectors ( size_t level,
const TypeInfoRef & type,
std::list< TextStyleSelector > & selectors ) const

Methods for low level debugging access to the style sheet internals

◆ GetNodeTypesWithMaxMag()

void osmscout::StyleConfig::GetNodeTypesWithMaxMag ( const Magnification & maxMag,
TypeInfoSet & types ) const

◆ GetOSMSubTileBorderLineStyle()

LineStyleRef osmscout::StyleConfig::GetOSMSubTileBorderLineStyle ( const Projection & projection) const

◆ GetOSMTileBorderLineStyle()

LineStyleRef osmscout::StyleConfig::GetOSMTileBorderLineStyle ( const Projection & projection) const

◆ GetRouteLineStyles()

void osmscout::StyleConfig::GetRouteLineStyles ( const FeatureValueBuffer & buffer,
const Projection & projection,
std::vector< LineStyleRef > & lineStyles ) const

◆ GetRoutePathTextStyle()

PathTextStyleRef osmscout::StyleConfig::GetRoutePathTextStyle ( const FeatureValueBuffer & buffer,
const Projection & projection ) const

◆ GetRouteTypesWithMaxMag()

void osmscout::StyleConfig::GetRouteTypesWithMaxMag ( const Magnification & maxMag,
TypeInfoSet & types ) const

◆ GetSeaFillStyle()

FillStyleRef osmscout::StyleConfig::GetSeaFillStyle ( const Projection & projection) const

◆ GetSymbol()

const SymbolRef & osmscout::StyleConfig::GetSymbol ( const std::string & name) const

◆ GetTypeConfig()

TypeConfigRef osmscout::StyleConfig::GetTypeConfig ( ) const

◆ GetUnknownFillStyle()

FillStyleRef osmscout::StyleConfig::GetUnknownFillStyle ( const Projection & projection) const

◆ GetWarnings()

const std::list< StyleError > & osmscout::StyleConfig::GetWarnings ( ) const

◆ GetWayLineStyles()

void osmscout::StyleConfig::GetWayLineStyles ( const FeatureValueBuffer & buffer,
const Projection & projection,
std::vector< LineStyleRef > & lineStyles ) const

◆ GetWayPathShieldStyle()

PathShieldStyleRef osmscout::StyleConfig::GetWayPathShieldStyle ( const FeatureValueBuffer & buffer,
const Projection & projection ) const

◆ GetWayPathSymbolStyle()

void osmscout::StyleConfig::GetWayPathSymbolStyle ( const FeatureValueBuffer & buffer,
const Projection & projection,
std::vector< PathSymbolStyleRef > & symbolStyles ) const

◆ GetWayPathTextStyle()

PathTextStyleRef osmscout::StyleConfig::GetWayPathTextStyle ( const FeatureValueBuffer & buffer,
const Projection & projection ) const

◆ GetWayPrio()

size_t osmscout::StyleConfig::GetWayPrio ( const TypeInfoRef & type) const
inline

◆ GetWayTypesWithMaxMag()

void osmscout::StyleConfig::GetWayTypesWithMaxMag ( const Magnification & mag,
TypeInfoSet & types ) const

◆ HasAreaTextStyles()

bool osmscout::StyleConfig::HasAreaTextStyles ( const TypeInfoRef & type,
const Magnification & magnification ) const

◆ HasFlag()

bool osmscout::StyleConfig::HasFlag ( const std::string & name) const

◆ HasNodeTextStyles()

bool osmscout::StyleConfig::HasNodeTextStyles ( const TypeInfoRef & type,
const Magnification & magnification ) const

Methods for retrieval of styles for a given object.

◆ HasWayPathShieldStyle()

bool osmscout::StyleConfig::HasWayPathShieldStyle ( const Projection & projection) const
Parameters
projection
Returns
true when some way shield style is defined on provided projection

◆ HasWayPathTextStyle()

bool osmscout::StyleConfig::HasWayPathTextStyle ( const Projection & projection) const
Parameters
projection
Returns
true when some way text style is defined on provided projection

◆ Load()

bool osmscout::StyleConfig::Load ( const std::string & styleFile,
ColorPostprocessor colorPostprocessor = nullptr,
bool submodule = false,
Log & log = osmscout::log )

◆ LoadContent()

bool osmscout::StyleConfig::LoadContent ( const std::string & filename,
const std::string & content,
ColorPostprocessor colorPostprocessor = nullptr,
bool submodule = false,
Log & log = osmscout::log )

Methods for loading a concrete OSS style sheet

◆ Postprocess()

void osmscout::StyleConfig::Postprocess ( )

◆ RegisterLabelProviderFactory()

bool osmscout::StyleConfig::RegisterLabelProviderFactory ( const std::string & name,
const LabelProviderFactoryRef & factory )

Methods for registering LabelProvider-factories and and retrieving label providers

◆ RegisterSymbol()

bool osmscout::StyleConfig::RegisterSymbol ( const SymbolRef & symbol)

◆ SetWayPrio()

StyleConfig & osmscout::StyleConfig::SetWayPrio ( const TypeInfoRef & type,
size_t prio )

Member Data Documentation

◆ areaTypeSets

std::vector<TypeInfoSet> osmscout::StyleConfig::areaTypeSets

◆ nodeTypeSets

std::vector<TypeInfoSet> osmscout::StyleConfig::nodeTypeSets

◆ routeTypeSets

std::vector<TypeInfoSet> osmscout::StyleConfig::routeTypeSets

◆ typeConfig

TypeConfigRef osmscout::StyleConfig::typeConfig

Reference to the type configuration.

◆ wayTypeSets

std::vector<TypeInfoSet> osmscout::StyleConfig::wayTypeSets

way types with defined style by magnification level


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