Help: Setting Virtual Spatial data

Janeks Kamerovskis janeks.kamerovskis at SILVA.LV
Tue Oct 26 03:11:47 EDT 2004


Hi, All!

I tried to set up Virtual spatial data layer using ODBC:
I made virtual data file: virt.ovf
And tested it with ogrinfo.exe:
That says:
INFO: Open of `e:\MapServer\MapDefs\virt.ovf'
using driver `VRT' successful.
I put virtual layer in map file.
But server responds:
Warning: [MapServer Error]: msDrawMap(): Failed to draw layer named
'mylayer'. in E:\webFolders\ipasumi\test2.php on line 57

Warning: [MapServer Error]: msOGRFileOpen(): Open failed for OGR connection
`E:\MapServer\mapDefs\virt.ovf'. File not found or unsupported format. in
E:\webFolders\ipasumi\test2.php on line 57

What could be wrong?

virt.ovf
<OGRVRTDataSource>
    <OGRVRTLayer name="mylayer">
        <SrcDataSource>ODBC:MyTest,kraut1/SrcDataSource>
        <SrcLayer>kraut1</SrcLayer>
        <GeometryType>wkbPoint</GeometryType>
        <LayerSRS>WGS84</LayerSRS>
        <GeometryField encoding="PointFromColumns" x="x" y="y"/>
    </OGRVRTLayer>
</OGRVRTDataSource>

Layer in map file:
    LAYER
        NAME "mylayer"
        TYPE POINT
        CONNECTIONTYPE OGR
        CONNECTION "E:\MapServer\mapDefs\virt.ovf" # the name and path to
the virtual.ovf file, relative to shapepath may work?
        DATA "kraut1" # the name of the OGRVrtLayer
        STATUS ON
#        LABELITEM kraut1 #may need to use table.name or just name depending
on your OVF file.
#        PROJECTION
#          "init=epsg:4326"
#        END
        CLASS
          SYMBOL 1
          SIZE 6
          COLOR 255 0 0
          LABEL
        SIZE MEDIUM
        TYPE BITMAP
        COLOR 0 0 0
          END
        END
    END

brgds
Janeks Kamerovskis



More information about the mapserver-users mailing list