SQL WHERE in OGR VRT
Fawcett, David
David.Fawcett at STATE.MN.US
Wed Apr 27 14:17:30 PDT 2005
As an update, this is the OVF file that I was using:
<OGRVRTDataSource>
<OGRVRTLayer name="facilities">
<SrcDataSource>ODBC:myname/mypass at mydsn</SrcDataSource>
<SrcSQL>SELECT FClass, UTMX, UTMY, NameShort FROM tlkpDestFac WHERE FClass = 1</SrcSQL>
<LayerSRS>epsg:32615</LayerSRS>
<GeometryType>wkbPoint</GeometryType>
<GeometryField encoding="pointFromColumns" x="UTMX" y="UTMY"/>
</OGRVRTLayer>
</OGRVRTDataSource>
After removing the line
<LayerSRS>epsg:32615</LayerSRS>
It works. Fortunately, for this application, I don't need to project the data.
David.
David Fawcett
Minnesota Office of Environmental Assistance
david.fawcett at moea.state.mn.us
651.215.0200
-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On Behalf Of Fawcett, David
Sent: Wednesday, April 27, 2005 4:00 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] SQL WHERE in OGR VRT
What is the lowest MapServer Version where SQL WHERE is supported in ORG VRT's?
I am playing with a virtual layer that connects to an Access database using OGR. The layer works great when I use <SrcLayer>tlkpDestFac</SrcLayer> and call up all of the elements in the file.
I attempted to filter the layer by using <SrcSQL>SELECT FClass, UTMX, UTMY, NameShort FROM tlkpDestFac WHERE FClass = 1</SrcSQL> in place of <SrcLayer> . Using the MapServer 4.4.1 binary from MapTools, I get the error ' msDrawMap(): Image handling error. Failed to draw layer named 'facilities'.
msOGRFileOpen(): OGR error. Open failed for OGR connection `facslf.ovf'. Failed to import LayerSRS `epsg:32615'. '
If I hit the same .ovf file with ogrinfo 1.2.5+ in the FW Tools package, it is read just fine.
Thanks,
David.
David Fawcett
Minnesota Office of Environmental Assistance
david.fawcett at moea.state.mn.us
651.215.0200
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20050427/9e881624/attachment.htm>
More information about the MapServer-users
mailing list