Sum: Help: Setting Virtual Spatial data

Janeks Kamerovskis janeks.kamerovskis at SILVA.LV
Fri Oct 29 03:30:39 EDT 2004


Thanks to Frank Warmerdam, who helps to solve my problem!

So here is short Sum:
There could me two main reasons for this problem:
* read permissions to cgi's
* too old version of Mapserver - included OGR does not support ODBC virtual
data sources

In my case first case was not the reason, because virt.ovf file resides in
the
same directory where I keep my map files, and my mapserver runs fine without
virtual data layer.
The reason was too old version - in this case 4.0.1.

First I tried version 4.2.5. but it is likely compiled with Oracle support
and asks for oci.dll, so I tried version 4.4.beta-1 and it works...

But one thing appears I think, that is is a bug:
My old map files running with mapserv.exe, contained reference map with
image
format JPG. Despite that in Docs are written that it should be GIF, old
version
4.0.1. works with JPG, but new version hangs - browser shows that someting
is
retrieved but nothing appears.
Of course, when I changed format to GIF, my old mapfiles works again.

brgds
Janeks Kamerovskis


> -----Original Message-----
> From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On
> Behalf Of Janeks Kamerovskis
> Sent: Tuesday, October 26, 2004 10:12 AM
> To: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: [UMN_MAPSERVER-USERS] Help: Setting Virtual Spatial data
>
>
> 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