A class to retrieve information and data from a Web Coverage Service. More...
#include <WCSClient.h>
Public Member Functions | |
| te::ws::ogc::wcs::CoverageDescription | describeCoverage (const std::string coverage) |
| Method to get the information about a coverage in the WCS server. More... | |
| const te::ws::ogc::wcs::Capabilities & | getCapabilities () const |
| Return the m_capabilities member. More... | |
| std::string | getCoverage (const te::ws::ogc::wcs::CoverageRequest coverageRequest, te::common::TaskProgress *taskProgress=0) const |
| Method to get the coverage from the WCS server. More... | |
| std::string | makeFileRequest (const std::string url, const std::string fileName, te::common::TaskProgress *taskProgress=0) const |
| Executes a request on a WCS 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 WCS server and store in m_capabilities member. More... | |
| WCSClient (const std::string usrDataDir="", const std::string uri="", const std::string version="2.0.1") | |
| Class constructor. It initializes the m_uri and m_version class members. More... | |
| ~WCSClient () | |
| Default destructor. More... | |
Private Member Functions | |
| std::string | getFileExtension (const std::string &format) const |
Private Attributes | |
| te::ws::ogc::wcs::Capabilities | m_capabilities |
| std::shared_ptr< te::ws::core::CurlWrapper > | m_curl |
| std::string | m_dataDir |
| std::map< std::string, te::ws::ogc::wcs::CoverageDescription > | m_descriptionMap |
| te::ws::ogc::wcs::XMLParser | m_parser |
| te::core::URI | m_uri |
| std::string | m_version |
A class to retrieve information and data from a Web Coverage Service.
Definition at line 58 of file WCSClient.h.
| te::ws::ogc::WCSClient::WCSClient | ( | const std::string | usrDataDir = "", |
| const std::string | uri = "", |
||
| const std::string | version = "2.0.1" |
||
| ) |
Class constructor. It initializes the m_uri and m_version class members.
| usrDataDir | Directory to store used temporary XML and images from WCS server. |
| uri | The adress of WCS server. |
| version | The WCS version. |
Definition at line 46 of file WCSClient.cpp.
References te::core::FileSystem::createDirectories(), te::core::FileSystem::exists(), te::core::URI::host(), te::ws::core::HTTP_BASIC, te::core::FileSystem::isDirectory(), m_curl, m_dataDir, m_uri, te::core::URI::password(), te::core::URI::path(), te::core::URI::port(), te::core::URI::query(), te::core::URI::scheme(), te::core::URI::user(), and ~WCSClient().
|
default |
Default destructor.
Referenced by WCSClient().
| te::ws::ogc::wcs::CoverageDescription te::ws::ogc::WCSClient::describeCoverage | ( | const std::string | coverage | ) |
Method to get the information about a coverage in the WCS server.
| coverage | The name of the coverage to describe |
Definition at line 122 of file WCSClient.cpp.
References te::qt::plugins::wtss::coverage, m_curl, m_descriptionMap, m_parser, m_uri, m_version, makeFileRequest(), te::ws::ogc::wcs::XMLParser::parseDescribeCoverage(), TE_TR, and te::core::URI::uri().
Referenced by BOOST_AUTO_TEST_CASE(), and main().
| const te::ws::ogc::wcs::Capabilities & te::ws::ogc::WCSClient::getCapabilities | ( | ) | const |
Return the m_capabilities member.
The m_capabilities will be empty until the updateCapabilities() method its called.
Definition at line 263 of file WCSClient.cpp.
References m_capabilities.
Referenced by BOOST_AUTO_TEST_CASE(), and main().
| std::string te::ws::ogc::WCSClient::getCoverage | ( | const te::ws::ogc::wcs::CoverageRequest | coverageRequest, |
| te::common::TaskProgress * | taskProgress = 0 |
||
| ) | const |
Method to get the coverage from the WCS server.
| coverage | The struct with the desire coverage parameters |
Definition at line 178 of file WCSClient.cpp.
References te::ws::ogc::wcs::CoverageRequest::additionalParameters, te::ws::ogc::wcs::CoverageRequest::coverageID, te::ws::ogc::wcs::CoverageRequest::envelope, te::ws::ogc::wcs::CoverageRequest::format, getFileExtension(), te::ws::ogc::wcs::EnvelopeWithTimePeriod::lowerCorner_X, m_curl, m_uri, m_version, makeFileRequest(), te::ws::ogc::wcs::CoverageRequest::mediaType, TE_TR, te::ws::ogc::wcs::CoverageRequest::time, te::core::URI::uri(), and te::core::URIEncode().
Referenced by BOOST_AUTO_TEST_CASE(), and main().
|
private |
Definition at line 165 of file WCSClient.cpp.
Referenced by getCoverage().
| std::string te::ws::ogc::WCSClient::makeFileRequest | ( | const std::string | url, |
| const std::string | fileName, | ||
| te::common::TaskProgress * | taskProgress = 0 |
||
| ) | const |
Executes a request on a WCS server.
| url | The complete url of request |
Definition at line 254 of file WCSClient.cpp.
References m_curl, and m_dataDir.
Referenced by describeCoverage(), getCoverage(), and updateCapabilities().
| void te::ws::ogc::WCSClient::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. |
Definition at line 268 of file WCSClient.cpp.
References m_curl.
| void te::ws::ogc::WCSClient::updateCapabilities | ( | ) |
Method to get the capabilities from a WCS server and store in m_capabilities member.
To access the information contained in the m_capabilities, use the getCapabilities() method.
Definition at line 92 of file WCSClient.cpp.
References m_capabilities, m_curl, m_parser, m_uri, m_version, makeFileRequest(), te::ws::ogc::wcs::XMLParser::parseCapabilities(), TE_TR, and te::core::URI::uri().
Referenced by BOOST_AUTO_TEST_CASE(), te::ws::ogc::wcs::da::DataSource::exists(), and main().
|
private |
Definition at line 138 of file WCSClient.h.
Referenced by getCapabilities(), and updateCapabilities().
|
private |
Definition at line 139 of file WCSClient.h.
Referenced by describeCoverage(), getCoverage(), makeFileRequest(), setCurlWrapper(), updateCapabilities(), and WCSClient().
|
private |
Definition at line 136 of file WCSClient.h.
Referenced by makeFileRequest(), and WCSClient().
|
private |
Definition at line 140 of file WCSClient.h.
Referenced by describeCoverage().
|
private |
Definition at line 141 of file WCSClient.h.
Referenced by describeCoverage(), and updateCapabilities().
|
private |
Definition at line 137 of file WCSClient.h.
Referenced by describeCoverage(), getCoverage(), updateCapabilities(), and WCSClient().
|
private |
Definition at line 135 of file WCSClient.h.
Referenced by describeCoverage(), getCoverage(), and updateCapabilities().