Skip to content

Commit

Permalink
Merge pull request #265 from KNMI/fix-geos-satcomp
Browse files Browse the repository at this point in the history
2.10.2 hotfix for geos projections without sweep parameter
  • Loading branch information
maartenplieger authored May 17, 2023
2 parents 4387eab + cdb5071 commit 973c567
Show file tree
Hide file tree
Showing 6 changed files with 912 additions and 429 deletions.
9 changes: 5 additions & 4 deletions CCDFDataModel/CProj4ToCF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,11 @@ void CProj4ToCF::initGeosPerspective(CDF::Variable *projectionVariable, std::vec
projectionVariable->addAttribute(new CDF::Attribute("latitude_of_projection_origin", CDF_FLOAT, &v, 1));
v = getProj4ValueF("lon_0", projKVPList, 0);
projectionVariable->addAttribute(new CDF::Attribute("longitude_of_projection_origin", CDF_FLOAT, &v, 1));
s = getProj4Value("sweep", projKVPList);
projectionVariable->addAttribute(new CDF::Attribute("sweep_angle_axis", s.c_str()));
try {
s = getProj4Value("sweep", projKVPList);
projectionVariable->addAttribute(new CDF::Attribute("sweep_angle_axis", s.c_str()));
} catch (int e) {
}
}

int CProj4ToCF::convertBackAndFort(const char *projString, CDF::Variable *projectionVariable) {
Expand Down Expand Up @@ -504,7 +507,6 @@ int CProj4ToCF::convertProjToCF(CDF::Variable *projectionVariable, const char *p
}
}
if (projectionVariable->name.empty()) projectionVariable->name = "projection";

projectionVariable->setAttributeText("proj4_params", proj4String);
CT::string kvpProjString = "";
for (size_t j = 0; j < projKVPList.size(); j++) {
Expand All @@ -518,7 +520,6 @@ int CProj4ToCF::convertProjToCF(CDF::Variable *projectionVariable, const char *p
kvpProjString.trimSelf();
}
}

projectionVariable->setAttributeText("proj4_origin", kvpProjString.c_str());
} catch (int e) {
CDBError("Exception %d occured", e);
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ USER root
LABEL maintainer="adaguc@knmi.nl"

# Version should be same as in Definitions.h
LABEL version="2.10.1"
LABEL version="2.10.2"

######### First stage (build) ############

Expand Down
2 changes: 1 addition & 1 deletion adagucserverEC/Definitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#ifndef Definitions_H
#define Definitions_H

#define ADAGUCSERVER_VERSION "2.10.1" // Please also update in the Dockerfile to the same version
#define ADAGUCSERVER_VERSION "2.10.2" // Please also update in the Dockerfile to the same version

// CConfigReaderLayerType
#define CConfigReaderLayerTypeUnknown 0
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 973c567

Please sign in to comment.