[gdal-dev] GML element/attribute discovery inconsistency

Björn Harrtell bjorn.harrtell at gmail.com
Tue Nov 27 05:16:19 PST 2018


Thanks for the clarifications Even,

I've tried GMLAS but been unsuccessful in getting it to produce useful
output.

I'm actually quite happy with the standard GML driver, except that it
ignores other attributes when element has xsi:nil. Would it be a welcome
change to remove that behavior, treating other attributes as normal, and if
so does that change need to be opt in?

Björn

Den tis 27 nov. 2018 kl 12:46 skrev Even Rouault <even.rouault at spatialys.com
>:

> > Are my observations correct?
>
> Björn,
>
> It would be difficult to deny the results of tests :-)
>
> The GML driver has a lot of particular handling tailored for particular
> datasets, which makes understanding its behaviour non-obvious
>
> From the code (which confirms your observations),
> - if an element has a xsi:nil attribute, then its other attributes are
> ignored
> and the content of the element is set to NULL (what you observe with a1)
> - there is a particular case for the uom attribute, which is always
> reported
> even if GML_ATTRIBUTES_TO_OGR_FIELDS is not set (the _uom case was added
> before the generalization of GML_ATTRIBUTES_TO_OGR_FIELDS)
> - empty elements (if empty for all features) are not reported as OGR fields
>
> You may want to try the GMLAS driver for something that involves less
> guessing. The GML driver can work without any schema, and if the schema is
> present only supports simple constructs in it. Contrary to the GMLAS
> driver,
> which is (almost) completely schema driven to create the OGR layer and
> attribute structure:
> https://www.gdal.org/drv_gmlas.html
>
> Even
>
> --
> Spatialys - Geospatial professional services
> http://www.spatialys.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20181127/78a82ad3/attachment.html>


More information about the gdal-dev mailing list