From 0e239f51821964d63e48383ada377ada8c95d14c Mon Sep 17 00:00:00 2001 From: Anthony North Date: Mon, 18 Dec 2023 06:19:01 +0000 Subject: [PATCH] patch projjson for crs objects created with legacy gdal --- R/pkg-sf.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/pkg-sf.R b/R/pkg-sf.R index 5c3bb3a6..3a7c04b0 100644 --- a/R/pkg-sf.R +++ b/R/pkg-sf.R @@ -138,7 +138,7 @@ wk_crs_proj_definition.crs <- function(crs, proj_version = NULL, verbose = FALSE #' @export wk_crs_projjson.crs <- function(crs) { json <- crs$ProjJson - if (is.null(json)) { + if (is.null(json) || is.na(json[1])) { # i.e., GDAL is not >= 3.1.0 NextMethod() } else {