Rok4Server  0.25.4
 All Classes Files Functions Variables Enumerations Enumerator Pages
Public Member Functions | Private Attributes | List of all members
Style Class Reference

Style handler (display and metadata) More...

#include <Style.h>

Collaboration diagram for Style:
Collaboration graph

Public Member Functions

 Style (const std::string &id, const std::vector< std::string > &titles, const std::vector< std::string > &abstracts, const std::vector< Keyword > &keywords, const std::vector< LegendURL > &legendURLs, Palette &palette, int angle=-1, float exaggeration=1., uint8_t center=0)
 Create a Style.
std::string getId ()
 Return the style's identifier.
std::vector< std::string > getTitles ()
 Return the list of titles.
std::vector< std::string > getAbstracts ()
 Return the list of abstracts.
std::vector< Keyword > * getKeywords ()
 Return the list of keywords.
std::vector< LegendURLgetLegendURLs ()
 Return the list of legends.
Palette * getPalette ()
 Return the lookup table.
bool isEstompage ()
 Determine if the style describe a relief shadows.
int getAngle ()
 Return the sun azimuth.
float getExaggeration ()
 Return the slope exaggeration.
uint8_t getCenter ()
 Return the value of a pixel without slope.
virtual ~Style ()
 Default destructor.

Private Attributes

std::string id
 WMS/WMTS style identifier.
std::vector< std::string > titles
 List of titles.
std::vector< std::string > abstracts
 List of abstracts.
std::vector< Keywordkeywords
 List of keywords.
std::vector< LegendURLlegendURLs
 List of legends.
Palette palette
 Lookup table (value -> colour)
bool estompage
 Define wether the server must compute a relief shadow.
int angle
 Sun's azimuth in degree.
float exaggeration
 Slope exaggeration factor.
uint8_t center
 Value of a pixel without slope.

Detailed Description

Style handler (display and metadata)

Author
Institut national de l'information géographique et forestière

A Style represent the way to display a layer and its associated metadata. Two types of data treatment are available, Lookup table to define a value/colour equivalence and relief shading

Style file sample :

<style>
<Identifier>dem</Identifier>
<Title>Éstompage</Title>
<Abstract>Éstompage 315°</Abstract>
<Title>Relief Shadow</Title>
<Abstract>Relief Shadow with 315°</Abstract>
<Keywords>
</Keywords>
<LegendURL format="image/png" xlink:simpleLink="simple" xlink:href="http://www.rok4.com/legend.png" height="100" width="100" minScaleDenominator="0" maxScaleDenominator="30"/>
<palette maxValue="255" rgbContinuous="true" alphaContinuous="true">
<colour value="0">
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>64</alpha>
</colour>
<colour value="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
<alpha>64</alpha>
</colour>
<estompage angle="315" exaggeration="2.5" center="126"/>
</style>

Constructor & Destructor Documentation

Style::Style ( const std::string &  id,
const std::vector< std::string > &  titles,
const std::vector< std::string > &  abstracts,
const std::vector< Keyword > &  keywords,
const std::vector< LegendURL > &  legendURLs,
Palette &  palette,
int  angle = -1,
float  exaggeration = 1.,
uint8_t  center = 0 
)

Create a Style.

Parameters
[in]idWMS/WMTS style identifier
[in]titleslist of titles
[in]abstractslist of abstracts
[in]keywordslist of keywords
[in]legendURLslist of legends
[in]palettelookup table (value -> colour)
[in]anglesun's azimuth in degree between [0 and 360[
[in]exaggerationslope exaggeration factor
[in]centervalue of a pixel without slope

Member Function Documentation

std::vector<std::string> Style::getAbstracts ( )
inline

Return the list of abstracts.

Returns
abstracts

Here is the caller graph for this function:

int Style::getAngle ( )
inline

Return the sun azimuth.

Returns
azimuth
uint8_t Style::getCenter ( )
inline

Return the value of a pixel without slope.

Returns
value
float Style::getExaggeration ( )
inline

Return the slope exaggeration.

Returns
exaggeration factor
std::string Style::getId ( )
inline

Return the style's identifier.

Returns
identifier

Here is the caller graph for this function:

std::vector<Keyword>* Style::getKeywords ( )
inline

Return the list of keywords.

Returns
keywords

Here is the caller graph for this function:

std::vector<LegendURL> Style::getLegendURLs ( )
inline

Return the list of legends.

Returns
legends

Here is the caller graph for this function:

Palette* Style::getPalette ( )
inline

Return the lookup table.

Returns
lookup table

Here is the caller graph for this function:

std::vector<std::string> Style::getTitles ( )
inline

Return the list of titles.

Returns
titles

Here is the caller graph for this function:

bool Style::isEstompage ( )
inline

Determine if the style describe a relief shadows.

Returns
true if it does

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