te::ws::ogc::WMSClient Class Reference

A class to retrieve information and data from a Web Map Service. More...

#include <WMSClient.h>

Public Member Functions

const te::ws::ogc::wms::WMSCapabilitiesgetCapabilities () const
 Return the WMSCapabilities member. More...
 
const te::ws::ogc::wms::WMSGetMapResponse getMap (const te::ws::ogc::wms::WMSGetMapRequest &request) const
 Return the WMSGetMapResponse member. More...
 
std::string makeFileRequest (const std::string url, const std::string fileName) const
 Executes a request on a WMS server. More...
 
void setCurlWrapper (te::ws::core::CurlWrapper *curlWrapper)
 Sets the TerraLib CurlWrapper to be used internally. More...
 
void updateCapabilities ()
 Method to get the capabilities from a WMS server and store in m_capabilities member. More...
 
 WMSClient (const std::string usrDataDir="", const std::string uri="", const std::string version="1.3.0")
 Class constructor. It initializes the m_uri and m_version class members. More...
 
 ~WMSClient ()
 Default destructor. More...
 

Private Attributes

te::ws::ogc::wms::WMSCapabilities m_capabilities
 
std::shared_ptr< te::ws::core::CurlWrapperm_curl
 
std::string m_dataDir
 
te::ws::ogc::wms::XMLParser m_parser
 
te::core::URI m_uri
 
std::string m_version
 

Detailed Description

A class to retrieve information and data from a Web Map Service.

Definition at line 57 of file WMSClient.h.

Constructor & Destructor Documentation

te::ws::ogc::WMSClient::WMSClient ( const std::string  usrDataDir = "",
const std::string  uri = "",
const std::string  version = "1.3.0" 
)

Class constructor. It initializes the m_uri and m_version class members.

Parameters
usrDataDirDirectory to store used temporary XML and images from WMS server.
uriThe adress of WMS server.
versionThe WMS version.
te::ws::ogc::WMSClient::~WMSClient ( )

Default destructor.

Member Function Documentation

const te::ws::ogc::wms::WMSCapabilities& te::ws::ogc::WMSClient::getCapabilities ( ) const

Return the WMSCapabilities member.

The WMSCapabilities will be empty until the updateCapabilities() method its called.

Returns
Returns the WMSCapabilities member.
const te::ws::ogc::wms::WMSGetMapResponse te::ws::ogc::WMSClient::getMap ( const te::ws::ogc::wms::WMSGetMapRequest request) const

Return the WMSGetMapResponse member.

Make the GetMapRequest and return the server answer as a WMSGetMapResponse.

Returns
Returns a path to a file
std::string te::ws::ogc::WMSClient::makeFileRequest ( const std::string  url,
const std::string  fileName 
) const

Executes a request on a WMS server.

Parameters
urlThe complete url of request
Returns
Returns a path to a file
void te::ws::ogc::WMSClient::setCurlWrapper ( te::ws::core::CurlWrapper curlWrapper)

Sets the TerraLib CurlWrapper to be used internally.

By default it is an instance of te::ws::core::CurlWrapper class.

Parameters
curlWrapperWrapper to be used.
void te::ws::ogc::WMSClient::updateCapabilities ( )

Method to get the capabilities from a WMS server and store in m_capabilities member.

To access the information contained in the m_capabilities, use the getCapabilities() method.

Member Data Documentation

te::ws::ogc::wms::WMSCapabilities te::ws::ogc::WMSClient::m_capabilities
private

Definition at line 124 of file WMSClient.h.

std::shared_ptr<te::ws::core::CurlWrapper> te::ws::ogc::WMSClient::m_curl
private

Definition at line 125 of file WMSClient.h.

std::string te::ws::ogc::WMSClient::m_dataDir
private

Definition at line 122 of file WMSClient.h.

te::ws::ogc::wms::XMLParser te::ws::ogc::WMSClient::m_parser
private

Definition at line 126 of file WMSClient.h.

te::core::URI te::ws::ogc::WMSClient::m_uri
private

Definition at line 123 of file WMSClient.h.

std::string te::ws::ogc::WMSClient::m_version
private

Definition at line 121 of file WMSClient.h.


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