[gdal-dev] WAsP map output for ogr

Vincent Mora vincent.mora at oslandia.com
Tue Mar 11 06:23:58 PDT 2014


On 11/03/2014 10:39, Even Rouault wrote:
> If you want to test the compliance of your driver (the read part) with the
> assumptions of the OGR API, you can go to the apps subdirectory of GDAL and
> "make test_ogrsf", and then "test_ogrsf a_wasp_file".
Thanks for the tip.

It helped me fix some issues, and raises one question: test_ogrsf now 
fails with 'ExecuteSQL() should have returned a non-NULL result', should 
I implement all the sql queries that are specified in 
http://www.gdal.org/ogr/ogr_sql.html for my driver to be OK ?

> I can see a few things that should be corrected :
> - reset iFeatureCount in ResetReading()
Done.
> - take attribute and spatial filter into account in GetNextFeature(). Actually
> you could rename your GetNextFeature() into GetNextRawFeature() and copy and
> paste the GetNextFeature() implementation of
> ogr/ogrsf_frmts/cartodb/ogrcartodblayer.cpp
Done.
> - OGRWAsPDriver::Open() : it should be much more restrictive and only return a
> non NULL pointer in case a WASP file is found (test typical extension if it
> exists, otherwise look at first bytes). Otherwise every file not handled by
> other drivers will be reported as a WASP datasource.
Done.
> - you probably want to have a flag at the layer level to indicate if it is
> opened in read-only or write-only mode, and use it in the various operations
> (CreateFeature(), GetNextFeature(), TestCapability())
Done.


More information about the gdal-dev mailing list