Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: WCS DescribeCoverage does not show dimensions for a multidim layer #395

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

belentorrente
Copy link
Collaborator

This MR covers a fix to show the values of multiple dimensions in DescribeCoverage, but also fixes an adjacent problem that was found (inconsistent time interval calculations).

The code to calculate intervals has been made modular, and it can work with leap years and data missing some timesteps.

Note: Tests fail in one of the Docker tasks due to EPSG:28992 envelopes. This does not happen in the other Docker task. The differences are minimal (likely caused by different versions of proj4?). So the contents of EPSG:28992 envelopes have been ignored when comparing the XML files.

@@ -41,6 +43,35 @@
const char *CXMLGen::className = "CXMLGen";
int CXMLGen::WCSDescribeCoverage(CServerParams *srvParam, CT::string *XMLDocument) { return OGCGetCapabilities(srvParam, XMLDocument); }

// Function to parse a string to double if numeric
double parseNumeric(std::string const &str, bool &isNumeric) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can these functions be moved to helper files?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, maybe to CXMLGenUtils? Since it is used in CXMLGen.

@@ -775,6 +806,79 @@ int CXMLGen::getWCS_1_0_0_Capabilities(CT::string *XMLDoc, std::vector<MetadataL
return 0;
}

void generateRangeSet(CT::string *XMLDoc, MetadataLayer *layer) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is specific to WCS right? Maybe mention this in the name?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants