Wendell,

> I'm having trouble parsing some GML via Python/ogr and would like some
> advice.
> 
> The GML has as the top level a FeatureCollection which has 3
> featureMembers.  However, each of those featureMembers contains a
> FeatureCollection within it containing any number of featureMembers.
> 
> While parsing, each of the featureMembers has a dict of elements, and
> the values of that featureMembers' keys is a list of the values of each
> of the "sub-featureMember"s attributes.  That's good so far, but I'm not
> able to retrieve the geometry for the sub-featureMembers.
> 
> How do I use Python ogr to parse a FeatureCollection within a
> FeatureCollection?  Does a ResetReading() somehow reset something so
> that the inner members get processed correctly?

This is a so called "complex features" model. The GML driver cannot handle that 
natively. If 
this GML file has its associated XML schemas, I'd suggest you use the GMLAS 
driver instead:
https://gdal.org/drivers/vector/gmlas.html

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