[gdal-dev] RFC 54 and RFC54
Even Rouault
even.rouault at spatialys.com
Thu Mar 26 04:32:31 PDT 2015
Nicolas,
> Hi list,
>
> As I was reading these RFC I was thinking about an old idea to
> improve the consistency between the different drivers. Instead of having a
> specific test suite for each drivers, it'll be more interesting to have a
> test suite in each driver relying on a generic test suite common to all
> driver. In this way, we don't have to write a complete test suite when
> implementing new behaviour in a driver or a new driver Another advantage
> is that we can ensure that drivers behave the same way.
The test_ogrsf utility in apps/ (must be compiled explictely by make
test_ogrsf or nmake /f makefile.vc test_ogrsf.exe) implements a generic test
suite, and most driver tests call it from one of their steps. It is however
hard to test everything from that generic tests since for good or wrong or
historical reasons, driver specific behaviour tends to interfere...
Some extra metadata should be available so that test_ogrsf knows what is
valid/invalid. For example some drivers will restrict CreateLayer() to some
geometry types and/or oblige a not-null SRS to be passed, etc...
>
> Concerning RFC55, does it means that driver relying on RDBMS should
> implement SetFeature as an update ?
Not necessarily, although it is highly recommended that they use UPDATE.
Currently most RDBMS do that, although at least the MySQL and OCI drivers
implement SetFeature() as DeleteFeature() + CreateFeature(). If the
DeleteFeature() steps returns OGRERR_NON_EXISTING_FEATURE, then SetFeature()
must return this value.
Even
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the gdal-dev
mailing list