From 1113ad58b789b28a52511d8cf8eada673cd7900b Mon Sep 17 00:00:00 2001 From: Michael Sumner Date: Tue, 17 Sep 2019 17:58:05 +0000 Subject: [PATCH] 2nd attempt, release 0.3.0 - remove projstring conversion --- R/raster-info.R | 1 + cran-comments.md | 5 ++++- man/vapour_raster_info.Rd | 1 + src/rasterio.cpp | 14 +++++++------- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/R/raster-info.R b/R/raster-info.R index 68f2bb81..35c10b00 100644 --- a/R/raster-info.R +++ b/R/raster-info.R @@ -39,6 +39,7 @@ sds_boilerplate_checks <- function(x, sds = NULL) { #' \item{tilesXY}{dimensions x-y of internal tiling scheme} #' \item{projection}{text version of map projection parameter string} #' \item{bands}{number of bands in the dataset} +#' \item{proj4}{not implemented} #' } #' #' On access vapour functions will report on the existence of subdatasets while diff --git a/cran-comments.md b/cran-comments.md index b225368d..30cced52 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,11 +1,14 @@ Hello, -Submission of vapour 0.3.0: +(second try, first failed pre-checks) + +Submission of vapour 0.3.0: * deprecated configure R CMD config CPP removed * use of PROJ 6 deprecated API enable * size of installed directories is expected for GDAL +* removed problematic string conversion Thank you diff --git a/man/vapour_raster_info.Rd b/man/vapour_raster_info.Rd index 005104ea..070ed5de 100644 --- a/man/vapour_raster_info.Rd +++ b/man/vapour_raster_info.Rd @@ -30,6 +30,7 @@ The structural metadata are \item{tilesXY}{dimensions x-y of internal tiling scheme} \item{projection}{text version of map projection parameter string} \item{bands}{number of bands in the dataset} +\item{proj4}{not implemented} } On access vapour functions will report on the existence of subdatasets while diff --git a/src/rasterio.cpp b/src/rasterio.cpp index ead69381..f8c73da0 100644 --- a/src/rasterio.cpp +++ b/src/rasterio.cpp @@ -75,7 +75,7 @@ List raster_info_cpp (CharacterVector filename, LogicalVector min_max) const char *proj; proj = GDALGetProjectionRef(hDataset); //https://gis.stackexchange.com/questions/164279/how-do-i-create-ogrspatialreference-from-raster-files-georeference-c - char *proj_tmp = (char *) proj; + //char *proj_tmp = (char *) proj; out[4] = Rcpp::CharacterVector::create(proj); names[4] = "projection"; @@ -84,16 +84,16 @@ List raster_info_cpp (CharacterVector filename, LogicalVector min_max) out[5] = nBands; names[5] = "bands"; - char *stri; - OGRSpatialReference oSRS; - oSRS.importFromWkt(&proj_tmp); - oSRS.exportToProj4(&stri); - out[6] = Rcpp::CharacterVector::create(stri); + //char *stri; + //OGRSpatialReference oSRS; + //oSRS.importFromWkt(&proj_tmp); + //oSRS.exportToProj4(&stri); + out[6] = Rcpp::CharacterVector::create(""); //Rcpp::CharacterVector::create(stri); names[6] = "proj4"; out.attr("names") = names; - CPLFree(stri); + //CPLFree(stri); // close up GDALClose( hDataset ); return out;