OGR and Filter

Frank Warmerdam warmerdam at POBOX.COM
Sat May 6 11:25:45 EDT 2006


Pascoe,Tim [Burlington] wrote:
> I currently use a simple virtual layer produced using OGR, to map points 
> in mapserver from a SQL-Server query. I seem to recall an e-mail I 
> received some time ago, which indicated that the latest version of OGR, 
> 1.3, provided for a filter parameter to be passed to limit the results 
> returned. Unfortunately, I can’t find the e-mail, so I’m unsure if I’m 
> remembering incorrectly or not.
> 
> If this is indeed the case, could someone perhaps give me a quick 
> example as to how this could be achieved? I am currently using Mapserver 
> 4.8, Chameleon 2.4, and OGR 1.3 in the application, running on a Windows 
> 2003 server.

Tim,

OGR 1.3 isn't very specific.  The previous public release was GDAL/OGR 1.3.1
and I just released GDAL/OGR 1.3.2 a day or two ago.  I believe the logic
to pass spatial constraints through the OGR virtual driver to ODBC drivers
as a WHERE clause on the X/Y columns was added after GDAL/OGR 1.3.1.  So to
use it, you would need 1.3.2.  Some intermediate builds (such as recent MS4W
binaries) should also include this capability.

At the mapserver level you shouldn't need to do anything special.  It should
just "kick in" automatically.

For context you would need to be using point data from a non-spatial data
source (such as SQLServer via ODBC) through the OGR virtual driver (like
in the VirtualSpatialData tutorial for mapserver).  OGR VRT is sometimes
referred to as "OVF".

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    | President OSGF, http://osgeo.org



More information about the mapserver-users mailing list