[OGR-GML] GML driver doesn't recognize GML files with 0 features
|Reported by:||dmorissette||Owned by:||warmerdam|
Description (last modified by )
The OGR/GML driver doesn't recognize files that contain 0 features. Everything goes well until GMLReader::PrescanForSchema?() gets called, it returns false since it doesn't find any feature class.
I guess this makes sense for datasets in general, but when we use the GML driver in the context of a WFS, receiving 0 features is a valid case.
It would be nice if OGR accepted to open GML file, and present it as a file with a single layer with 0 features in it.
What is an OGR driver expected to do if a file is empty? If nothing can be done at the OGR level for this then I guess I'll have to preparse the GML file before .
I try to open it with OGR, which is a bit of a waste of resources.
Any ideas, suggestions?