Selon Martin Landa <[email protected]>: > Hi, > > 2014-03-18 16:35 GMT+01:00 Even Rouault <[email protected]>: > > some categories of application schemas easier. See the "Registry for GML > > application schemas" paragraph of http://gdal.org/ogr/drv_gml.html. Perhaps > your > > use case could fit into that. > > right, after digging into the code I discovered that `featureType` > from `gml_registry.xml` is checked only in header (first 2048 bytes) > [1]. This check fails in my case because features are not included in > szHeader buffer. Could be that I overlooked something...
Ah, well all of this is heuristics, so you could likely increase the buffer size if it remains at reasonable size. Another idea, if the patterns to recognize are much further in the file, since at that point we know that it is GML, would be to separate the recognition of whether it is GML or not (that has succeeded since you reached that point) from the recognition of what stuff there is in the GML, in which case you could afford to read more. But namespaces declaration are usually rather at the beginning of the file, so if 2048 doesn't work, perhaps 4096 would do. > > Martin > > [1] > http://trac.osgeo.org/gdal/browser/trunk/gdal/ogr/ogrsf_frmts/gml/ogrgmldatasource.cpp#L771 > _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
