Skip to content

Commit

Permalink
proj error checking code only works with recent proj versions #15618
Browse files Browse the repository at this point in the history
  • Loading branch information
behrisch committed Oct 27, 2024
1 parent f0fcde3 commit 9cbe9fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/utils/geom/GeoConvHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -375,6 +376,7 @@ GeoConvHelper::checkError(projPJ projection) const {
return true;
}
#endif
#endif


bool
Expand Down
2 changes: 2 additions & 0 deletions src/utils/geom/GeoConvHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9cbe9fc

Please sign in to comment.