[Gdal-dev] OGDI question
Chapman, Martin
MChapman at sanz.com
Tue Jun 22 16:50:08 EDT 2004
Frank,
That worked great! Thanks a ton for the help.
Martin
-----Original Message-----
From: Frank Warmerdam [mailto:warmerdam at pobox.com]
Sent: Tuesday, June 22, 2004 2:40 PM
To: Chapman, Martin
Cc: gdal-dev at remotesensing.org
Subject: Re: [Gdal-dev] OGDI question
Chapman, Martin wrote:
> All,
>
> I compiled GDAL with OGDI support and it works great, but I can't
> figure
> out how to query the map layer I want. Right now I am pulling
whatever
> the default layer is when I open the data store, and showing that
layer
> in my map. How do I use ExecuteSQL() with OGDI? Here's my connection
> string...
>
> gltp:/vrf/data/ew/Vector/NGA_VMAP/v0sas/vmaplv0/sasaus
>
> What I want to do is query a layer like political boundaries for a
> given
> AOI using the ExecuteSQL() method of the OGRDataSet object. Does
anyone
> know how to do this?
Martin,
First, I don't think the spatial queries get passed down into OGDI when
you use ExecuteSQL(). All the features for the given layer will be read
and then filtered out within OGR. This can be a bit of a performance
bottleneck for VMAP data. :-)
I find I can use the following command to query VMAP data for political
boundary lines:
ogrinfo -ro $NOAMER -sql 'select * from "polbndl at bnd(*)_line" where
use=26'
The $NOAMER expands to gltp:/vrf/usr4/mpp1/v0noa/vmaplv0/noamer. So the
key item is to ensure you enclose the "table" name in double quotes in
your SQL statement since the OGDI table names are odd composites.
I hope this helps.
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