[Gdal-dev] Another Question about OGRDataSource::ExecuteSQL
Frank Warmerdam
warmerdam at pobox.com
Wed May 5 18:51:49 EDT 2004
jody at ifi.unizh.ch wrote:
> Hi
>
> I assume that the SQL statement passed to ExecuteSQL
> refers to the attributes of the features in the Datasource.
>
> If the DataSource contains only one layer,
> everything seems to be well-defined, because
> all features within a layer must have the same sorts of attributes.
>
> But what happens if the datasource contains more than one layer
> (which it can, corresponding to the explanation in ogr_arch.html)
> which have different attribute schemas?
>
> Or does an additional restriction apply to features in a
> "multilayered" Datasource?
Jody,
You specify the layer name as the table name in the OGR "pseudo-SQL".
For instance "SELECT eas_id, prop_value FROM polylayer" would return a
row/feature for each feature in the layer "polylayer", and include only
the eas_id and prop_val attributes.
Have you read the OGR SQL document?
http://www.remotesensing.org/gdal/ogr/ogr_sql.html
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the Gdal-dev
mailing list