OracleSpatial

Steven Monai stevem at SPATIALMAPPING.COM
Mon Jan 2 12:47:04 EST 2006


I do not have first-hand experience with Oracle Spatial or Locator, so
hopefully someone else will respond to your Oracle-specific points.

You said that you obtained the hobu binaries, and then used those to replace
the contents of the ms4w cgi-bin directory. However, you did not say whether
you also obtained the corresponding PHP/MapScript binaries. Since you are
using MapScript to render your map, your MapScript module must also have
Oracle Spatial capability compiled into it. Also, did you try using the
mapserv CGI instead of MapScript? Try something like:

http://localhost/cgi-bin/mapserv.exe?mode=map&layers=oilwells&map=c:\ms4w\apps\gmap\htdocs\test11.map

I noticed that your "oilwells" layer does not have a STATUS line, and it
really should. Your PHP script should probably set the layer's STATUS to ON
before the map is drawn, e.g.

$oLayer = $oMap->getLayerByName("oilwells");
$oLayer->set("status", MS_ON);

To turn on debugging: I'm not sure on that one. I thought that all you would
need to do is put DEBUG ON in the MAP and in each LAYER, and have a LOG line
in WEB, but it seems you have all those... You might also need to set some
environment variable(s) or something. (?) Plus, I'm not sure how DEBUG
interacts with MapScript. It may be that DEBUG only works when you run your
map through the CGI. (?) (Sorry, not much help here, I know.)

HTH,
-SM
--


On Sun, 1 Jan 2006 15:54:30 -0800, kazan77777 (sent by Nabble.com)
<lists at NABBLE.COM> wrote:

>
>OS: Windows XP
>Oracle Version: 9i
>Webserver: Apache from ms4w distribution
>
>I am not able to successfully configure oraclespatial in mapserver and was
>wondering if someone could help me out.
>
>First, I am using Oracle Locator -- not Oracle Spatial.  Oracle Locator
>comes standard in Oracle, but Oracle Spatial is an extension that has to be
>purchased separately from Oracle.  I am assuming the Oracle Locator is
>sufficient -- correct?
>
>I am using the Oracle Spatial example that Oracle provides on their web
>site: otn.oracle.com/products/oracle9i/pdf/OracleSpatial.pdf.
>
>Geometry is enclosed in a table called 'cola_markets'
>
>Next, I downloaded the ms4w package and got that running.  After that, I
>downloaded the hobu distribution and replaced the
>C:\ms4w\Apache\cgi-bin directory with the contents from hobu.  This should
>give me the capability to hookup to OracleSpatial and render data.
>However, all I can generate is a blank image.
>
>Questions:
>1) Can someone point me to what I need to get my data to render
>2) Is there a way to trace the code; i.e. generate debug statements in a
>log file
>3) Is there anyone who can give me a simple example, including the sql
>scripts to create necessary schema objects, the associated map file, and
>the associated PHP file.
>
>This is my current MAP file:
>
>    NAME DEMO
>
>    DEBUG ON
>
>    STATUS ON
>    SIZE 400 300
>    SYMBOLSET ../etc/symbols.sym
>    UNITS dd
>    SHAPEPATH "../data"
>    IMAGECOLOR 255 255 255
>    FONTSET ../etc/fonts.txt
>
>    PROJECTION
>      "proj=latlong"
>      "ellps=WGS84"
>    END
>    EXTENT -180 -45 180 45
>
>    WEB
>      MINSCALE 2000000
>      MAXSCALE 50000000
>      IMAGEPATH "/ms4w/tmp/ms_tmp/"
>     IMAGEURL "/ms_tmp/"
>     LOG "c:/ms4w/gmap.log"
>    END
>
>    LAYER
>      DEBUG ON
>
>      PROJECTION
>        "proj=latlong"
>        "ellps=WGS84"
>      END
>
>      NAME "oilwells"
>      TYPE point
>
>      CONNECTIONTYPE oraclespatial
>      CONNECTION "scott/tiger!@XXXXXXX"
>      DATA "shape FROM cola_markets USING SRID 8307"
>
>      DUMP TRUE
>      CLASS
>        STYLE
>         SIZE 10
>         COLOR 0 128 128
>       END
>      END
>    END
>
>    END # Map File
>
>This is my current PHP file:
>
>    <?php
>    define("MAPFILE", "c:/ms4w/apps/gmap/htdocs/test11.map");
>    define("MODULE", "php_mapscript_44.dll");
>    if(!extension_loaded("MapScript")) dl(MODULE);
>    $oMap = ms_newMapObj(MAPFILE);
>    $oMap->setsize(600, 400);
>    $oMap->selectoutputformat("png");
>    $oImage = $oMap->draw();
>    header("Content-type: image/gif");
>    $url = $oImage->saveImage("");
>    ?>
>--
>Sent from the Mapserver - User forum at Nabble.com:
>http://www.nabble.com/OracleSpatial-t834577.html#a2164331
>



More information about the mapserver-users mailing list