[Mapserver-users] Oracle Spatial

Zamil Murji Zamil.Murji at divestco.com
Wed Jul 2 14:50:02 PDT 2003


After using the oracle tools to convert my shapefile into an oracle spatial format, this is what I have:

SQL> select * from oilwells where gid = 1;

       GID
----------
GEOMETRY(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES)
--------------------------------------------------------------------------------
         1
SDO_GEOMETRY(2002, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 2, 1), SDO_ORDINATE_ARRAY(
-112.08855, 48.9998283, -112.08855, 48.9998283))


SQL>

Notice that the SDO_POINT(X, Y, Z) column is NULL. Can mapserver handle this case. I guess the otn utilities utilize the last two columns.
Also note that the SRID is null. 
When i draw my image, I get the following error message:
msDrawMap(): Image handling error. Failed to draw layer named 'oilwells'. 

Here is my .map definition for this layer.
LAYER
   NAME "oilwells"
   TYPE point
   STATUS default
   CONNECTIONTYPE oraclespatial 
   CONNECTION "sdb/sdb at 10.0.50.30" 
   DATA "GEOMETRY FROM OILWELLS USING SRID NULL" 
#   DUMP TRUE 
   MAXSCALE 20
   SYMBOLSCALE 2
   CLASS
     SYMBOL 3
     SIZE 12
     MAXSIZE 28
     MINSIZE 4
   END
END

I am using mapserver 3.6.6 precompiled with oracle spatial support from the mapserver downloads page.

Any help would be greatly appreciated. Thanks
Zamil

-----Original Message-----
From: Zamil Murji 
Sent: Wednesday, July 02, 2003 2:36 PM
To: bartvde at xs4all.nl; mapserver-users at lists.gis.umn.edu
Subject: RE: [Mapserver-users] Oracle Spatial


Thanks Bart for the quick reply...

I was able to convert my shapefiles into oracle spatial format using some tools on otn. Using those tools they insert NULL as the SRID. Will this cause grief? According to the WIKI you had to specify a SRID otherwise you got a mapserver error. Is this correct?

Is there any way to see what query mapserver will be running? Like a log file or something of the sort.

In the connection string, does service refer to the ip address?

Thanks in advance,
Zamil

-----Original Message-----
From: Bart van den Eijnden [mailto:bartvde at xs4all.nl]
Sent: Wednesday, July 02, 2003 12:22 PM
To: Zamil Murji; mapserver-users at lists.gis.umn.edu
Subject: Re: [Mapserver-users] Oracle Spatial


Hi Zamil,

otn (Oracle technology network) is the best site for Oracle information. 
Oracle itself has a tool to import shapefiles into Oracle Spatial.

http://otn.oracle.com (you can register for free)

The easiest to use is the built-in Oracle Spatial support. To use the 
support through OGR, you have to compile OGR against the Oracle client 
library.

See also the mapserver wiki Oracle Spatial page:
http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?OracleSpatial

Best regards,
Bart

On Wed, 2 Jul 2003 12:03:19 -0600, Zamil Murji <Zamil.Murji at divestco.com> 
wrote:

> Hello list,
>
> I want to use MapServer to draw an Oracle Spatial layer, however, I have 
> never used Oracle Spatial. I have some questions I am sure you will be 
> able to answer.
>
> 1) What utilities are available to import a shapefile into an Oracle 
> Spatial database? Where can I download them from? 2) Need to know some 
> good sites on how to setup Oracle 8i with the Spatial component, and I 
> need a quick tutorial on how to create a table, alter a table, insert and 
> select from that table. Any good sites?
> 3) I read on the newsgroup that there are two ways to go about this. One 
> is to use the built in oracle spatial support and the other is to use 
> ogr. I am running Apache on a windows 2000 box, what way is the best to 
> go, easiest to setup?
>
> Thanks for your help
> Zamil
>
> -----Original Message-----
> From: Eduardo Patto Kanegae [mailto:eduardo at linkgeo.com.br]
> Sent: Wednesday, June 25, 2003 8:44 AM
> To: mapserver-users at lists.gis.umn.edu
> Cc: niklas "wörmann
> Subject: Re: [Mapserver-users] running v4 beta as a command line tool
>
>
> I've tested on MapServer 3.6.4 for Windows, using:
>
> $ mapserv "QUERY_STRING=map=c:\test\mymap.map&mode=map&foo=...." > 
> myresult.gif
>
> but if you try to open "myresult.gif" it crash...
>
> so I opened this file with a text editor and deleted the first two 
> lines(the headers), then it works!
>
> regards
>
> Eduardo Patto Kanegae
> eduardo at linkgeo.com.br
> http://www.linkgeo.com.br
>
> ***************************************
> ***Fim da Mensagem / End of Message ***
> ***************************************
>
>
> On Wed, 25 Jun 2003 14:43:41 +0200, Vincent Schut <schut at sarvision.com> 
> enscreveu:
>
>> De: Vincent Schut <schut at sarvision.com>
>> Data: Wed, 25 Jun 2003 14:43:41 +0200
>> Para: niklas wörmann <nwoe at privat.utfors.se>,   <mapserver- 
>> users at lists.gis.umn.edu>
>> Assunto: Re: [Mapserver-users] running v4 beta as a command line tool
>>
>> On Wednesday 25 June 2003 10:06, niklas wörmann wrote:
>> > Hi!
>> > i am trying to track down the reason mapserver isn´t working on my 
>> windows
>> > 2000 server.
>> >
>> > i remember seeing somewhere that it was indeed possible to run 
>> mapserver as
>> > a command line tool, specifying a map file and an output file
>> >
>> > anyone know the syntax for this?
>>
>> On linux:
>> ./mapserv "QUERY_STRING=map=/path/to/your/mapfile.map&mode=map"
>> This will output headers + image data to stdout (on linux). Probably on 
>> windows your executable is not named mapserv but something like 
>> mapserv.exe? And use \ instead of / I think.
>>
>> you cannot just save the output as image file because the headers are in 
>> the output too.
>> But you can see if it outputs something (lots of ascii: image), or gives 
>> an error.
>> To see the image: type in your browser:
>> http://localhost/cgi-bin/mapserv?map=/path/to/your/mapfile.map&mode=map
>> change / in path to \ if on windows?
>>
>> Regards,
>> -- ______________________________________
>> Vincent Schut
>> Sarvision B.V.
>> Wageningen, The Netherlands
>> www.sarvision.com
>>
>> _______________________________________________
>> Mapserver-users mailing list
>> Mapserver-users at lists.gis.umn.edu
>> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>>
>>
>>
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>
>



-- 
 

_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users




More information about the MapServer-users mailing list