LuciadCPillar 2024.0.04
luciad::WmsDataSource Class Referencefinal

Data source representation for a WMS, with one or more layers. More...

#include <luciad/formats/wms/WmsDataSource.h>

Classes

class  Builder
 A builder to create WmsDataSource instances. More...
 
class  Layer
 Represents a WMS layer with an optional style. More...
 

Public Member Functions

 ~WmsDataSource ()
 
const std::optional< std::string > & getFormat () const
 Returns the image format that should be used when decoding the WMS layer. More...
 
const std::vector< std::shared_ptr< Layer > > & getLayers () const
 Returns the list of WMS layers to load. More...
 
const std::optional< std::string > & getStyledLayerDescriptor () const
 Returns the Styled Layer Descriptor to use or std::nullopt if not set. More...
 
const std::optional< std::string > & getStyledLayerDescriptorUrl () const
 Returns the Styled Layer Descriptor URL to use or std::nullopt if not set. More...
 
const std::string & getUrl () const
 Returns the base URL of the WMS data source. More...
 
bool isTransparent () const
 Returns whether the WMS is requested to return an image with a transparent background. More...
 

Static Public Member Functions

static Builder newBuilder ()
 Returns the builder class for creation of the WMS data source. More...
 

Detailed Description

Data source representation for a WMS, with one or more layers.

The WMS data source requires as a minimum:

  • The URL location of the WMS.
  • One or more layers.

By default the data source is configured to request images from the WMS server with a transparent background.

See also
luciad::WmsCapabilities to get the layers' information.
Since
2020.2

Constructor & Destructor Documentation

◆ ~WmsDataSource()

luciad::WmsDataSource::~WmsDataSource ( )

Member Function Documentation

◆ getFormat()

const std::optional< std::string > & luciad::WmsDataSource::getFormat ( ) const

Returns the image format that should be used when decoding the WMS layer.

A std::nullopt return value indicates the format should be auto-detected.

Returns
the image format that should be used when decoding the WMS layer. A std::nullopt return value indicates the format should be auto-detected.

◆ getLayers()

const std::vector< std::shared_ptr< Layer > > & luciad::WmsDataSource::getLayers ( ) const

Returns the list of WMS layers to load.

The layers are ordered from bottom to top.

Returns
the list of WMS layers to load.

◆ getStyledLayerDescriptor()

const std::optional< std::string > & luciad::WmsDataSource::getStyledLayerDescriptor ( ) const

Returns the Styled Layer Descriptor to use or std::nullopt if not set.

Returns
The Styled Layer Descriptor to use or std::nullopt if not set.

◆ getStyledLayerDescriptorUrl()

const std::optional< std::string > & luciad::WmsDataSource::getStyledLayerDescriptorUrl ( ) const

Returns the Styled Layer Descriptor URL to use or std::nullopt if not set.

Returns
The Styled Layer Descriptor URL to use or std::nullopt if not set.

◆ getUrl()

const std::string & luciad::WmsDataSource::getUrl ( ) const

Returns the base URL of the WMS data source.

Returns
the base URL of the WMS data source.

◆ isTransparent()

bool luciad::WmsDataSource::isTransparent ( ) const

Returns whether the WMS is requested to return an image with a transparent background.

Returns
whether the WMS is requested to return an image with a transparent background.

◆ newBuilder()

static Builder luciad::WmsDataSource::newBuilder ( )
static

Returns the builder class for creation of the WMS data source.

Returns
the builder class for creation of the WMS data source.