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

Layer handler. More...

#include <Layer.h>

Collaboration diagram for Layer:
Collaboration graph

Public Member Functions

 Layer (std::string id, std::string title, std::string abstract, std::vector< Keyword > &keyWords, Pyramid *&dataPyramid, std::vector< Style * > &styles, double minRes, double maxRes, std::vector< CRS > &WMSCRSList, bool opaque, std::string authority, Interpolation::KernelType resampling, GeographicBoundingBoxWMS geographicBoundingBox, BoundingBoxWMS boundingBox, std::vector< MetadataURL > &metadataURLs)
 Create a Layer.
std::string getId ()
 Return the layer's identifier.
DataSource * gettile (int x, int y, std::string tmId, DataSource *errorDataSource=NULL)
 Return a tile.
Image * getbbox (ServicesConf &servicesConf, BoundingBox< double > bbox, int width, int height, CRS dst_crs, int &error)
std::string getAbstract () const
 Return the abstract.
std::string getAuthority () const
 Return the layer owner's entitity name.
std::vector< Keyword > * getKeyWords ()
 Return the list of keywords.
double getMaxRes () const
 Return the maximum scale.
double getMinRes () const
 Return the minimum scale.
bool getOpaque () const
 The layer is opaque.
Pyramid *& getDataPyramid ()
 Return the associated data pyramid.
Interpolation::KernelType getResampling () const
 Return the used interpolation.
std::string getDefaultStyle () const
 Return the layer's default style.
std::vector< Style * > getStyles () const
 Return the associated styles list.
std::string getTitle () const
 Return the title.
std::vector< CRS > getWMSCRSList () const
 Return the authorised coordinates systems list.
GeographicBoundingBoxWMS getGeographicBoundingBox () const
 Return the data bounding box in geographic coordinates (WGS84)
BoundingBoxWMS getBoundingBox () const
 Return the data bounding box in the native coordinates system.
std::vector< MetadataURLgetMetadataURLs () const
 Return the associated metadata list.
 ~Layer ()
 Default destructor.

Private Attributes

std::string id
 WMS/WMTS layer identifier.
std::string title
 Title.
std::string abstract
 abstract
std::vector< KeywordkeyWords
 List of keywords.
PyramiddataPyramid
 Tile pyramid.
std::string defaultStyle
 default style identifier
std::vector< Style * > styles
 Linked styles list.
double minRes
 Minimal display resolution.
double maxRes
 Maximal display resolution.
std::vector< CRS > WMSCRSList
 Authorised coordinates systems list for WMS.
bool opaque
 Whether the layer is opaque.
std::string authority
 Oo.
Interpolation::KernelType resampling
 Interpolation used for resizing and reprojecting tiles.
GeographicBoundingBoxWMS geographicBoundingBox
 Data bounding box in geographic coordinates (WGS84)
BoundingBoxWMS boundingBox
 Data bounding box in native coordinates system.
std::vector< MetadataURLmetadataURLs
 Linked metadata list.

Detailed Description

Layer handler.

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

A Layer represent a service layer either WMS or WMTS The layer contain reference to :

Layer file sample :

<layer>
<title>SCAN1000_JPG_LAMB93_FXX</title>
<abstract>Couche utilisant le descripteur de pyramide SCAN1000_JPG_LAMB93_FXX.pyr</abstract>
<keywordList>
<keyword>LAMB93_10cm</keyword>
<keyword>255,255,255</keyword>
<keyword>rgb</keyword>
<keyword>bicubic</keyword>
<keyword>TIFF_JPG_INT8</keyword>
<keyword>Samples per pixel: 3</keyword>
<keyword>Tiles per width: 16</keyword>
<keyword>Tiles per height: 16</keyword>
<keyword>Directory depth: 2</keyword>
</keywordList>
<style>normal</style>
<EX_GeographicBoundingBox>
<westBoundLongitude>-4.9942572726974</westBoundLongitude>
<eastBoundLongitude>10.9803184076772</eastBoundLongitude>
<southBoundLatitude>41.0037193075078</southBoundLatitude>
<northBoundLatitude>51.1940240110352</northBoundLatitude>
</EX_GeographicBoundingBox>
<WMSCRS>IGNF:LAMB93</WMSCRS>
<WMSCRS>CRS:84</WMSCRS>
<WMSCRS>IGNF:WGS84G</WMSCRS>
<WMSCRS>EPSG:3857</WMSCRS>
<WMSCRS>EPSG:4258</WMSCRS>
<boundingBox CRS="IGNF:LAMB93" minx="26214.4" miny="6023116.8" maxx="1258291.2" maxy="7150336"/>
<minRes>102.4</minRes>
<maxRes>209715.2</maxRes>
<opaque>true</opaque>
<resampling>lanczos_4</resampling>
<pyramid>../pyramids/SCAN1000_JPG_LAMB93_FXX.pyr</pyramid>
</layer>

Constructor & Destructor Documentation

Layer::Layer ( std::string  id,
std::string  title,
std::string  abstract,
std::vector< Keyword > &  keyWords,
Pyramid *&  dataPyramid,
std::vector< Style * > &  styles,
double  minRes,
double  maxRes,
std::vector< CRS > &  WMSCRSList,
bool  opaque,
std::string  authority,
Interpolation::KernelType  resampling,
GeographicBoundingBoxWMS  geographicBoundingBox,
BoundingBoxWMS  boundingBox,
std::vector< MetadataURL > &  metadataURLs 
)
inline

Create a Layer.

Parameters
[in]ididentifier
[in]titletitle
[in]abstractabstract
[in]keyWordslist of keywords
[in]dataPyramidTile pyramids
[in]styleslinked styles list, first element is the default style
[in]minResminimal display resolution
[in]maxResmaximal display resolution
[in]WMSCRSListauthorised coordinates systems list
[in]opaquewhether the layer is opaque
[in]authorityowner's entitity name
[in]resamplinginterpolation used for resizing and reprojecting tiles
[in]geographicBoundingBoxdata bounding box in geographic coordinates (WGS84)
[in]boundingBoxdata bounding box in native coordinates system
[in]metadataURLslinked metadata list

Member Function Documentation

std::string Layer::getAbstract ( ) const
inline

Return the abstract.

Returns
abstract

Here is the caller graph for this function:

std::string Layer::getAuthority ( ) const
inline

Return the layer owner's entitity name.

Returns
name
Image * Layer::getbbox ( ServicesConf servicesConf,
BoundingBox< double >  bbox,
int  width,
int  height,
CRS  dst_crs,
int &  error 
)

The resulting image is cropped on the coordinates system definition area.

Parameters
[in]servicesConfWMS service configuration
[in]bboxrequested bounding box
[in]widthrequested image widht
[in]heightrequested image height
[in]dst_crsbounding box coordinate system
[in,out]errorerror code
Returns
an image or a null pointer
BoundingBoxWMS Layer::getBoundingBox ( ) const
inline

Return the data bounding box in the native coordinates system.

Returns
bounding box

Here is the caller graph for this function:

Pyramid*& Layer::getDataPyramid ( )
inline

Return the associated data pyramid.

Returns
pyramid

Here is the caller graph for this function:

std::string Layer::getDefaultStyle ( ) const
inline

Return the layer's default style.

Returns
style identifier
GeographicBoundingBoxWMS Layer::getGeographicBoundingBox ( ) const
inline

Return the data bounding box in geographic coordinates (WGS84)

Returns
bounding box

Here is the caller graph for this function:

std::string Layer::getId ( )

Return the layer's identifier.

Returns
identifier

Here is the caller graph for this function:

std::vector<Keyword>* Layer::getKeyWords ( )
inline

Return the list of keywords.

Returns
keywords

Here is the caller graph for this function:

double Layer::getMaxRes ( ) const
inline

Return the maximum scale.

Returns
maximum scale

Here is the caller graph for this function:

std::vector<MetadataURL> Layer::getMetadataURLs ( ) const
inline

Return the associated metadata list.

Returns
metadata list

Here is the caller graph for this function:

double Layer::getMinRes ( ) const
inline

Return the minimum scale.

Returns
minimum scale

Here is the caller graph for this function:

bool Layer::getOpaque ( ) const
inline

The layer is opaque.

Deprecated:
Returns
true if it is
Interpolation::KernelType Layer::getResampling ( ) const
inline

Return the used interpolation.

Returns
interpolation
std::vector<Style*> Layer::getStyles ( ) const
inline

Return the associated styles list.

Returns
styles list

Here is the caller graph for this function:

DataSource * Layer::gettile ( int  x,
int  y,
std::string  tmId,
DataSource *  errorDataSource = NULL 
)

Return a tile.

Two possibilities :

  • the tile is present in the pyramid : the tile is returned
  • the tile is not present in the pyramid : a NoData tile is returned if errorDataSource is null, else errorDataSource is returned
    Parameters
    [in]xColumn index of the tile
    [in]yLine index of the tile
    [in]tmIdTileMatrix identifier
    [in]errorDataSourceAlternative response in case of missing data
    Returns
    a tile or an error message

Here is the caller graph for this function:

std::string Layer::getTitle ( ) const
inline

Return the title.

Returns
title

Here is the caller graph for this function:

std::vector<CRS> Layer::getWMSCRSList ( ) const
inline

Return the authorised coordinates systems list.

Returns
CRS list

Here is the caller graph for this function:

Member Data Documentation

bool Layer::opaque
private

Whether the layer is opaque.

Deprecated:

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