7 #include "../../src/terralib/ws/ogc/wcs/client/WCSClient.h" 8 #include "../../src/terralib/qt/af/ApplicationController.h" 9 #include "../../src/terralib/common/TerraLib.h" 12 #include <QApplication> 14 int main(
int argc,
char *argv[])
27 std::string url =
"http://demo.geo-solutions.it/geoserver/ows";
30 std::string version =
"2.0.1";
33 std::cout <<
"GetCapabilities Example." << std::endl;
42 std::vector<std::string> coverages = capabilities.
coverages;
44 for (
unsigned int i = 0; i < coverages.size(); ++i)
46 std::cout <<
"Coverage Name: " << coverages[i] << std::endl;
51 std::cout <<
"DescribeCoverage Example." << std::endl;
56 std::string coverageName =
"nurc__mosaic";
60 std::cout <<
"CoverageId: " << description.
coverageId << std::endl;
64 std::cout <<
"--- boundedBy attributes ---" << std::endl;
65 std::cout <<
"Lower Corner X: " << boundedBy.
lowerCorner_X << std::endl;
66 std::cout <<
"Lower Corner Y: " << boundedBy.
lowerCorner_Y << std::endl;
67 std::cout <<
"Upper Corner X: " << boundedBy.
upperCorner_X << std::endl;
68 std::cout <<
"Upper Corner Y: " << boundedBy.
upperCorner_Y << std::endl;
70 std::cout <<
"SRS Name: " << boundedBy.
srsName << std::endl;
71 std::cout <<
"SRS Dimension: " << boundedBy.
srsDimension << std::endl;
72 std::cout <<
"--- boundedBy attributes ---" << std::endl;
74 std::vector<std::string> rangeTypes = description.
fieldNames;
77 std::cout <<
"--- rangeTypes ---" << std::endl;
78 for (
unsigned int i = 0; i < rangeTypes.size(); ++i)
80 std::cout <<
"Field Name: " << rangeTypes[i] << std::endl;
82 std::cout <<
"--- rangeTypes ---" << std::endl;
86 std::cout <<
"GetCoverage Example." << std::endl;
91 std::string coverageId =
"nurc__mosaic";
97 std::string coverageDiskPath = client.
getCoverage(request);
99 std::cout <<
"Path to Requested Image: " << coverageDiskPath << std::endl;
This XML Schema Document named xlinks xsd has been stored here based on the change request
std::string lowerCorner_Y
std::vector< std::string > fieldNames
std::vector< std::string > coverages
int main(int argc, char *argv[])
std::string upperCorner_X
te::ws::ogc::wcs::CoverageDescription describeCoverage(const std::string coverage)
Method to get the information about a coverage in the WCS server.
void updateCapabilities()
Method to get the capabilities from a WCS server and store in m_capabilities member.
void finalize()
It finalizes the TerraLib Platform.
static TerraLib & getInstance()
It returns a reference to the singleton instance.
te::da::DataSourceCapabilities capabilities
A struct to set the parameters of requested coverage.
A class to retrieve information and data from a Web Coverage Service.
EnvelopeWithTimePeriod envelope
void initialize()
It initializes the TerraLib Platform.
std::string upperCorner_Y
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.
std::string lowerCorner_X
const te::ws::ogc::wcs::Capabilities & getCapabilities() const
Return the m_capabilities member.