[gdal-dev] GFS with condition on the second last element
Raymond Nijssen
r.nijssen at terglobo.nl
Wed Jun 24 08:14:50 PDT 2020
Hi list,
I'm trying to read a complex gml file that includes values that need to
be selected on an xml attribute. This is possible to do with a condition
in the gfs file, but the example only covers having the attribute on the
last element in the elementPath:
https://gdal.org/drivers/vector/gml.html#using-conditions-on-xml-attributes
But mine is on the 2nd last element, like this:
```
<imaer:result>
<imaer:Result resultType="DEPOSITION" substance="NH3">
<imaer:value>0.01909</imaer:value>
</imaer:Result>
</imaer:result>
<imaer:result>
<imaer:Result resultType="DEPOSITION" substance="NOX">
<imaer:value>0.001341</imaer:value>
</imaer:Result>
</imaer:result>
```
So I'd like to do something like this in my gfs:
```
<PropertyDefn>
<Name>nh3</Name>
<ElementPath>result|Result|value</ElementPath>
<Condition>result|Result at substance='NH3'</Condition>
<Type>Real</Type>
</PropertyDefn>
```
to only catch the value where substance = NH3. I've been trying many
options but no success yet.
Is this even possible? And if so, how?
Thanks!
Raymond
More information about the gdal-dev
mailing list