-
👋 @eblondel we're also getting new failures in tests that are related to Is this a bug or new expected behavior? In the latter case, what would you recommend we use instead? wfs <- suppressWarnings(
ows4R::WFSClient$new(
"https://ows.emodnet-seabedhabitats.eu/geoserver/emodnet_open_maplibrary/wfs",
serviceVersion = "2.0.0",
headers = c("User-Agent" = "emodnet.wfs"),
logger = NULL
)
)
#> Loading ISO 19139 XML schemas...
#> Loading ISO 19115 codelists...
capabilities <- wfs$getCapabilities()
layer_names <- purrr::map_chr(capabilities$getFeatureTypes(), ~ .x$getName())
types <- capabilities$getFeatureTypes()
type <- types[layer_names == "emodnet_open_maplibrary:dk003069"] |> unlist()
type[[1]]$getGeometryType()
#> NULL
type[[1]]$getBoundingBox()
#> min max
#> x 9.575308 10.24418
#> y 54.773777 55.12132
type[[1]]$hasGeometry()
#> [1] FALSE
layer <- wfs$getFeatures("emodnet_open_maplibrary:dk003069")
layer
#> Simple feature collection with 82 features and 8 fields
#> Geometry type: MULTISURFACE
#> Dimension: XY
#> Bounding box: xmin: 1065918 ymin: 7318084 xmax: 1140377 ymax: 7385447
#> Projected CRS: WGS 84 / Pseudo-Mercator
#> First 10 features:
#> gml_id gid gui polygon annexi subtype confidence
#> 1 dk003069.39844 39844 DK003069 61 1170 Geogenic origin High
#> 2 dk003069.39855 39855 DK003069 72 1110 <NA> High
#> 3 dk003069.39860 39860 DK003069 77 1110 <NA> High
#> 4 dk003069.39861 39861 DK003069 78 1110 <NA> High
#> 5 dk003069.39785 39785 DK003069 2 1170 Geogenic origin High
#> 6 dk003069.39814 39814 DK003069 31 1170 Geogenic origin High
#> 7 dk003069.39791 39791 DK003069 8 1170 Geogenic origin High
#> 8 dk003069.39836 39836 DK003069 53 1170 Geogenic origin High
#> 9 dk003069.39829 39829 DK003069 46 1170 Geogenic origin High
#> 10 dk003069.39850 39850 DK003069 67 1110 <NA> High
#> val_comm geom
#> 1 <NA> MULTISURFACE (POLYGON ((111...
#> 2 <NA> MULTISURFACE (POLYGON ((108...
#> 3 <NA> MULTISURFACE (POLYGON ((111...
#> 4 <NA> MULTISURFACE (POLYGON ((108...
#> 5 <NA> MULTISURFACE (POLYGON ((111...
#> 6 <NA> MULTISURFACE (POLYGON ((111...
#> 7 <NA> MULTISURFACE (POLYGON ((109...
#> 8 <NA> MULTISURFACE (POLYGON ((108...
#> 9 <NA> MULTISURFACE (POLYGON ((108...
#> 10 <NA> MULTISURFACE (POLYGON ((111... Created on 2025-01-24 with reprex v2.1.1 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
@maelle You are interrogating the capabilities fo the WFS and list the feature types (modeled ad For bounding box you get something, because that's a property of the featureType that is available through WFS capabilities document. It's not the case of the full list of feature type elements (~ column definitions). |
Beta Was this translation helpful? Give feedback.
-
Thank you! I'm just surprised it used to work. |
Beta Was this translation helpful? Give feedback.
@maelle You are interrogating the capabilities fo the WFS and list the feature types (modeled ad
WFSFeatureType
), but when you list them from the capabilities, you didn't get their full description so for a given feature type, you first need to fetch its description (performing aDescribeFeatureType
request behind) withtype[[1]]$getDescription()
. After what you will seetype[[1]]$getGeometryType()
returns a geometry type.For bounding box you get something, because that's a property of the featureType that is available through WFS capabilities document. It's not the case of the full list of feature type elements (~ column definitions).