-
Notifications
You must be signed in to change notification settings - Fork 27
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
base: master
Are you sure you want to change the base?
Conversation
adagucserverEC/CXMLGen.cpp
Outdated
@@ -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) { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
adagucserverEC/CXMLGen.cpp
Outdated
@@ -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) { |
There was a problem hiding this comment.
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?
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.