From 9cbe9fc2fd84c204dec6350c6f81ff06b905c6b8 Mon Sep 17 00:00:00 2001 From: Michael Behrisch Date: Sun, 27 Oct 2024 11:25:53 +0100 Subject: [PATCH] proj error checking code only works with recent proj versions #15618 --- src/utils/geom/GeoConvHelper.cpp | 2 ++ src/utils/geom/GeoConvHelper.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/utils/geom/GeoConvHelper.cpp b/src/utils/geom/GeoConvHelper.cpp index 910ec10bf387..f5063868f9b0 100644 --- a/src/utils/geom/GeoConvHelper.cpp +++ b/src/utils/geom/GeoConvHelper.cpp @@ -357,6 +357,7 @@ GeoConvHelper::cartesian2geo(Position& cartesian) const { #ifdef PROJ_API_FILE +#ifdef PROJ_VERSION_MAJOR bool GeoConvHelper::checkError(projPJ projection) const { const int err_no = proj_context_errno(PJ_DEFAULT_CTX); @@ -375,6 +376,7 @@ GeoConvHelper::checkError(projPJ projection) const { return true; } #endif +#endif bool diff --git a/src/utils/geom/GeoConvHelper.h b/src/utils/geom/GeoConvHelper.h index 730a70ed5096..38d03777888a 100644 --- a/src/utils/geom/GeoConvHelper.h +++ b/src/utils/geom/GeoConvHelper.h @@ -184,7 +184,9 @@ class GeoConvHelper { #ifdef PROJ_API_FILE void initProj(const std::string& proj); +#ifdef PROJ_VERSION_MAJOR bool checkError(projPJ projection) const; +#endif /// @brief The proj.4-projection to use projPJ myProjection;