[mapserver-users] Blank image generated from oracle spatial layer

Rodrigo Cabral cabral at yadata.net
Sat Dec 15 16:00:04 PST 2001


Hey there,

Actually, I just noticed where the problem is. Let's examine this excerpt
from the error message:

[window SRID does not match layer SRID]

As you mentioned Brian, it's an SRID problem, not an indexation problem. It
occurs due to this function call (SDO_FILTER):

SDO_FILTER( GEOLOC,
MDSYS.SDO_GEOMETRY(2003, NULL,
NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(-180.3
,-179.7,179.7,180.3) ),'querytype=window') = 'TRUE'

which passes three arguments: geom1=GEOLOC; geom2=SDO_GEOMETRY constructor;
and a third non-relevant argument.

geom1 has a defined SRID, while geom2 doesn't. So we get a SRID
mismatch error. I've never tried working Spatial with defined SRIDs, so I
never got this error. I'll try to solve it soon, but meanwhile try using
this as your DATA statement in your mapfile:

DATA "GEOLOC from cnybndpl"

changes to

DATA "GEOLOC from (SELECT GEOLOC FROM cnybndpl)"

This will remove the SDO_FILTER call from the query, hence eliminating the
error. Using SELECT statement instead of a tablename makes impossible for me
to apply a "windowed" query. I reached this conclusion because when I
attempted to do so, Oracle gave me an error as I cannot use SDO_FILTER with
a geometry (the query result) that has not an index defined for it.
Consequently, MapServer will get all elements from the table, and not only
those who are within the current extent "view". This should slow the
performance a bit, but I dont think it's something you need to worry about.

Debasish, this "workaround" should make your problem go away too, in case
you decide to try working with Oracle Spatial again.

Cheers,
Rod.

----- Original Message -----
From: "Brian McKenzie" <brian at stallingscrop.com>
To: <cabral at yadata.net>
Sent: Friday, December 14, 2001 6:57 PM
Subject: Re: [mapserver-users] Blank image generated from oracle spatial
layer


Hello
I seem to be experiancing the some problems. I know this is not a
Mapserver issue, now. But since the thread was started here I thought
maybe I could get some further insight.
I upload my data to Oracle with MapInfo Easy loader. And everything
seems fine with Mapinfo, It shows up in Spatial advisor alright.

My Stuff:

Map Info Easy Loader 6.7
Oracle 8.1.7.0.1
Mapserver3.5

#
# Start of map file
#
NAME DEMO
STATUS ON
SIZE 600 600
# EXTENT 388107.634400379 5203120.88405952 500896.339019834
5310243.3061389
EXTENT -180 -90 180 90
UNITS METERS
IMAGECOLOR 255 255 255

#
# Start of web interface definition
#
WEB
  HEADER demo_header.html
  TEMPLATE demo.html
  FOOTER demo_footer.html
  MINSCALE 1000
  MAXSCALE 1550000
  IMAGEPATH "/uO1/Apache/Apache/htdocs/tmp/"
  IMAGEURL "/tmp/"
  LOG "demo.log"
END

#
# Start of layer definitions
#
LAYER
  NAME "SGIS"
  TYPE POLYGON
  STATUS ON
  CONNECTIONTYPE oraclespatial
  CONNECTION "mdsys/mdsys at lakeland.scicl.net"
  DATA "GEOLOC from cnybndpl"

END
END
END #Map File
<------------------>

I get this in mapserver3.5
<------------------>

msOracleSpatialLayerWhichShapes(): OracleSpatial error. ORA-29902: error
in executing ODCIIndexStart() routine ORA-13208: internal error while
evaluating [window SRID does not match layer SRID] operator ORA-06512:
at "MDSYS.SDO_INDEX_METHOD", line 84 ORA-06512: at line 1 . SQL
statement: SELECT rownum, GEOLOC FROM cnybndpl WHERE SDO_FILTER( GEOLOC,
MDSYS.SDO_GEOMETRY(2003, NULL,
NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(-180.3
,-179.7,179.7,180.3) ),'querytype=window') = 'TRUE'
<------------------->

If I run the same query in SQL*PLUS i get the same error messages. From
all I heve read this would indicate some type of index problem. But
ORA-13208 error seems to indicate an SRID problem. If someone could shed
some light on this for me & point me in the direction I sure would
appreciate it. I have been head bashing for 2 days now ;(

Thanks Again
Brian McKenzie
Stallings Crop Insurance Corp.
brian at stallingscrop.com





More information about the MapServer-users mailing list