A class to retrieve information and data from a Web Map Service. More...
#include <WMSClient.h>
Public Member Functions | |
| const te::ws::ogc::wms::WMSCapabilities & | getCapabilities () const |
| Return the WMSCapabilities member. More... | |
| const te::ws::ogc::wms::WMSGetFeatureInfoResponse | getFeatureInfo (const te::ws::ogc::wms::WMSGetFeatureInfoRequest &request) const |
| It execute a WMS GetFeatureInfo and returns a WMSGetFeatureInfoResponse with the result. More... | |
| const te::ws::ogc::wms::WMSGetMapResponse | getMap (const te::ws::ogc::wms::WMSGetMapRequest &request) const |
| Return the WMSGetMapResponse member. More... | |
| bool | isAccessible () |
| std::string | makeFileRequest (const std::string &url, const std::string &fileName) const |
| Executes a request on a WMS server. More... | |
| std::string | makeRequest (const std::string &url) const |
| Executes a request on a WMS server. More... | |
| const std::string | saveGetMap (const te::ws::ogc::wms::WMSGetMapRequest &request, const std::string &filename) |
| It execute a WMS GetMap and save the result image on disk. The request will be based on WMSGetMapRequest setted to this WMSLayer. More... | |
| void | setCapabilities (const te::ws::ogc::wms::WMSCapabilities &capabilities) |
| 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 Member Functions | |
| std::string | build111GetFeatureInfoURL (const te::ws::ogc::wms::WMSGetFeatureInfoRequest &request) const |
| std::string | build111GetMapRequestURL (const te::ws::ogc::wms::WMSGetMapRequest &request) const |
| std::string | build130GetFeatureInfoURL (const te::ws::ogc::wms::WMSGetFeatureInfoRequest &request) const |
| std::string | build130GetMapRequestURL (const te::ws::ogc::wms::WMSGetMapRequest &request) const |
| std::string | buildGetFeatureInfoURL (const te::ws::ogc::wms::WMSGetFeatureInfoRequest &request) const |
| std::string | buildGetMapRequestURL (const te::ws::ogc::wms::WMSGetMapRequest &request) const |
Private Attributes | |
| te::ws::ogc::wms::WMSCapabilities | m_capabilities |
| std::shared_ptr< te::ws::core::CurlWrapper > | m_curl |
| std::string | m_dataDir |
| std::unique_ptr< te::ws::ogc::wms::XMLParser > | m_parser |
| te::core::URI | m_uri |
| std::string | m_version |
A class to retrieve information and data from a Web Map Service.
Definition at line 57 of file WMSClient.h.
| 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.
| usrDataDir | Directory to store used temporary XML and images from WMS server. |
| uri | The adress of WMS server. |
| version | The WMS version. |
| te::ws::ogc::WMSClient::~WMSClient | ( | ) |
Default destructor.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
| 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.
| const te::ws::ogc::wms::WMSGetFeatureInfoResponse te::ws::ogc::WMSClient::getFeatureInfo | ( | const te::ws::ogc::wms::WMSGetFeatureInfoRequest & | request | ) | const |
It execute a WMS GetFeatureInfo and returns a WMSGetFeatureInfoResponse with the result.
| 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.
| bool te::ws::ogc::WMSClient::isAccessible | ( | ) |
| std::string te::ws::ogc::WMSClient::makeFileRequest | ( | const std::string & | url, |
| const std::string & | fileName | ||
| ) | const |
Executes a request on a WMS server.
| url | The complete url of request |
| std::string te::ws::ogc::WMSClient::makeRequest | ( | const std::string & | url | ) | const |
Executes a request on a WMS server.
| url | The complete url of request |
| const std::string te::ws::ogc::WMSClient::saveGetMap | ( | const te::ws::ogc::wms::WMSGetMapRequest & | request, |
| const std::string & | filename | ||
| ) |
It execute a WMS GetMap and save the result image on disk. The request will be based on WMSGetMapRequest setted to this WMSLayer.
| void te::ws::ogc::WMSClient::setCapabilities | ( | const te::ws::ogc::wms::WMSCapabilities & | capabilities | ) |
| 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.
| curlWrapper | Wrapper to be used. Checks if we have access to the current URI |
| 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.
|
private |
Definition at line 167 of file WMSClient.h.
|
private |
Definition at line 168 of file WMSClient.h.
|
private |
Definition at line 165 of file WMSClient.h.
|
private |
Definition at line 169 of file WMSClient.h.
|
private |
Definition at line 166 of file WMSClient.h.
|
private |
Definition at line 164 of file WMSClient.h.