Opened 21 years ago

Last modified 10 years ago

#249 closed defect

[OGR-GML] GML driver doesn't recognize GML files with 0 features — at Initial Version

Reported by: Daniel Morissette Owned by: warmerdam
Priority: high Milestone: 1.11.0
Component: default Version: unspecified
Severity: normal Keywords: gml gfs
Cc: Mateusz Łoskot

Description

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?

Change History (0)

Note: See TracTickets for help on using tickets.