Skip to content

Commit

Permalink
consolidated patch for #125
Browse files Browse the repository at this point in the history
  • Loading branch information
eblondel committed Feb 28, 2024
1 parent b05ad74 commit 553c524
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions R/WFSFeatureTypeElement.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@ WFSFeatureTypeElement <- R6Class("WFSFeatureTypeElement",
if(is.null(type)){
stop(sprintf("Unknown data type for type '%s' while parsing FeatureType description!", type))
}

if(attr(regexpr("gml", type), "match.length") > 0){
elementType <- unlist(strsplit(unlist(strsplit(type, paste0("gml",":")))[2], "PropertyType"))[1]
gml_xmlns = namespaces[regexpr("gml", namespaces$uri)>0,] #may include app-schema GML secondary namespace
if(any(startsWith(type, gml_xmlns$id))){
gml_xmlns = gml_xmlns[startsWith(type, gml_xmlns$id),]
elementType <- unlist(strsplit(unlist(strsplit(type, paste0(gml_xmlns$id,":")))[2], "PropertyType"))[1]
geometry <- TRUE
}else{
baseType <- tolower(type)
Expand Down

0 comments on commit 553c524

Please sign in to comment.