Skip to content

Commit

Permalink
fix #385
Browse files Browse the repository at this point in the history
  • Loading branch information
eblondel committed May 13, 2024
1 parent d277c1d commit deabaa3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion inst/actions/geometa_create_iso_19115.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit deabaa3

Please sign in to comment.