Virtual layer access OGR ODBC problem
Yewondwossen Assefa
assefa at DMSOLUTIONS.CA
Tue Oct 10 11:04:17 PDT 2006
Hi There,
I am trying to access an ODBC database using the ogr virtual layer
access (using shp2img). The layer seems to be defined properly as far as
I know. It looks something like :
...
CONNECTION "<OGRVRTDataSource>
<OGRVRTLayer name='AL05AK0001'>
<SrcDataSource>ODBC:@sos_test</SrcDataSource>
<SrcSQL>SELECT * FROM t_ResEau_Station_Data WHERE Site_Number =
'AL05AK0001'</SrcSQL>
<GeometryType>wkbPoint</GeometryType>
<GeometryType>wkbPoint</GeometryType>
<LayerSRS>WGS84</LayerSRS>
<GeometryField encoding='PointFromColumns' x='Longitude' y='Latitude'/>
</OGRVRTLayer>
</OGRVRTDataSource>"
The error message is the following :
msOGRFileNextShape(): OGR error. Attempt to use STRING field `Longitude'
with numeric comparison `>'. <br>
If I just use the SrcLayer instead of the SrcSQL, It seems to work ok :
<SrcDataSource>ODBC:@sos_test</SrcDataSource>
<SrcLayer>t_ResEau_Station_Data</SrcLayer>
<GeometryType>wkbPoint</GeometryType>
<LayerSRS>WGS84</LayerSRS>
<GeometryField encoding='PointFromColumns' x='Longitude' y='Latitude'/>
From what I understand this occures when comparing the x,y values to
the map bbox to see if the element fits in the map. I am using gdal/ogr
from CVS (updated few days ago).
Has anyone came accross this problem ?
Thanks
--
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst
Email: assefa at dmsolutions.ca
http://www.dmsolutions.ca/
Phone: (613) 565-5056 (ext 14)
Fax: (613) 565-0925
----------------------------------------------------------------
More information about the MapServer-users
mailing list