[Gdal-dev] WKB

Bart van den Eijnden BEN at Syncera-ITSolutions.NL
Mon Nov 21 08:24:28 EST 2005


Hi list,

I have done a bit more analysis but have been unable to solve this unfortunately.

1) creating a view with all the columns does not make a difference, still no geometry is read (only XMIN, XMAX etc.)
2) properly filling the SRS table and column does not make any difference.

I have attached an example BLOB field, maybe somebody could judge from this what is going wrong.

I tried with CPL_DEBUG ON but could not get any useful messages out of ogrinfo. Btw my data is (multi) polygon data.

C:\Programs\FWTools0.9.9>ogrinfo ODBC:synfonie/synfonie at tatukgistest
ODBC: EstablishSession(tatukgistest,synfonie,synfonie)
ODBC: SQLConnect(tatukgistest)
ODBC: GetColumn() - m_nColCount=500
OGR: OGROpen(ODBC:synfonie/synfonie at tatukgistest) succeeded (00825D00).
INFO: Open of `ODBC:synfonie/synfonie at tatukgistest'
using driver `ODBC' successful.
1: BIS_LOC_FEA
ODBC: SQLDisconnect()

C:\Programs\FWTools0.9.9>ogrinfo ODBC:synfonie/synfonie at tatukgistest BIS_LOC_FEA
 -summary
ODBC: EstablishSession(tatukgistest,synfonie,synfonie)
ODBC: SQLConnect(tatukgistest)
ODBC: GetColumn() - m_nColCount=500
OGR: OGROpen(ODBC:synfonie/synfonie at tatukgistest) succeeded (008274E8).
INFO: Open of `ODBC:synfonie/synfonie at tatukgistest'
using driver `ODBC' successful.

Layer name: BIS_LOC_FEA
Geometry: Unknown (any)
Feature Count: 3444
Layer SRS WKT:
(unknown)
LOC_CODE: String (11.0)
XCOORD: Real (9.0)
YCOORD: Real (9.0)
TAB_LABEL: String (5.0)
ODBC: 6888 features read on layer 'BIS_LOC_FEA'.
ODBC: SQLDisconnect()

Thanks in advance.

Best regards,
Bart

Bart van den Eijnden
Syncera IT Solutions
Postbus 270
2600 AG  DELFT

tel.nr.: 015-7512436
email: BEN at Syncera-ITSolutions.nl

>>> "Bart van den Eijnden" <BEN at syncera-itsolutions.nl> 11/21/2005 11:21 AM >>>
Okay, I am one step further, it seemed to be caused by the wrong case in the F_TABLE_NAME and G_TABLE_NAME fields.

But now ogrinfo does not report any geometries, it just reports the attributes from the  F_TABLE_NAME table.Why is this?

C:\Programs\FWTools0.9.9>ogrinfo ODBC:synfonie/synfonie at tatukgistest BIS_LOC_FEA  -summary
INFO: Open of `ODBC:synfonie/synfonie at tatukgistest'
using driver `ODBC' successful.

Layer name: BIS_LOC_FEA
Geometry: Unknown (any)
Feature Count: 3444
Layer SRS WKT:
(unknown)
LOC_CODE: String (11.0)
XCOORD: Real (9.0)
YCOORD: Real (9.0)
TAB_LABEL: String (5.0)


OGRFeature(BIS_LOC_FEA):508
  LOC_CODE (String) = AA060700163
  XCOORD (Real) =     78898
  YCOORD (Real) =    444712
  TAB_LABEL (String) = (null)

OGRFeature(BIS_LOC_FEA):509
  LOC_CODE (String) = AA060700165
  XCOORD (Real) =     78720
  YCOORD (Real) =    444737
  TAB_LABEL (String) = (null)

Best regards,
Bart

Bart van den Eijnden
Syncera IT Solutions
Postbus 270
2600 AG  DELFT

tel.nr.: 015-7512436
email: BEN at Syncera-ITSolutions.nl 

>>> "Bart van den Eijnden" <BEN at syncera-itsolutions.nl> 11/21/2005 10:43 AM >>>
Hi list,

I am trying to connect OGR through ODBC to a WKB database. The WKB database was created using TatukGIS (www.tatukgis.com).

I am getting the following error back from OGR:

C:\Programs\FWTools0.9.9>ogrinfo ODBC:synfonie/synfonie at tatukgistest
ERROR 1: No column definitions found for table 'bis_loc_FEA', layer not usable.
INFO: Open of `ODBC:synfonie/synfonie at tatukgistest'
using driver `ODBC' successful.

This is the record in the GEOMETRY_COLUMNS table (in XML format):

<main>
  <DATA_RECORD>
    <F_TABLE_NAME>bis_loc_FEA</F_TABLE_NAME>
    <F_GEOMETRY_COLUMN>GID</F_GEOMETRY_COLUMN>
    <G_TABLE_NAME>bis_loc</G_TABLE_NAME>
    <STORAGE_TYPE>1</STORAGE_TYPE>
    <GEOMETRY_TYPE>11</GEOMETRY_TYPE>
    <COORD_DIMENSION>2</COORD_DIMENSION>
    <MAX_PPR>0</MAX_PPR>
    <SRID>1</SRID>
  </DATA_RECORD>
</main>

The tables are defined as:

CREATE TABLE BIS_LOC
(
  GID           NUMBER(9)                       NOT NULL,
  XMIN          FLOAT(126),
  YMIN          FLOAT(126),
  XMAX          FLOAT(126),
  YMAX          FLOAT(126),
  WKB_GEOMETRY  BLOB
)

CREATE TABLE BIS_LOC_FEA
(
  GID        NUMBER(9)                          NOT NULL,
  LOC_CODE   VARCHAR2(11 BYTE),
  XCOORD     NUMBER(9),
  YCOORD     NUMBER(9),
  TAB_LABEL  VARCHAR2(5 BYTE)
)

What could be the problem? Thanks in advance. It seems TatukGIS does not write SRS info, but that does not seem to be the cause of the above error.

Best regards,
Bart

Bart van den Eijnden
Syncera IT Solutions
Postbus 270
2600 AG  DELFT

tel.nr.: 015-7512436
email: BEN at Syncera-ITSolutions.nl 


_______________________________________________
Gdal-dev mailing list
Gdal-dev at lists.maptools.org 
http://lists.maptools.org/mailman/listinfo/gdal-dev 


_______________________________________________
Gdal-dev mailing list
Gdal-dev at lists.maptools.org 
http://lists.maptools.org/mailman/listinfo/gdal-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: blob
Type: application/octet-stream
Size: 613 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/gdal-dev/attachments/20051121/b712b1e5/blob.obj


More information about the Gdal-dev mailing list