Trying to read WFS in R with st_read where feature count is reseted

73 Views Asked by At

I'm trying to read WFS data in R using st_read() from the sf package. The http request is valid, but st_read() returns a simple feature collection with all fields but 0 features. It also returns the following message 'Re-read with feature count reset from 26598 to 0'.

Here's is my code example in R:

url <- "https://www.ogd.stadt-zuerich.ch/wfs/geoportal/3D_Blockmodell_LoD1?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.1.0&TYPENAME=lod1_gebaeude_min_3d&RESULTTYPE=hits&BBOX=2681065.44918748084455729,1242274.55883355368860066,2684374.57787289563566446,1251789.53122574021108449,EPSG:2056"

res = sf::st_read(url)

It returns the following output message:

Reading layer `lod1_gebaeude_min_3d' from data source 
  `https://www.ogd.stadt-zuerich.ch/wfs/geoportal/3D_Blockmodell_LoD1?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.1.0&TYPENAME=lod1_gebaeude_min_3d&RESULTTYPE=hits&BBOX=2681065.44918748084455729,1242274.55883355368860066,2684374.57787289563566446,1251789.53122574021108449,EPSG:2056' 
  using driver `GML'
Re-reading with feature count reset from 26598 to 0
Simple feature collection with 0 features and 20 fields
Bounding box:  xmin: NA ymin: NA xmax: NA ymax: NA
CRS:           NA

What does the message 'Re-reading with feature count reset from 26598 to 0' mean and how can I read the complete data in R?

0

There are 0 best solutions below