FW: [UMN_MAPSERVER-USERS] oracle spatial

Wim Blanken w.blanken at GEON.NL
Mon Jun 12 17:43:42 EDT 2006


-----Original Message-----
From: Wim Blanken [mailto:w.blanken at geon.nl] 
Sent: maandag 12 juni 2006 20:08
To: 'Daniel Goetz'
Subject: RE: [UMN_MAPSERVER-USERS] oracle spatial

Hello Daniel,

I think your solution is simple. You have to specify &mode=map 
on the commandline to make it work. If you don't mapserver needs a template
to show the results of the cgi-call.

http://localhost/cgi-bin/mapserv.exe?map=c:/ms4w/Apache/htdocs/raster/test_o
s_ogr.map&layers=all&mode=map


Regards 

Wim Blanken


-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Daniel Goetz
Sent: Monday, June 12, 2006 1:54 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] oracle spatial

Hi,

I have the ms4w installed on my computer and I want to map geodata, lying in
a oracle spatial database on a server in the intranet, via umn mapserver.
Therefor I enabled OGR-OCI support described in the readme-file of the
ms4w-package (I "installed" 10g oracle instant client on my computer, set
set windows environmet variable PATH and did the described .dll swapping).

Then I tested, whether OGR now supports the OCI with ogrinfo. Therefor I had
to modify the syntax a littel bit to get information: I wrote "ogrinfo
"OCI:username/password at host:port/service_name" instead of described on the
ogr-site/oracle spatial "OCI:username/password at service_name". The result was
that ogrinfo listed me the relevant tables that contain geometric data.

Then I tried to map the data via mapserver. Therefor I wrote the following
.map-file (therefor I correspond to the example given in the "Vector Data
Access-Reference-Guide" on the mapserver-site):

MAP
NAME "Oracle"
EXTENT 426666.49 466058.21 448321.44 490754.58
SIZE 1400 1800
SHAPEPATH "/ms4w/Apache/htdocs/raster/daten"
IMAGETYPE PNG
IMAGECOLOR 255 255 255
UNITS METERS
STATUS ON
CONFIG "GDAL_DRIVER_PATH" "C:/ms4w/gdalplugins"

WEB
	IMAGEPATH "c:\ms4w\Apache\htdocs\raster\tmp\"
	IMAGEURL "/raster/tmp/"
	TEMPLATE "test_template.html"
END

LAYER
        CONNECTIONTYPE OGR
        CONNECTION "OCI:username/password at service_name"
        DATA "RWG_TBS"
        NAME "RWG_TBS"       
        TYPE POLYGON
        STATUS ON

        CLASS
            NAME "Flaeche"
            STYLE
			     OUTLINECOLOR 128 128 128
                 COLOR 225 225 185
            END
        END
END
END


The template I wrote therefor is very simple:

<html>
   <head>
      <title>Erstes Beispiel zum UMN Mapserver</title>
   </head>

   <body>
      Mapserver-Version auslesen:<br><br>[version]<br><br><br>
      Karte einbetten:<br><br>
      <img src="[img]"><br>

   </body>
</html>

And I tried to start mapping by writing the following in my browser:

http://localhost/cgi-bin/mapserv.exe?map=c:/ms4w/Apache/htdocs/raster/test_o
s_ogr.map&layers=all&


The result was, that mapserver brought the error-message:

"mapserv(): Web application error. No template provided. "

Then I tested some other mapserver-test-projects, for whom I know that they
have worked properly on my computer before the mentioned .dll swapping for
OGR-OCI support. The result was the same:

"mapserv(): Web application error. No template provided. "


So I have three questions:

How should mapserver know where the database is located without giving him
any information about the host-address and the port-number. Where can I
provide this information for the mapserver. In the case of ogrinfo I did
this by writing "OCI:username/password at host:port/service_name". In the
.mpa-file example in the "Vector-Data-Reference-Guide" they say under
CONECTION you should type "OCI:username/password at service_name". Where is the
information about the location of the database?

Second questions is: Is anything wrong with my .map-file, html-template or
the starting-command in the web-browser?

Third: And why do the other mapserver projects, I tested before .dll
swapping (for OGR-COI support), work anymore. Why do I always get the
error-message "mapserv(): Web application error. No template provided."
although I changed nothing on the .map-files, the template nor the command.

I would be very pleased and hayppy and thankful if anybody would help me on
my problem. This would really be very nice. Thank you so much for your
endeavors.

Regards

Daniel 


-- 


Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer



-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.8.3/361 - Release Date: 6/11/2006



More information about the mapserver-users mailing list