2

I am accessing some WFS layers via QGIS. I want to download those same layers via ogr. This doesn't work and I can't find why.

The WFS URL is https://www.mercator.vlaanderen.be/raadpleegdienstenmercatorpubliek/wfs The layer I want to acess from that WFS is "anb_insp:PS.ProtectedSite-birds"

In the windows command prompt, I put: ogrinfo WFS:"https://www.mercator.vlaanderen.be/raadpleegdienstenmercatorpubliek/wfs&version=2.0.0&request=GetFeature&typeName=anb_insp:PS.ProtectedSite-birds&srsName=EPSG:31370"

I get "unable to open datasource ... with the following drivers.

I cannot understand why I can access this layer via QGIS, but not through ogr? Am I missing somehting?

PS 1 I am able to open WFS layers from other sources PS 2 My GDAL version is 2.2.4

3

It seems to work with this syntax

ogrinfo wfs:https://www.mercator.vlaanderen.be/raadpleegdienstenmercatorpubliek/wfs anb_insp:PS.ProtectedSite-birds

INFO: Open of `wfs:https://www.mercator.vlaanderen.be/raadpleegdienstenmercatorpubliek/wfs'
      using driver `WFS' successful.
Metadata:
  ABSTRACT=Publieke Download Service van Mercator
  PROVIDER_NAME=Vlaamse Overheid - Beleidsdomein Omgeving - MercatorNet
  TITLE=Mercator Publieke Download Service

Layer name: anb_insp:PS.ProtectedSite-birds
Metadata:
  ABSTRACT=INSPIRE - beschermde gebieden - Vogelrichtlijngebieden
  KEYWORD_1=BESCHERMINGSZONES
  KEYWORD_10=SBZ-V_22072005
  KEYWORD_11=AGENTSCHAP VOOR NATUUR EN BOS
  KEYWORD_12=NATURA2000
  KEYWORD_13=NATURA 2000
  KEYWORD_14=RAADPLEEGDIENST
  KEYWORD_15=WMS
  KEYWORD_16=WEB MAP SERVICE (WMS)
  KEYWORD_17=Toegevoegd GDI-Vl
  KEYWORD_18=Vlaamse Open data
  KEYWORD_19=Metadata INSPIRE-conform
  KEYWORD_2=VOGELRICHTLIJNGEBIEDEN
  KEYWORD_20=Metadata GDI-Vl-conform
  KEYWORD_21=Lijst M&R INSPIRE
  KEYWORD_22=Beschermde gebieden
  KEYWORD_3=VOGELRICHTLIJNGEBIED
  KEYWORD_4=VOGELSOORTEN
  KEYWORD_5=HABITATRICHTLIJN
  KEYWORD_6=VOGELRICHTLIJN
  KEYWORD_7=SBZ-V
  KEYWORD_8=LEEFGEBIEDEN
  KEYWORD_9=EUROPESE RICHTLIJN
  TITLE=Protected Sites - Birds
Geometry: Unknown (any)
Feature Count: 24
Extent: (3799756.790600, 3083976.313000) - (4029841.660200, 3161326.304800)
Layer SRS WKT:
PROJCRS["ETRS89 / LAEA Europe",
    BASEGEOGCRS["ETRS89",
        DATUM["European Terrestrial Reference System 1989",
            ELLIPSOID["GRS 1980",6378137,298.257222101,
                LENGTHUNIT["metre",1]]],
        PRIMEM["Greenwich",0,
            ANGLEUNIT["degree",0.0174532925199433]],
        ID["EPSG",4258]],
    CONVERSION["Europe Equal Area 2001",
        METHOD["Lambert Azimuthal Equal Area",
            ID["EPSG",9820]],
        PARAMETER["Latitude of natural origin",52,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8801]],
        PARAMETER["Longitude of natural origin",10,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8802]],
        PARAMETER["False easting",4321000,
            LENGTHUNIT["metre",1],
            ID["EPSG",8806]],
        PARAMETER["False northing",3210000,
            LENGTHUNIT["metre",1],
            ID["EPSG",8807]]],
    CS[Cartesian,2],
        AXIS["northing (Y)",north,
            ORDER[1],
            LENGTHUNIT["metre",1]],
        AXIS["easting (X)",east,
            ORDER[2],
            LENGTHUNIT["metre",1]],
    USAGE[
        SCOPE["unknown"],
        AREA["Europe - ETRS89"],
        BBOX[32.88,-16.1,84.17,40.18]],
    ID["EPSG",3035]]
Data axis to CRS axis mapping: 2,1
Geometry Column = geom
gml_id: String (0.0) NOT NULL
gml_identifier: String (0.0)
gml_description: String (0.0)
inspireid_identifier_localid: String (0.0)
OGRFeature(anb_insp:PS.ProtectedSite-birds):1
  gml_id (String) = PS.ProtectedSite-birds.id1
  gml_identifier (String) = http://id.natuurenbos.be/vglrlid1
  gml_description (String) = BE2301134
  inspireid_identifier_localid (String) = id1
  MULTIPOLYGON (((3874154.4746 3149660.5224,3874110.9065 3149773.1917,3874090.6666 3149800.1456,3874072.0696 3149819.0542,3874052.6525 3149840.5202,3874031.8793 3149873.3491,3874008.4706 3149917.7042,3873982.4284 3149957.8568,3873940.9356 3150049
2

You need to separate the "page" name from the parameters with a ? instead of a &

ogrinfo -al -so "https://www.mercator.vlaanderen.be/raadpleegdienstenmercatorpubliek/wfs?version=2.0.0&request=GetFeature&typeName=anb_insp:PS.ProtectedSite-birds&srsName=EPSG:31370"
ERROR 6: Update from remote service not supported
Had to open data source read-only.
INFO: Open of `https://www.mercator.vlaanderen.be/raadpleegdienstenmercatorpubliek/wfs?version=2.0.0&request=GetFeature&typeName=anb_insp:PS.ProtectedSite-birds&srsName=EPSG:31370'
      using driver `GML' successful.

Layer name: PS.ProtectedSite-birds
Geometry: Unknown (any)
Feature Count: 24
Extent: (22279.645100, 159110.542100) - (252613.701400, 239052.669900)
Layer SRS WKT:
(unknown)
Geometry Column = geom
gml_id: String (0.0) NOT NULL
gml_identifier: String (0.0)
gml_description: String (0.0)
inspireid_identifier_localid: String (0.0)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.