Skip to content

Commit

Permalink
tidy; #1146
Browse files Browse the repository at this point in the history
  • Loading branch information
edzer committed Nov 29, 2019
1 parent 8ca18be commit a5b8589
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/gdal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,20 +294,12 @@ Rcpp::List create_crs(OGRSpatialReference *ref) {
crs(2) = Rcpp::CharacterVector::create(NA_STRING);
} else {
const char *cp;
bool epsg_is_na = true;
if (ref->AutoIdentifyEPSG() == OGRERR_NONE &&
(cp = ref->GetAuthorityCode(NULL)) != NULL) {
(cp = ref->GetAuthorityCode(NULL)) != NULL)
crs(0) = atoi(cp);
epsg_is_na = false;
} else
else
crs(0) = NA_INTEGER;
crs(1) = p4s_from_spatial_reference(ref);
/*
if (epsg_is_na)
crs(2) = Rcpp::CharacterVector::create(NA_STRING);
else
crs(2) = CPL_wkt2_from_epsg(crs(0));
*/
crs(2) = wkt2_from_spatial_reference(ref);
}
Rcpp::CharacterVector nms(3);
Expand Down

0 comments on commit a5b8589

Please sign in to comment.