From deabaa3ad06ee86001c7ec25d70ee84a26d54017 Mon Sep 17 00:00:00 2001 From: eblondel Date: Mon, 13 May 2024 15:56:21 +0200 Subject: [PATCH] fix #385 --- inst/actions/geometa_create_iso_19115.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inst/actions/geometa_create_iso_19115.R b/inst/actions/geometa_create_iso_19115.R index a62d2235..d39207d5 100644 --- a/inst/actions/geometa_create_iso_19115.R +++ b/inst/actions/geometa_create_iso_19115.R @@ -438,8 +438,9 @@ function(action, entity, config){ #bounding polygons from data (if any features & 'addfeatures' option is enabled) if(!is.null(features) && addfeatures){ bp <- ISOBoundingPolygon$new() + geom_field = colnames(features)[sapply(colnames(features), function(x){is(features[[x]],"sfc")})][1] for(i in 1:nrow(features)){ - geom <- GMLAbstractGeometry$fromSimpleFeatureGeometry(features[i,]$geometry[[1]]) + geom <- GMLAbstractGeometry$fromSimpleFeatureGeometry(features[i,][geom_field][[1]]) geom$attrs["gml:id"] <- paste0("fid.",as.character(features[i,][featureid])[1]) bp$polygon <- c(bp$polygon, geom) }