diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2019-11-25 20:00:19 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-11-25 20:00:19 +0100 |
| commit | 42e981be8e89f7cfbd6f9cd3672c8e80560f61ad (patch) | |
| tree | 5a1722e77ff2bd0a2b3da13054d68e38c339f534 /include | |
| parent | cf8197bbbc3a5acd38e4f6428d24535bb11f6708 (diff) | |
| parent | c11cc087b121157c759c8e09c55d08e79baa2025 (diff) | |
| download | PROJ-42e981be8e89f7cfbd6f9cd3672c8e80560f61ad.tar.gz PROJ-42e981be8e89f7cfbd6f9cd3672c8e80560f61ad.zip | |
Merge pull request #1737 from rouault/proj_create_derived_geographic_crs
Add proj_create_derived_geographic_crs() and proj_create_conversion_pole_rotation_grib_convention() to address GRIB datasets using a pole rotation method
Diffstat (limited to 'include')
| -rw-r--r-- | include/proj/coordinateoperation.hpp | 11 | ||||
| -rw-r--r-- | include/proj/internal/coordinateoperation_constants.hpp | 19 |
2 files changed, 30 insertions, 0 deletions
diff --git a/include/proj/coordinateoperation.hpp b/include/proj/coordinateoperation.hpp index 1ced5333..e3e3ece3 100644 --- a/include/proj/coordinateoperation.hpp +++ b/include/proj/coordinateoperation.hpp @@ -607,6 +607,11 @@ class PROJ_GCC_DLL SingleOperation : virtual public CoordinateOperation { const common::UnitOfMeasure &targetUnit) const noexcept; + PROJ_INTERNAL double + parameterValueNumeric(const char *param_name, + const common::UnitOfMeasure &targetUnit) const + noexcept; + PROJ_INTERNAL double parameterValueNumericAsSI(int epsg_code) const noexcept; @@ -1319,6 +1324,12 @@ class PROJ_GCC_DLL Conversion : public SingleOperation { const common::Length &falseEasting, const common::Length &falseNorthing); + PROJ_DLL static ConversionNNPtr createPoleRotationGRIBConvention( + const util::PropertyMap &properties, + const common::Angle &southPoleLatInUnrotatedCRS, + const common::Angle &southPoleLongInUnrotatedCRS, + const common::Angle &axisRotation); + PROJ_DLL static ConversionNNPtr createChangeVerticalUnit(const util::PropertyMap &properties, const common::Scale &factor); diff --git a/include/proj/internal/coordinateoperation_constants.hpp b/include/proj/internal/coordinateoperation_constants.hpp index eb0bb8c5..533599a0 100644 --- a/include/proj/internal/coordinateoperation_constants.hpp +++ b/include/proj/internal/coordinateoperation_constants.hpp @@ -1150,6 +1150,22 @@ static const ParamMapping paramVerticalOffsetFile = { static const ParamMapping *const paramsVERTCON[] = {¶mVerticalOffsetFile, nullptr}; +static const ParamMapping paramSouthPoleLatGRIB = { + PROJ_WKT2_NAME_PARAMETER_SOUTH_POLE_LATITUDE_GRIB_CONVENTION, 0, nullptr, + common::UnitOfMeasure::Type::ANGULAR, nullptr}; + +static const ParamMapping paramSouthPoleLonGRIB = { + PROJ_WKT2_NAME_PARAMETER_SOUTH_POLE_LONGITUDE_GRIB_CONVENTION, 0, nullptr, + common::UnitOfMeasure::Type::ANGULAR, nullptr}; + +static const ParamMapping paramAxisRotationGRIB = { + PROJ_WKT2_NAME_PARAMETER_AXIS_ROTATION_GRIB_CONVENTION, 0, nullptr, + common::UnitOfMeasure::Type::ANGULAR, nullptr}; + +static const ParamMapping *const paramsPoleRotationGRIBConvention[] = { + ¶mSouthPoleLatGRIB, ¶mSouthPoleLonGRIB, ¶mAxisRotationGRIB, + nullptr}; + static const MethodMapping otherMethodMappings[] = { {EPSG_NAME_METHOD_CHANGE_VERTICAL_UNIT, EPSG_CODE_METHOD_CHANGE_VERTICAL_UNIT, nullptr, nullptr, nullptr, @@ -1172,6 +1188,9 @@ static const MethodMapping otherMethodMappings[] = { EPSG_CODE_METHOD_AFFINE_PARAMETRIC_TRANSFORMATION, nullptr, nullptr, nullptr, paramsAffineParametricTransformation}, + {PROJ_WKT2_NAME_METHOD_POLE_ROTATION_GRIB_CONVENTION, 0, nullptr, nullptr, + nullptr, paramsPoleRotationGRIBConvention}, + {EPSG_NAME_METHOD_GEOCENTRIC_TRANSLATION_GEOCENTRIC, EPSG_CODE_METHOD_GEOCENTRIC_TRANSLATION_GEOCENTRIC, nullptr, nullptr, nullptr, paramsHelmert3}, |
