Brent Fraser wrote:
Hi All,

In the case of accessing data in a relational database, does OGR have the ability to pass a spatial extent to the database to use as a filter on the geometry before sending the rows?

Brent,

Yes.  The OGRLayer has a SetSpatialFilter() method for this.  Some drivers
evaluate the spatial filter in OGR after reading all records, but smart
drivers are able to use the spatial filter for efficient querying.  So, the
spatially enabled databases work it into the query.

The -spat switch for ogrinfo is translated into a SetSpatialFilter() call
for instance.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, [email protected]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to