[Gdal-dev] OGR PGResultLayer definition reading error?

Oleg Semykin oss-dev at rambler.ru
Tue Nov 8 02:33:52 EST 2005


Hi, all!

When I use executeSQL() for fetching features from PostgreSQL, result 
layer have wrong feature definition
It can't determine a geometry column.

For example:
I am use:
 PostgreSQL 8.0
 POSTGIS="1.0.0" GEOS="2.1.1" PROJ="Rel. 4.4.9, 29 Oct 2004" USE_STATS 
DBPROC="0.3.0" RELPROC="0.3.0"

ogrinfo 'PG:dbname=db host=dbhost user=postgres' t_table_22 -so

returns:

INFO: Open of `PG:dbname=db host=dbhost user=postgres'
using driver `PostgreSQL' successful.

Layer name: t_table_22
Geometry: Multi Point
Feature Count: 13
Extent: (6421011.500000, 6621845.500000) - (6426622.000000, 6633781.000000)
Layer SRS WKT:
LOCAL_CS["Nonearth",
    UNIT["Meter",1.0]]
IDOBJ: Real (0.0)
order: Integer (0.0)
gid: Integer (0.0)
id_style: Integer (0.0)
id_type_object: Integer (0.0)

but:

ogrinfo -sql "select * from t_table_22" 'PG:dbname=db host=dbhost 
user=postgres' -so

returns:

INFO: Open of `PG:dbname=db host=dbhost user=postgres'
using driver `PostgreSQL' successful.

Layer name: sql_statement
Geometry: Unknown (any)
Feature Count: 13
Layer SRS WKT:
(unknown)
gid: Integer (0.0)
id_style: Integer (0.0)
id_type_object: Integer (0.0)
order: Integer (0.0)
IDOBJ: Real (0.0)

Geometry and SRS - unknown

Is it bug?




More information about the Gdal-dev mailing list