Skip to content

Commit

Permalink
fix travis; #1146
Browse files Browse the repository at this point in the history
  • Loading branch information
edzer committed Nov 29, 2019
1 parent 59d3591 commit 4f961ed
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/gdal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,14 @@ OGRSpatialReference *OGRSrs_from_crs(Rcpp::List crs) {
dest = handle_axis_order(dest);
if (Rcpp::CharacterVector::is_na(wkt2[0])) // then use proj4string
handle_error(dest->importFromProj4((const char *) (p4s[0])));
else
handle_error(dest->importFromWkt((const char *) (wkt2[0])));
else {
char *cp = wkt2[0];
#if GDAL_VERSION_MAJOR <= 2 && GDAL_VERSION_MINOR <= 2
handle_error(dest->importFromWkt(&cp));
#else
handle_error(dest->importFromWkt((const char *) cp));
#endif
}
}
return dest;
}
Expand Down

0 comments on commit 4f961ed

Please sign in to comment.