From fca42bd9eb40a34167ab39ff611433af91952458 Mon Sep 17 00:00:00 2001 From: Michael Sumner Date: Thu, 6 Jun 2024 04:10:17 +0000 Subject: [PATCH] cast --- inst/include/gdallibrary/gdallibrary.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/inst/include/gdallibrary/gdallibrary.h b/inst/include/gdallibrary/gdallibrary.h index 1c62095..8a3d8a1 100644 --- a/inst/include/gdallibrary/gdallibrary.h +++ b/inst/include/gdallibrary/gdallibrary.h @@ -658,7 +658,10 @@ inline List gdal_read_geometry(CharacterVector dsn, inline CharacterVector gdal_proj_to_wkt(CharacterVector proj_str) { OGRSpatialReference oSRS; char *pszWKT = nullptr; - oSRS.SetFromUserInput(proj_str[0]); + + //const char* crs_in[] = {CHAR(STRING_ELT(proj_str, 0))}; + + oSRS.SetFromUserInput(const char* proj_str[0]); // #if GDAL_VERSION_MAJOR >= 3 // const char *options[3] = { "MULTILINE=YES", "FORMAT=WKT2", NULL }; // OGRErr err = oSRS.exportToWkt(&pszWKT, options);