Virtual Spatial Data Source

Hr. Johannes Loose loose at LWF.UNI-MUENCHEN.DE
Fri Nov 2 11:36:29 EDT 2007


Hello List

I'm still trying to configure a Virtual Spatial Data Source like it is desctibed in: 
http://mapserver.gis.umn.edu/docs/reference/vector_data/VirtualSpatialData

I have now succesfully configured an ODBC Datasource to a Oracle 10g Database. I'm 
currently running mapserver 5.0.0.0 on a debian sarge server. gdal-config --version tells me:
1.3.2.

I'm not sure wether the error is caused by a misconfiguration of the .ovf file, if it is a version 
incompatibility of mapserver / gdal/ogr / unixodbc / oracle instantclient or if it's a problem with 
the webserver permissions. Maybe there is a complete different problem, I don't know at the 
moment, and I don't know how to check, either. 

Testing the datasource with ogrinfo works fine, but mapserver used to print out the following 
error on displaying the mapfile:

******************************************************************
msDrawMap(): Image handling error. Failed to draw layer named 'mit_Zaun'.;
msOGRFileOpen(): OGR error. Open failed for OGR connection '/opt/geodaten/vfl/VFL.ovf'.
?Unable to initialize ODBC Connection to DSN for @oralwf,VT_TBL_VFL_WEBGIS,
?[unixODBC][Oracle][ODBC][ORA]ORA-12154: TNS: could not resolve the correct identifier 
specified??
******************************************************************

After asking in the IRC channel, I made the TNS_ADMIN and the LD_LIBRARY_PATH 
environment variables known to apache (used by oracle instantclient and unixODBC). That 
changed the error to: 

******************************************************************
msDrawMap(): Image handling error. Failed to draw layer named 'mit_Zaun'.; 
msOGRFileOpen(): OGR error. GetLayer(VT_TBL_VFL_WEBGIS) failed for OGR 
connection '/opt/geodaten/vfl/VFL.ovf'.
******************************************************************


This is the relevant part of my mapfile:
******************************************************************
[...]
CONNECTION '/opt/geodaten/vfl/VFL.ovf'
CONNECTIONTYPE OGR
DATA 'VT_TBL_VFL_WEBGIS'
[..]
******************************************************************

Here is some more info on what I did to check the datasource:

******************************************************************
myserver$ whoami
www-data
******************************************************************
myserver$ cat /opt/geodaten/vfl/VFL.ovf
<OGRVRTDataSource>
        <OGRVRTLayer name="Versuchsflaechen">
        <SrcDataSource>ODBC:@oralwf,VT_TBL_VFL_WEBGIS</SrcDataSource>
        <SrcLayer>VT_TBL_VFL_WEBGIS</SrcLayer>
        <GeometryType>wkbPoint</GeometryType>
        <LayerSRS>EPSG:31468</LayerSRS>
        <GeometryField encoding="PointFromColumns" x="DBL_RW" y="DBL_HW" />
        </OGRVRTLayer>
</OGRVRTDataSource>
******************************************************************
myserver$ ogrinfo ODBC:@oralwf,VT_TBL_VFL_WEBGIS
INFO: Open of `ODBC:@oralwf,VT_TBL_VFL_WEBGIS'
using driver `ODBC' successful.
1: VT_TBL_VFL_WEBGIS

******************************************************************
myserver$ ogrinfo /opt/geodaten/vfl/VFL.ovf Versuchsflaechen
ERROR 4: Update access not supported for VRT datasources.
Had to open data source read-only.
INFO: Open of `/opt/geodaten/vfl/VFL.ovf'
using driver `VRT' successful.

Layer name: Versuchsflaechen
Geometry: Point
Feature Count: 0
Layer SRS WKT:
PROJCS["DHDN / Gauss-Kruger zone 4",
    GEOGCS["DHDN",
        DATUM["Deutsches_Hauptdreiecksnetz",
            SPHEROID["Bessel 1841",6377397.155,299.1528128,
                AUTHORITY["EPSG","7004"]],
            AUTHORITY["EPSG","6314"]],
        PRIMEM["Greenwich",0,
            AUTHORITY["EPSG","8901"]],
        UNIT["degree",0.01745329251994328,
            AUTHORITY["EPSG","9122"]],
        AUTHORITY["EPSG","4314"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",12],
    PARAMETER["scale_factor",1],
    PARAMETER["false_easting",4500000],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AUTHORITY["EPSG","31468"]]
DBL_HW: Real (14.2)
DBL_RW: Real (14.2)
[... some more fields following ...]
******************************************************************

This is the relevant part in the apache access.log:

******************************************************************
10.141.30.134 - - [02/Nov/2007:16:13:39 +0100] "GET 
/mapserver/mapserv?map=/opt/geodaten/vfl/Versuchsflaechen_ODBC.map&VERSION=1.1.
1&REQUEST=GetMap&SERVICE=WMS&LAYERS=mit_Zaun&STYLES=&SRS=EPSG:3146
8&BBOX=4347112.5,5471100,4398487.5,5492100&WIDTH=663&HEIGHT=271&FORMAT=i
mage/png&BGCOLOR=0xffffff&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc
.se_inimage HTTP/1.1" 500 - "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.8) 
Gecko/20071008 Firefox/2.0.0.8"
******************************************************************


Maybe one of you could give me a hint what I did wrong, or what to do to find out...

Thank you in advance

Johannes Loose

 



More information about the mapserver-dev mailing list