[gdal-dev] How to hide the GML in WFS

Jeremy Palmer JPalmer at linz.govt.nz
Mon Jun 1 19:30:38 PDT 2015


How do you hide the gml_id field from a WFS service? I think I'm setting the correct configuration options, but it doesn't seem to work:

ogrinfo --config GML_EXPOSE_GML_ID NO --config GML_EXPOSE_FID NO -al -so WFS:"https://data.linz.govt.nz/services;key=59f2aaa148bd4818994fa0d3ca36f7e1/wfs/layer-328?service=WFS&request=GetCapabilities" -nomd

ERROR 1: Server is read-only WFS; no WFS-T feature advertized
Had to open data source read-only.
INFO: Open of `WFS:https://data.linz.govt.nz/services;key=3b7124f23806431c8371f139ec84c40e/wfs/layer-328?service=WFS&request=GetCapabilities'
      using driver `WFS' successful.

Layer name: data.linz.govt.nz:layer-328
Geometry: Curve Polygon
Feature Count: 5323
Extent: (1090143.356755, 4767706.953525) - (2089165.570574, 6191066.947320)
Layer SRS WKT:
PROJCS["NZGD2000 / New Zealand Transverse Mercator 2000",
    GEOGCS["NZGD2000",
        DATUM["New_Zealand_Geodetic_Datum_2000",
            SPHEROID["GRS 1980",6378137,298.257222101,
                AUTHORITY["EPSG","7019"]],
            TOWGS84[0,0,0,0,0,0,0],
            AUTHORITY["EPSG","6167"]],
        PRIMEM["Greenwich",0,
            AUTHORITY["EPSG","8901"]],
        UNIT["degree",0.0174532925199433,
            AUTHORITY["EPSG","9122"]],
        AUTHORITY["EPSG","4167"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",173],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",1600000],
    PARAMETER["false_northing",10000000],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AUTHORITY["EPSG","2193"]]
Geometry Column = GEOMETRY
gml_id: String (0.0) NOT NULL
t50_fid: Integer64 (0.0)


Interestingly if I use the new GDAL 2.0 open options (ie. ogrinfo -oo GML_EXPOSE_GML_ID=NO -oo GML_EXPOSE_FID=NO). I get:

Warning 6: driver WFS does not support open option GML_EXPOSE_GML_ID
Warning 6: driver WFS does not support open option GML_EXPOSE_FID

I'm using GDAL 2.0 beta 2.

Thanks
Jeremy

This message contains information, which may be in confidence and may be subject to legal privilege. If you are not the intended recipient, you must not peruse, use, disseminate, distribute or copy this message. If you have received this message in error, please notify us immediately (Phone 0800 665 463 or info at linz.govt.nz) and destroy the original message. LINZ accepts no responsibility for changes to this email, or for any attachments, after its transmission from LINZ. Thank You.


More information about the gdal-dev mailing list