[Gdal-dev] ogrinfo and oracle spatial

Daniel Goetz madprof at gmx.ch
Mon Jun 12 06:51:16 EDT 2006


Thank you Howard and Mateusz for your help!!!

Now running ogrinfo it lists for one thing the OCI-support and for another it shows the tables in the oracle database that contain geometric data. That's really great. but I had to modify the command for ogrinfo: I wrote:" ogrinfo "OCI:username/password at host:port/sevice_name" instead of "OCI:username/password at service_name". Anyway, it works.

But now another problem occures concerning the mapserver: I "installed" the Oracle 10g instant client, set the windows environment variable PATH and did the .dll swapping like Howard and the readme file in the ms4w-package told me to do. Everything went fine until I want to test maping oracle spatial data via mapserver. the mapserver gave back the following: "mapserv(): Web application error. No template provided." I checked my .map-file for that but there I found a link to the template-file in the WEB-Object.

WEB
...
TEMPLATE "test_template.html"
...
END

After that I tested other test-projects that contain only shapefiles or rasterdata that had worked before the mentioned .dll swapping on my computer. but always the same error message was given out:
"mapserv(): Web application error. No template provided."

Has anybody an idea why this happens? What am I doing wrong? 
Here is my mapfile:

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:gds_brwk2004_umn/umn at geo0xs01:1523/gds1prod.geo.stadt.nuernberg.de"
        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

Under "CONNECTION" in the LAYER-OBJECT I use the same phrase as in ogrinfo. the one including the host- and the port-data instead of the command shown in the mapserver-reference-guide "Vector Data Access" on http://mapserver.gis.umn.edu/docs/reference/vector_data , because I do not know where mapserver shall get these info (host and port) otherwise (but I also tested the version told in the reference-guide). As mentioned in the mail before, the database itself lies on a server in the intranet. Can anybody explain that to me? Thank you so much.

the linked tempalte 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 to start the whole process I write the following command-line in my browser:

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

OK. That's it. I really don't know what exactly the problem might be. And I don't know how mapserver shall get access to the geodata in the oracle database without giving the host-address and the port-number. Would be very nice if somebody could help me. Thank you so much. 


> Datum: Fri, 9 Jun 2006 08:18:52 -0500
> Betreff: Re: [Gdal-dev] ogrinfo and oracle spatial
> 
> The latest MS4W is built with support for Oracle OGR support.  You 
> need to have the 10g client libraries installed on your path 
> somewhere, and use the OGR_DRIVER_PATH/GDAL_DRIVER_PATH environment 
> variables to activate it.  See the readme file in MS4W for more 
> information.
> 
> In addition, the latest MS4W comes with Oracle MapServer support as 
> well.  See the readme file for more information on that as well. 
> Using it involves a some dll swapping, but it isn't too bad.
> 
> Howard
> 
> At 12:51 PM +0200 6/9/06, Mateusz Loskot wrote:
> >Daniel Goetz wrote:
> >>  Thank you Mateusz for your help.
> >>
> >>  Unfortunatelly the command: "ogrinfo
> OCI:gds_brwk2004_umn/umn at gds1prod"
> >>  brought back the following (this tiem I used the ogrinfo
> >>  integrated in ms4w:
> >>
> >>  FAILURE:
> >>  Unable to open datasource 'OCI:gds_brwk2004_umn/umn at gds1prod' with 
> >>the following drivers.
> >>
> >>  -> ESRI Shapefile
> >>  ->MapInfo File
> >>  ->UK .NTF
> >>  ->SDTS
> >>  ->TIGER
> >>  ->S57
> >>  ->DGN
> >>  ->VRT
> >>  ->AVCBin
> >>  ->REC
> >>  ->Memory
> >>  ->CSV
> >>  ->GML
> >>  ->ODBC
> >>  ->PGeo
> >>  ->PostgreSQL
> >>  ->MySQL
> >
> >>As you can see, list of supported drivers of your OGR does not include
> >OCI for Oracle Spatial.
> >This is the problem.
> >
> >>>  Subsequent I watched out fo the supported formats by commanding:
> >>  "ogrinfo --formats"
> >>
> >>  the result was:
> >>
> >>  Loaded OGR Format Drivers:
> >>  ->"ESRI Shapefiel"
> >>  ->"MapInfo File"
> >>  ->"UK .NTF"
> >>  ->"SDTS"
> >>  ->"S57"
> >>  ->"DGN"
> >>  ->"VRT"
> >>  ->"AVCBin"
> >>  ->"REC"
> >>  ->"Memory"
> >>  ->"CSV"
> >>  ->"GML"
> >>  ->"ODBC"
> >>  ->"PGeo"
> >>  ->"PostgreSQL"
> >>  ->"MySQL"
> >
> >>Yes, this is the same list as above you got with the error message.
> >
> >>>  Can you please tell me whether the needed driver for oracle
> >>  spatial is supported in my OGR. Can you tell me what I further
> >>  sould do.
> >
> >>AFAIK,
> >you have to build GDAL yourself with OCI driver included in the OGR.
> >I'm writing 'AFAIK', because I don't know if there is any FWTools or
> >MS4W or any other package that provides OGR built with OCI support.
> >
> >I assume you're using Windows, you can turn on OCI support by
> >editing nmake.opt file.
> >Find OCI word and you will see appropriate options/paths to enable this
> >driver (look for "Add ORACLE support" section).
> >
> >On Unix, you can use --with-oci option for ./configure script.
> >
> >BTW, I've never used OCI myself, so I'm giving you some suggestions I
> >base on  my knowledge, but not experience.
> >
> >Cheers
> >--
> >Mateusz Loskot
> >http://mateusz.loskot.net
> >_______________________________________________
> >Gdal-dev mailing list
> >Gdal-dev at lists.maptools.org
> >http://lists.maptools.org/mailman/listinfo/gdal-dev
> 
> _______________________________________________
> Gdal-dev mailing list
> Gdal-dev at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/gdal-dev

-- 


"Feel free" – 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail



More information about the Gdal-dev mailing list