[gdal-dev] OGR/SQLite : SELECT GEOMETRY failes on layer copy

Anders Moe anders.moe at geocap.no
Fri Jun 4 04:08:32 EDT 2010

Hi everyone

I'm using OGR with the SQLite driver, calling

OGR::DataSource::ExecuteSQL ()

By examining the sqlite file I've discovered that the geometry column is
named , well, GEOMETRY.

So I do something like

SELECT name, GEOMETRY as G from world

which gives me a resulting layer with these two columns. But when copying
that layer using

OGRDataSource::CopyLayer  ( )

I'm getting

In GetNextRawFeature(): sqlite3_step() : not an error

I guess that the geometry BLOB column is not recognized as geometry during
the copy, maybe.

So : Does anyone know how to do these kinds of SQL operations that preserve
the geometry column in a way that can be used in subsequent operations, like
layer copying ?

 Also, the OGRAPI does not seem to support any notion of geometry column
name. Anyone know a way around this ?



Anders Moe

Technical Manager
w: +47 22 95 56 66
anders.moe at geocap.no
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20100604/3e657913/attachment.html

More information about the gdal-dev mailing list