What if a WFS server is returning GML that has complex schema, does GDAL know to open the response as GML application schema data automatically or with some open option? I ask because I can see “succeeds as GML” in
the debug log:
On mardi 7 mars 2017 09:57:26 CET Rahkonen Jukka (MML) wrote:
> What if a WFS server is returning GML that has complex schema, does GDAL
> know to open the response as GML application schema data automatically or
> with some open option? I ask because I can see "succeeds as GML" in the
> debug log:
The WFS driver only uses internally the classic GML driver that supports (mostly) simple schemas. When parsing a GetFeature response the GML driver analyzes the schemaLocation attribute of the top element and tries to download the schema pointed by it and analyze it (actually when it is triggered by the WFS driver which has already downloaded the schema, the WFS driver already creates the .xsd in-memory file, so the GML driver doesn't need to download it. Implementation detail...) But this analysis only succeeds if the schema is simple, so hee it fails hence the generating .gfs file message.
I've no thought deeply how the WFS driver could use the GMLAS driver, but that would be a fair amount of work. So currently your best option when the WFS server is serving complex features is to download the GetFeature response and use it explicitely with the GMLAS driver.