Hi,
using:
MapServer latest CVS
GDAL 1.4.0
Windows Server 2003
Using MS SQL Server
GDAL / OGR VRT driver
LAYER object:
LAYER
NAME "water_data"
STATUS ON
CONNECTIONTYPE OGR
DATA "water_data"
TYPE POINT
DEBUG ON
FILTER "where Site_Number = 'NF02YC0001'" # this works, filter is passed
#FILTER "Site_Number = 'NF02YC0001'" # no results
DUMP TRUE
#GROUP WaterMonitoring
CONNECTION "<OGRVRTDataSource>
<OGRVRTLayer name='water_data'>
<SrcDataSource>ODBC:foo/[EMAIL PROTECTED]</SrcDataSource>
<SrcSQL>SELECT * FROM foodata</SrcSQL>
<FID>VMVCode</FID>
<GeometryType>wkbPoint</GeometryType>
<LayerSRS>WGS84</LayerSRS>
<GeometryField encoding='PointFromColumns' useSpatialSubquery='TRUE' x='X'
y='Y'/>
</OGRVRTLayer>
</OGRVRTDataSource>"
PROJECTION
"init=epsg:4326"
END
docs say (http://mapserver.gis.umn.edu/docs/reference/mapfile/layer#filter):
"FILTER [string]
This parameter allows for data specific attribute filtering that is done at
the same time spatial filtering is done, but before any CLASS expressions are
evaluated. For OGR and shapefiles the string is simply a mapserver regular
expression. For spatial databases the string is a SQL WHERE clause that is
valid with respect to the underlying database.
For example: FILTER "type='road' and size <2"
"
...so, according to the docs, this means that the FILTER statement above should
be invalid, and I should NOT include a WHERE clause because this is an OGR
type, NOT a spatial database.
Is this is a bug in the code, or should the docs be modified?
Thanks
..Tom