[Mapserver-users] ORA-13373 with 9i

John Newton john_mapserver at hotmail.com
Wed Mar 26 17:52:29 EST 2003


This is a multi-part message in MIME format.

------=_NextPart_000_004A_01C2F3A7.52ACF5B0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

maporaclespatial.c has the extent type hardcoded to a rectangle, so =
there is no work around, without changing the source code.


Try changing maporaclespatial.c from:

  if (apply_window)
    sprintf( query_str + strlen(query_str),
        "SDO_FILTER( %s.%s, MDSYS.SDO_GEOMETRY("
          "2003, %s, NULL,"
          "MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),"
          "MDSYS.SDO_ORDINATE_ARRAY(%.9g,%.9g,%.9g,%.9g) ),"
        "'querytype=3Dwindow') =3D 'TRUE'",
        table_name, geom_column_name, srid,
        rect.minx, rect.miny, rect.maxx, rect.maxy );

to:

  if (apply_window)
    sprintf( query_str + strlen(query_str),
        "SDO_FILTER( %s.%s, MDSYS.SDO_GEOMETRY("
          "2003, %s, NULL,"
          "MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1),"
          =
"MDSYS.SDO_ORDINATE_ARRAY(%.9g,%.9g,%.9g,%.9g,%.9g,%.9g,%.9g,%.9g,%.9g,%.=
9g) ),"
        "'querytype=3Dwindow') =3D 'TRUE'",
        table_name, geom_column_name, srid,
        rect.minx, rect.miny, rect.minx, rect.maxy, rect.maxx, =
rect.maxy, rect.maxx, rect.miny,rect.minx, rect.miny );

I didn't test this change, so it may break non-geodetic layers due to =
direction of the polygon.  However, it should work for geodetic layers.

-john

  ----- Original Message -----=20
  From: Shannon Scott=20
  To: Mapserver-users at lists.gis.umn.edu=20
  Sent: Wednesday, March 26, 2003 5:02 AM
  Subject: [Mapserver-users] ORA-13373 with 9i


  Hello,
  I am trying to access some data stored in the oracle spatial ( =
SDO_GEOMETRY ) type.  When I try to draw a subset of the layer using the =
following DATA syntax:
    DATA "GEOM from tracts1test USING SRID 8307"

   I get the following error.

  msOracleSpatialLayerWhichShapes(): OracleSpatial error. ORA-29902: =
error in executing ODCIIndexStart() routine ORA-13373: Element of type =
Extent is not supported for Geodetic data ORA-06512: at =
"MDSYS.SDO_INDEX_METHOD_9I", line 232 ORA-06512: at line 1 . SQL =
statement: SELECT rownum, GEOM FROM tracts1test WHERE SDO_FILTER( =
tracts1test.GEOM, MDSYS.SDO_GEOMETRY(2003, 8307, =
NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(-71.914=
27,41.237,-68.08573,45.07) ),'querytype=3Dwindow') =3D 'TRUE'=20

  Important part:
  ORA-13373: Element of type Extent is not supported for Geodetic data.

  When I try the query on the sqlplus command line, I get the same =
error.
  Oracle suggests changing the query such that I use a polygon with four =
vertices instead of the rectangle spatial object type.  When I change =
the query to this it works.

  SELECT rownum, GEOM FROM tracts1test=20
  WHERE SDO_FILTER( tracts1test.GEOM,=20
  mdsys.sdo_geometry(2003,8307,NULL,
  mdsys.sdo_elem_info_array(1,1003,1),
  mdsys.sdo_ordinate_array(-71.91,41.23,
  -71.91,45.07,-68.08,45.07,
  -68.08,41.23,-71.91,41.23) ),
  'querytype=3Dwindow') =3D 'TRUE'=20

  I found I could get around the error using:
    DATA "GEOM from (select GEOM from  tracts1test)"

  but without the index it is very slow.

  Has anyone else seen this?  What is the workaround?
  Thank you for any insight,thoughts or advice.
  Shannon

  Linux RedHat 7.2
  Mapserver 3.6
  Oracle 9.0.1
  Apache CGI/PHP.




------=_NextPart_000_004A_01C2F3A7.52ACF5B0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>maporaclespatial.c has the extent type =
hardcoded to=20
a rectangle, so there is no work around, without changing the source=20
code.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Try changing maporaclespatial.c =
from:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp; if =
(apply_window)<BR>&nbsp;&nbsp;&nbsp;=20
sprintf( query_str +=20
strlen(query_str),<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
"SDO_FILTER(=20
%s.%s,=20
MDSYS.SDO_GEOMETRY("<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;=20
"2003, %s, =
NULL,"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
"MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;=20
"MDSYS.SDO_ORDINATE_ARRAY(%.9g,%.9g,%.9g,%.9g)=20
),"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "'querytype=3Dwindow') =
=3D=20
'TRUE'",<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; table_name,=20
geom_column_name, srid,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
rect.minx,=20
rect.miny, rect.maxx, rect.maxy );<BR></DIV></FONT>
<DIV><FONT face=3DArial size=3D2>to:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp; if =
(apply_window)<BR>&nbsp;&nbsp;&nbsp;=20
sprintf( query_str +=20
strlen(query_str),<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
"SDO_FILTER(=20
%s.%s,=20
MDSYS.SDO_GEOMETRY("<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;=20
"2003, %s, =
NULL,"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
"MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1),"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;=20
"MDSYS.SDO_ORDINATE_ARRAY(%.9g,%.9g,%.9g,%.9g,%.9g,%.9g,%.9g,%.9g,%.9g,%.=
9g)=20
),"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "'querytype=3Dwindow') =
=3D=20
'TRUE'",<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; table_name,=20
geom_column_name, srid,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
rect.minx,=20
rect.miny, rect.minx, rect.maxy, rect.maxx, rect.maxy, rect.maxx,=20
rect.miny,rect.minx, rect.miny );<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I didn't test this change, so it may =
break=20
non-geodetic layers due to&nbsp;direction of the polygon.&nbsp; However, =
it=20
should work for geodetic layers.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>-john</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;</DIV></FONT>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV=20
  style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
  <A title=3Dsscott at gwi.net href=3D"mailto:sscott at gwi.net">Shannon =
Scott</A> </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A=20
  title=3DMapserver-users at lists.gis.umn.edu=20
  =
href=3D"mailto:Mapserver-users at lists.gis.umn.edu">Mapserver-users at lists.g=
is.umn.edu</A>=20
  </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Wednesday, March 26, 2003 =
5:02=20
  AM</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> [Mapserver-users] =
ORA-13373 with=20
  9i</DIV>
  <DIV><BR></DIV>
  <DIV><FONT face=3DArial size=3D2>Hello,</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2>I am trying to access some data =
stored in the=20
  oracle spatial ( SDO_GEOMETRY ) type.&nbsp; When I try to draw a =
subset of the=20
  layer using the following DATA syntax:</FONT><FONT face=3DArial=20
  size=3D2></FONT></DIV>
  <DIV><FONT face=3DArial size=3D2>&nbsp; DATA "GEOM from tracts1test =
USING SRID=20
  8307"</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>&nbsp;I get the following =
error.</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
  <DIV>msOracleSpatialLayerWhichShapes(): OracleSpatial error. =
ORA-29902: error=20
  in executing ODCIIndexStart() routine ORA-13373: Element of type =
Extent is not=20
  supported for Geodetic data ORA-06512: at "MDSYS.SDO_INDEX_METHOD_9I", =
line=20
  232 ORA-06512: at line 1 . SQL statement: SELECT rownum, GEOM FROM =
tracts1test=20
  WHERE SDO_FILTER( tracts1test.GEOM, MDSYS.SDO_GEOMETRY(2003, 8307,=20
  =
NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(-71.914=
27,41.237,-68.08573,45.07)=20
  ),'querytype=3Dwindow') =3D 'TRUE' </DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>Important part:</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2><FONT face=3D"Times New Roman" =
size=3D3>ORA-13373:=20
  Element of type Extent is not supported for Geodetic =
data.</FONT></FONT></DIV>
  <DIV><FONT face=3DArial size=3D2><FONT face=3D"Times New Roman"=20
  size=3D3></FONT></FONT>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2><FONT face=3D"Times New Roman" =
size=3D3>When I try=20
  the query on the sqlplus command line, I get the same=20
  error.</FONT></FONT></DIV>
  <DIV>Oracle suggests changing the query such that I use a polygon with =
four=20
  vertices instead of the rectangle spatial object type.&nbsp; When I =
change the=20
  query to this it works.</DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>SELECT rownum, GEOM FROM tracts1test =
<BR>WHERE=20
  SDO_FILTER( tracts1test.GEOM,=20
  =
<BR>mdsys.sdo_geometry(2003,8307,NULL,<BR>mdsys.sdo_elem_info_array(1,100=
3,1),<BR>mdsys.sdo_ordinate_array(-71.91,41.23,<BR>-71.91,45.07,-68.08,45=
.07,<BR>-68.08,41.23,-71.91,41.23)=20
  ),<BR>'querytype=3Dwindow') =3D 'TRUE' </FONT></DIV>
  <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>I found I could get around the error=20
  using:</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2>
  <DIV><FONT face=3DArial size=3D2>&nbsp; DATA "GEOM from (select GEOM =
from=20
  &nbsp;tracts1test)"</FONT></DIV></FONT></DIV>
  <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>but without the index it is very=20
  slow.</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>Has anyone else seen this?&nbsp; What =
is the=20
  workaround?</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2>Thank you for any insight,thoughts or =

  advice.</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2>Shannon</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>Linux RedHat 7.2</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2>Mapserver 3.6</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2>Oracle 9.0.1</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2>Apache CGI/PHP.</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial><BR><FONT=20
size=3D2></FONT></FONT></DIV></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_004A_01C2F3A7.52ACF5B0--



More information about the mapserver-users mailing list