On mercredi 24 juin 2020 17:14:50 CEST Raymond Nijssen wrote:
> 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@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?

No, this isn't possible. As documented, Condition capabilities are limited to 
filtering on an 
attribute of the same element whose value you want to retrieve.

You would probably have more capabilities by using the GMLAS driver, and 
filtering on its 
output.

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to