aboutsummaryrefslogtreecommitdiff
path: root/src/grids.cpp
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2020-03-16 17:56:29 +0100
committerGitHub <noreply@github.com>2020-03-16 17:56:29 +0100
commit6cfc2521d687e3de57fa13b0f80ef05073362571 (patch)
tree7509a1282eea3bd939b42fbb7610aadedbb28e85 /src/grids.cpp
parentf0d6b64fee8b796ec038929187b7b725f62a5ba8 (diff)
parent175cbad0a7ca202cefff33f240100b01752f8f73 (diff)
downloadPROJ-6cfc2521d687e3de57fa13b0f80ef05073362571.tar.gz
PROJ-6cfc2521d687e3de57fa13b0f80ef05073362571.zip
Merge branch 'master' into add_proj_get_suggested_operation
Diffstat (limited to 'src/grids.cpp')
-rw-r--r--src/grids.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/grids.cpp b/src/grids.cpp
index b9da072c..c5fc6c74 100644
--- a/src/grids.cpp
+++ b/src/grids.cpp
@@ -309,8 +309,11 @@ constexpr uint16 TIFFTAG_GEOTRANSMATRIX = 34264;
constexpr uint16 TIFFTAG_GEOKEYDIRECTORY = 34735;
constexpr uint16 TIFFTAG_GEODOUBLEPARAMS = 34736;
constexpr uint16 TIFFTAG_GEOASCIIPARAMS = 34737;
+#ifndef TIFFTAG_GDAL_METADATA
+// Starting with libtiff > 4.1.0, those symbolic names are #define in tiff.h
constexpr uint16 TIFFTAG_GDAL_METADATA = 42112;
constexpr uint16 TIFFTAG_GDAL_NODATA = 42113;
+#endif
// ---------------------------------------------------------------------------
@@ -1373,7 +1376,8 @@ VerticalShiftGridSet::open(PJ_CONTEXT *ctx, const std::string &filename) {
if (IsTIFF(header_size, header)) {
#ifdef TIFF_ENABLED
- auto set = GTiffVGridShiftSet::open(ctx, std::move(fp), actualName);
+ auto set = std::unique_ptr<VerticalShiftGridSet>(
+ GTiffVGridShiftSet::open(ctx, std::move(fp), actualName));
if (!set)
pj_ctx_set_errno(ctx, PJD_ERR_FAILED_TO_LOAD_GRID);
return set;
@@ -2351,7 +2355,8 @@ HorizontalShiftGridSet::open(PJ_CONTEXT *ctx, const std::string &filename) {
} else if (IsTIFF(header_size,
reinterpret_cast<const unsigned char *>(header))) {
#ifdef TIFF_ENABLED
- auto set = GTiffHGridShiftSet::open(ctx, std::move(fp), actualName);
+ auto set = std::unique_ptr<HorizontalShiftGridSet>(
+ GTiffHGridShiftSet::open(ctx, std::move(fp), actualName));
if (!set)
pj_ctx_set_errno(ctx, PJD_ERR_FAILED_TO_LOAD_GRID);
return set;
@@ -2686,8 +2691,8 @@ GenericShiftGridSet::open(PJ_CONTEXT *ctx, const std::string &filename) {
if (IsTIFF(header_size, header)) {
#ifdef TIFF_ENABLED
- auto set =
- GTiffGenericGridShiftSet::open(ctx, std::move(fp), actualName);
+ auto set = std::unique_ptr<GenericShiftGridSet>(
+ GTiffGenericGridShiftSet::open(ctx, std::move(fp), actualName));
if (!set)
pj_ctx_set_errno(ctx, PJD_ERR_FAILED_TO_LOAD_GRID);
return set;