<div dir="ltr"><div>Thanks for the clarifications Even,</div><div><br></div>I've tried GMLAS but been unsuccessful in getting it to produce useful output.<div><br></div><div>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?</div><div><br></div><div>Björn<br><br><div class="gmail_quote"><div dir="ltr">Den tis 27 nov. 2018 kl 12:46 skrev Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> Are my observations correct?<br>
<br>
Björn,<br>
<br>
It would be difficult to deny the results of tests :-)<br>
<br>
The GML driver has a lot of particular handling tailored for particular <br>
datasets, which makes understanding its behaviour non-obvious<br>
<br>
>From the code (which confirms your observations),<br>
- if an element has a xsi:nil attribute, then its other attributes are ignored <br>
and the content of the element is set to NULL (what you observe with a1)<br>
- there is a particular case for the uom attribute, which is always reported <br>
even if GML_ATTRIBUTES_TO_OGR_FIELDS is not set (the _uom case was added <br>
before the generalization of GML_ATTRIBUTES_TO_OGR_FIELDS)<br>
- empty elements (if empty for all features) are not reported as OGR fields<br>
<br>
You may want to try the GMLAS driver for something that involves less <br>
guessing. The GML driver can work without any schema, and if the schema is <br>
present only supports simple constructs in it. Contrary to the GMLAS driver, <br>
which is (almost) completely schema driven to create the OGR layer and <br>
attribute structure:<br>
<a href="https://www.gdal.org/drv_gmlas.html" rel="noreferrer" target="_blank">https://www.gdal.org/drv_gmlas.html</a><br>
<br>
Even<br>
<br>
-- <br>
Spatialys - Geospatial professional services<br>
<a href="http://www.spatialys.com" rel="noreferrer" target="_blank">http://www.spatialys.com</a><br>
</blockquote></div></div></div>