problem with OGR connection using *.ovf -> orginfo and direct SQL query -> different results

Janeks Kamerovskis janeks.kamerovskis at SILVA.LV
Wed Nov 23 03:53:58 PST 2005


Hi!

So I have following *.ovf :
<OGRVRTDataSource>
    <OGRVRTLayer name="rs">
        <SrcDataSource>ODBC:un/pw at myDSN</SrcDataSource>
        <SrcSQL>SELECT My_ID,x,y FROM OPENQUERY (linkServ, 'SELECT
RS.GEOLOC.sdo_point.x as x,	RS.GEOLOC.sdo_point.y as y, RS.my_ID FROM
myTable RS')</SrcSQL>
 	<SrcLayer>RS</SrcLayer>
	<GeometryType>wkbPoint</GeometryType>
        <LayerSRS>WGS84</LayerSRS>
	<GeometryField encoding="PointFromColumns" x="x" y="y"/>
    </OGRVRTLayer>
</OGRVRTDataSource>

That produces folowing ogrinfo output:

C:\Program Files\FWTools1.0.0a7>ogrinfo -fid 391 e:/mapserver/mapdefs/rs.ovf
lay
er rs
ERROR 4: Update access not supported for VRT datasources.
Had to open data source read-only.
INFO: Open of `e:/mapserver/mapdefs/rs.ovf'
using driver `VRT' successful.

Layer name: rs
Geometry: Point
Feature Count: 393
ERROR 1: SetAttributeFilter() not supported on ExecuteSQL() results.
ERROR 1: SetAttributeFilter() not supported on ExecuteSQL() results.
Extent: (314.000000, 6.000000) - (737.000000, 6.000000)
Layer SRS WKT:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        TOWGS84[0,0,0,0,0,0,0],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0,
        AUTHORITY["EPSG","8901"]],
    UNIT["degree",0.0174532925199433,
        AUTHORITY["EPSG","9108"]],
    AXIS["Lat",NORTH],
    AXIS["Long",EAST],
    AUTHORITY["EPSG","4326"]]
RS_STORAGE_ID: String (38.0)
x: Real (0.0)
y: Real (0.0)
OGRFeature(rs):391
  RS_STORAGE_ID (String) = 507.00
  x (Real) = 358
  y (Real) = 6
  POINT (358 6 0)

While simple query to mydatabase connection with the same query string like
in *.ovf file produces for given record:

506	464918.0	6310080.0

At the same time I have simple table in another mySQL database with the same
point features and very similar *.ovf file, that gives correct (equal)
results.

Could somebody point me to right direction, what could be wrong!?


Thanks in advance!
Janeks



More information about the MapServer-users mailing list