WFS3 - OGC WFS 3.0 service (experimental)

(GDAL/OGR >= 2.3.0)

NOTE: THIS IS BASED ON A DRAFT VERSION OF THE WFS 3.0 SPECIFICATION

This driver can connect to a OGC WFS 3.0 service. It assumes that the service supports OpenAPI 3.0/JSON/GeoJSON encoding for respectively API description, feature collection metadata and feature collection data.

Dataset name syntax

The syntax to open a WFS datasource is : WFS3:http://path/to/WFS/endpoint

Layer schema

OGR needs a fixed schema per layer, but WFS 3.0 Core doesn't impose fixed schema. So the driver will retrieve the first page of features (10 features) and establish a schema from this.

Filtering

The driver will forward any spatial filter set with SetSpatialFilter() to the server. In WFS 3.0 Core, only a subset of attributes allowed by the server can be queried for equalities, potentially combined with a AND logical operator. More complex requests will be partly or completely evaluated on client-side.

Rectangular spatial filtering is forward to the server as well.

Open options

The following options are available:

Examples

  • Listing the types of a WFS server :
    $ ogrinfo WFS3:https://www.ldproxy.nrw.de/rest/services/kataster
    
    INFO: Open of `WFS3:http://wfs3hackathon.ldproxy.net/rest/services/de_gn'
          using driver `WFS3' successful.
    1: flurstueck (Multi Polygon)
    2: gebaeudebauwerk (Multi Polygon)
    3: verwaltungseinheit (Multi Polygon)
    e
    

  • Listing the summary information of a WFS layer :
    $ ogrinfo -al -so WFS3:https://www.ldproxy.nrw.de/rest/services/kataster flurstueck
    
    Layer name: flurstueck
    Metadata:
      TITLE=Flurstück
    Geometry: Multi Polygon
    Feature Count: 9308456
    Extent: (5.612726, 50.237351) - (9.589634, 52.528630)
    Layer SRS WKT:
    GEOGCS["WGS 84",
        DATUM["WGS_1984",
            SPHEROID["WGS 84",6378137,298.257223563,
                AUTHORITY["EPSG","7030"]],
            AUTHORITY["EPSG","6326"]],
        PRIMEM["Greenwich",0,
            AUTHORITY["EPSG","8901"]],
        UNIT["degree",0.0174532925199433,
            AUTHORITY["EPSG","9122"]],
        AUTHORITY["EPSG","4326"]]
    id: String (0.0)
    aktualit: Date (0.0)
    flaeche: Real (0.0)
    flstkennz: String (0.0)
    land: String (0.0)
    gemarkung: String (0.0)
    flur: String (0.0)
    flurstnr: String (0.0)
    gmdschl: String (0.0)
    regbezirk: String (0.0)
    kreis: String (0.0)
    gemeinde: String (0.0)
    lagebeztxt: String (0.0)
    tntxt: String (0.0)
    

  • Filtering on a property
    
    $ ogrinfo WFS3:https://www.ldproxy.nrw.de/rest/services/kataster flurstueck -al -q -where "gemarkung = 'Wünnenberg'"
    Layer name: flurstueck
    Metadata:
      TITLE=Flurstück
    OGRFeature(flurstueck):1
      id (String) = DENW19AL0000geMFFL
      aktualit (Date) = 2017/04/26
      flaeche (Real) = 1739
      flstkennz (String) = 05297001600193______
      land (String) = Nordrhein-Westfalen
      gemarkung (String) = Wünnenberg
      flur (String) = 016
      flurstnr (String) = 193
      gmdschl (String) = 05774040
      regbezirk (String) = Detmold
      kreis (String) = Paderborn
      gemeinde (String) = Bad Wünnenberg
      lagebeztxt (String) = Bleiwäscher Straße
      tntxt (String) = Platz / Parkplatz;1739
      MULTIPOLYGON (((8.71191 51.491084,8.7123 51.491067,8.712385 51.491645,8.712014 51.491666,8.711993 51.491603,8.71196 51.491396,8.711953 51.491352,8.71191 51.491084)))
    
    [...]
    

  • Spatial filtering
    $ ogrinfo WFS3:https://www.ldproxy.nrw.de/rest/services/kataster flurstueck -al -q -spat 8.7 51.4 8.8 51.5
    
    Layer name: flurstueck
    Metadata:
      TITLE=Flurstück
    OGRFeature(flurstueck):1
      id (String) = DENW19AL0000ht7LFL
      aktualit (Date) = 2013/02/19
      flaeche (Real) = 18
      flstkennz (String) = 05292602900206______
      land (String) = Nordrhein-Westfalen
      gemarkung (String) = Fürstenberg
      flur (String) = 029
      flurstnr (String) = 206
      gmdschl (String) = 05774040
      regbezirk (String) = Detmold
      kreis (String) = Paderborn
      gemeinde (String) = Bad Wünnenberg
      lagebeztxt (String) = Karpke
      tntxt (String) = Fließgewässer / Bach;18
      MULTIPOLYGON (((8.768521 51.494915,8.768535 51.494882,8.768569 51.494908,8.768563 51.494925,8.768521 51.494915)))
    [...]
    

    See Also