[Gdal-dev] Re: [GDAL Tasks] Autotest of PostgreSQL provider

Mateusz Loskot mateusz at loskot.net
Fri Jun 30 08:58:22 EDT 2006


Hi Frank,

Here is small info regarding two extra tasks about ogr_pg.py.

Mateusz Loskot wrote:
> Two extra tasks:
> Check why two test cases fail:

> 
> mloskot:~/dev/gdal/_cvs/autotest/ogr$ ./ogr_pg.py
>   TEST: ogr_pg_1 ... success
>   TEST: ogr_pg_2 ... success
>   TEST: ogr_pg_3 ... success
>   TEST: ogr_pg_4 ... success
>   TEST: ogr_pg_5 ... success
>   TEST: ogr_pg_6 ... success
>   TEST: ogr_pg_7 ... fail
>     field eas_id feature 0 did not match expected value 158, got 168.

My version of autotest database did not include PostGIS.
After I imported lwpostgis.sql file and plpgsql support,
the test case works - SetSpatialFilter does the job well.

>   TEST: ogr_pg_8 ... success
>   TEST: ogr_pg_9 ... success
>   TEST: ogr_pg_10 ... success
>   TEST: ogr_pg_11 ... success
>   TEST: ogr_pg_12 ... fail
>     expected geometry but got NULL.

Again, lack of PostGIS.
When no PostGIS is available GeometryToHex returns incompatible output.
After I changed it to GeometryToBYTA, geometries imported to non-PostGIS
database of PostgreSQL have valid values.
But, because PG test requires PostGIS, I reverted to GeometryToHex which
works well when PostGIS is available.
I added CPLDebug message to inform user that no PostGIS is available.


All ogr_pg.py tests succeed.

Cheers
-- 
Mateusz Loskot
http://mateusz.loskot.net



More information about the Gdal-dev mailing list