From 0381f3a9cfa402e9986fd46ee02e30161c23cc39 Mon Sep 17 00:00:00 2001 From: Andrea Gilardi Date: Mon, 16 Sep 2024 18:07:07 +0200 Subject: [PATCH] Update comment Update comment following the discussion at https://github.com/r-spatial/sf/issues/2439 --- src/gdal.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gdal.cpp b/src/gdal.cpp index 0410ba594..1653aca79 100644 --- a/src/gdal.cpp +++ b/src/gdal.cpp @@ -663,6 +663,10 @@ Rcpp::List CPL_transform(Rcpp::List sfc, Rcpp::List crs, Rcpp::List ret = sfc_from_ogr(g, true); // destroys g; // how to return the target CRS when only a transformation pipeline is provided? Not by: // ret.attr("crs") = create_crs(ct->GetTargetCS(), true); + // + // According to the discussion at https://github.com/r-spatial/sf/issues/2439, this is + // not a solvable issue in general. See the same link for a possible workaround and + // a more general solution that uses PROJ. ct->DestroyCT(ct); if (dest) dest->Release();