[mapserver-users] Re: ODBC OGR MS SQL CONNECTION

Robert Sanson SansonR at asurequality.com
Wed Mar 31 15:58:19 EDT 2010


Hi Frank
 
I have an OpenLayers / Mapserver system, where some of the data comes from a SQL-Server database via OGR. Trying to understand where a FILTER condition is applied. Here is a snippet from my Mapfile:
 
LAYER
  # name of layer
  NAME "apiariestm"
  TYPE POINT
  UNITS METERS
  # actual data pointer
  CONNECTION "./apiariestm.ovf"
  CONNECTIONTYPE OGR
  DATA "apiariestm"
  FILTER "WHERE apiary_id = '%apiaryid%'"
  STATUS ON
 
Here is the OGR .ovf file:
 
<OGRVRTDataSource>
        <OGRVRTLayer name="apiariestm">
        <SrcDataSource>ODBC:user/passwd at APIARY</SrcDataSource>
        <SrcLayer>vw_ogr_apiary_layer</SrcLayer>
        <GeometryType>wkbPoint</GeometryType>
        <LayerSRS>EPSG:2193</LayerSRS>
        <GeometryField encoding="PointFromColumns" x="x_nztm" y="y_nztm"/>
        <FID>apiary_id</FID>
        </OGRVRTLayer>
</OGRVRTDataSource> 
 
The SrcLayer is a view.
 
Does the filter get applied at the Mapserver end, i.e. all the points in the map window get retrieved, and then the filter is applied, or does Mapserver send the filter through to OGR?
 
Many thanks,
 
Robert Sanson


This message has been scanned for malware by SurfControl plc. www.surfcontrol.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20100401/fad45c5e/attachment.html


More information about the mapserver-users mailing list