Skip to content

Commit

Permalink
fix for GDAL < 3; #1146
Browse files Browse the repository at this point in the history
  • Loading branch information
edzer committed Dec 17, 2019
1 parent 145f073 commit 89d3409
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/gdal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,11 @@ Rcpp::List CPL_crs_parameters(Rcpp::List crs) {
CPLFree(cp);
srs->exportToWkt(&cp);
out(7) = Rcpp::CharacterVector::create(cp);
#if GDAL_VERSION_MAJOR >= 3
out(8) = Rcpp::CharacterVector::create(srs->GetName());
#else
out(8) = Rcpp::CharacterVector::create("unknown");
#endif
CPLFree(cp);
delete srs;
return out;
Expand Down

0 comments on commit 89d3409

Please sign in to comment.