[Mapserver-users] Empty Map with Oracle spatial - SDO_GTYPE

Henrik Wilsdorf h.wilsdorf at gmx.net
Sat Feb 28 07:33:01 EST 2004


This is a multi-part message in MIME format.

------=_NextPart_000_0010_01C3FDFF.62F66AB0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,=20
and thanks for your help!
I think, the only problem was my spatial data. With 2-dimensional data =
(i.e. SDO_GTYPE 2003) it runs fine.
The new (running) data I have created with:
1.  shp2sdo.exe (newest version from OTN; german (and other?) users have =
to change the decimal-point to komma in loader-files!!!)=20
2.  EXECUTE SDO_MIGRATE.TO_CURRENT('POLYGONS','GEOM');
3. Create spatial index:
    CREATE INDEX "MAP1"."SPINDEX"=20
    ON "MAP1"."POLYGONS"  ("GEOM") INDEXTYPE IS=20
    MDSYS.SPATIAL_INDEX PARAMETERS (' SDO_INDX_DIMS=3D2=20
    LAYER_GTYPE=3D"COLLECTION"');
Than my map runs for polygon, line and point without using a projection =
and without using a SRID.
(I really need no projection, because I work in a local area)

Regards
Henrik Wilsdorf


  ----- Original Message -----=20
  From: Fran=E7ois-Xavier Prunayre=20
  To: Fernando S. ; Henrik Wilsdorf ; mapserver-users at lists.gis.umn.edu=20
  Sent: Thursday, February 26, 2004 4:16 PM
  Subject: Re: [Mapserver-users] Empty Map with Oracle spatial - =
SDO_GTYPE


  Hi, if you are using OGR connection it works with SDO_GTYPE =3D 300x.=20
  When you load shapefile or mapinfo tab using ogr2ogr in oracle =
spatial, it create 3D geom.
  Try to add SRID information in your mapfile as Nicolas said previously =
?=20

  Francois
    ----- Original Message -----=20
    From: Fernando S.=20
    To: Henrik Wilsdorf ; mapserver-users at lists.gis.umn.edu=20
    Sent: Thursday, February 26, 2004 3:54 PM
    Subject: Re: [Mapserver-users] Empty Map with Oracle spatial


    Hi Henrik
        I don't know if I can  help you, but I will try.
        Did you import the data to OracleSpatial from shapefile? If yes, =
did you execute this command in sqlplus?    (EXECUTE =
SDO_MIGRATE.TO_CURRENT('TABLE','GEOMETRY_COLUMN');
        If you execute your CGI passing layer=3Dpoints, what it happens? =
Can you see an image?
            =
http://willi1/scripts/mapserv.exe?map=3D/data/projects/spatial1/testora1.=
map&mode=3Dmap&layers=3Dpoints
        Try to define one layer with status default and others with =
status off , I don't know if import, just try.
        Well, look the SDO_GTYPE in your databate. It's report type =
3003.  Three-dimensional polygon, I don't know if mapserv show this =
type. Try to pass this type to 2003 .

    =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=20
    Fernando Simon - simon at cttmar.univali.br=20
    =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=20
    DataBase Manager, Mapserver, OracleSpatial and PostGis Developer=20
    G10 - Laborat=F3rio de Computa=E7=E3o Aplicada=20
    Fone: 047 - 341 7960=20
    http://g10.cttmar.univali.br
    =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=20

    Henrik Wilsdorf wrote:=20
Hi, Mapserver-users!

I'm trying to get a map from Oracle Spatial 9i (9.2), but only the shape
layer=20
is visible in the image but no data (no polygon, no line, no point) from
oracle.
With the shape layers all works fine in different maps.
No other errors occure, but one in MS_ERRORFILE:
    Thu Feb 26 12:26:40 2004 - msBuildPath: Unable to access file.
*** What does it mean???
 This error comes also, when I get a correct map without oracle layers.

The Oracle connection is also o.k.
When I have an error in the tablename I get the following text:

msDrawMap(): Image handling error. Failed to draw layer named =
'polygons'.=20
msOracleSpatialLayerWhichShapes(): OracleSpatial error. ORA-00942: =
Tabelle
oder View nicht vorhanden .=20
SQL statement: SELECT rownum, GEOMETRY FROM POLYGONS1=20
WHERE SDO_FILTER( POLYGONS1.GEOMETRY,=20
MDSYS.SDO_GEOMETRY(2003, NULL, NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),
MDSYS.SDO_ORDINATE_ARRAY(-40,0,440,400) ),'querytype=3Dwindow') =3D =
'TRUE'=20

With the corrected statement I got tho following data back in SQLplus:

ROWNUM GEOMETRY(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO,
SDO_ORDINATES)
     1 SDO_GEOMETRY(3003, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 1),
SDO_ORDINATE_ARRAY(50, 260, 0, 50, 90, 0, 120, 90, 0, 120, 260, 0, 50, =
260, 0))
     2 SDO_GEOMETRY(3003, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 1),
SDO_ORDINATE_ARRAY(140, 80, 0, 340, 80, 0, 340, 150, 0, 140, 80, 0))
    =20
This should be a rectangle and a triangle. Both are also shown in the =
Oracle
spatial advisor.
The spatial data are created with autodesk Map 2004.
I use Windows 2000 / IIS 5 and the binaries Mapserver 4.0.1 (PNG + =
Oracle)
from mapserver.gis.umn.edu.

Regards

Henrik Wilsdorf
------=_NextPart_000_0010_01C3FDFF.62F66AB0
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><TITLE></TITLE>
<META http-equiv=3DContent-Type =
content=3Dtext/html;charset=3DISO-8859-1>
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi, </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>and thanks for your help!<BR>I think, =
the only=20
problem was my spatial data. With 2-dimensional data (i.e. SDO_GTYPE =
2003) it=20
runs fine.<BR>The new (running) data I&nbsp;have created =
with:<BR>1.&nbsp;=20
shp2sdo.exe (newest version from OTN; german (and other?)&nbsp;users =
have to=20
change the&nbsp;decimal-point to komma in =
loader-files!!!)&nbsp;<BR>2.&nbsp;=20
EXECUTE SDO_MIGRATE.TO_CURRENT('POLYGONS','GEOM');</FONT></DIV>
<DIV>
<DIV><FONT face=3DArial size=3D2>3. Create spatial index:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; CREATE INDEX=20
"MAP1"."SPINDEX"&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;ON =
"MAP1"."POLYGONS"&nbsp;=20
("GEOM") INDEXTYPE =
IS&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;MDSYS.SPATIAL_INDEX=20
PARAMETERS (' SDO_INDX_DIMS=3D2 <BR>&nbsp;&nbsp;&nbsp;=20
LAYER_GTYPE=3D"COLLECTION"');</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Than my map&nbsp;runs for polygon, line =
and=20
point&nbsp;without using a projection and without using a =
SRID.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>(I really need no projection, because I =
work in a=20
local&nbsp;area)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Regards</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Henrik Wilsdorf</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV></DIV>
<BLOCKQUOTE=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=3Dfx.prunayre at oieau.fr=20
  href=3D"mailto:fx.prunayre at oieau.fr">Fran=E7ois-Xavier Prunayre</A> =
</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A =
title=3Dsimon at inf.univali.br=20
  href=3D"mailto:simon at inf.univali.br">Fernando S.</A> ; <A=20
  title=3DH.Wilsdorf at gmx.net href=3D"mailto:H.Wilsdorf at gmx.net">Henrik =
Wilsdorf</A>=20
  ; <A 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> Thursday, February 26, =
2004 4:16=20
  PM</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> Re: [Mapserver-users] =
Empty Map=20
  with Oracle spatial - SDO_GTYPE</DIV>
  <DIV><FONT face=3DArial size=3D2></FONT><BR></DIV>
  <DIV><FONT face=3DArial size=3D2>Hi, if you are using OGR connection =
it works with=20
  SDO_GTYPE =3D 300x. </FONT></DIV>
  <DIV><FONT face=3DArial size=3D2>When you load shapefile or mapinfo =
tab using=20
  ogr2ogr in oracle spatial, it create 3D geom.</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2>Try to add SRID information in your =
mapfile as=20
  Nicolas said previously&nbsp;? </FONT></DIV>
  <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>Francois</FONT></DIV>
  <BLOCKQUOTE=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=3Dsimon at inf.univali.br =
href=3D"mailto:simon at inf.univali.br">Fernando=20
    S.</A> </DIV>
    <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A =
title=3DH.Wilsdorf at gmx.net=20
    href=3D"mailto:H.Wilsdorf at gmx.net">Henrik Wilsdorf</A> ; <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> Thursday, February 26, =
2004 3:54=20
    PM</DIV>
    <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> Re: =
[Mapserver-users] Empty=20
    Map with Oracle spatial</DIV>
    <DIV><FONT face=3DArial size=3D2></FONT><FONT face=3DArial =
size=3D2></FONT><FONT=20
    face=3DArial size=3D2></FONT><FONT face=3DArial =
size=3D2></FONT><BR></DIV><FONT=20
    face=3D"Helvetica, Arial, sans-serif">Hi =
Henrik<BR>&nbsp;&nbsp;&nbsp; I don't=20
    know if I can&nbsp; help you, but I will try.<BR>&nbsp;&nbsp;&nbsp; =
Did you=20
    import the data to OracleSpatial from shapefile? If yes, did you =
execute=20
    this command in sqlplus?&nbsp;&nbsp;&nbsp; (EXECUTE=20
    =
SDO_MIGRATE.TO_CURRENT('TABLE','GEOMETRY_COLUMN');<BR>&nbsp;&nbsp;&nbsp; =
If=20
    you execute your CGI passing layer=3Dpoints, what it happens? Can =
you see an=20
    image?<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <A=20
    class=3Dmoz-txt-link-freetext=20
    =
href=3D"http://willi1/scripts/mapserv.exe?map=3D/data/projects/spatial1/t=
estora1.map&amp;mode=3Dmap&amp;layers=3Dpoints">http://willi1/scripts/map=
serv.exe?map=3D/data/projects/spatial1/testora1.map&amp;mode=3Dmap&amp;la=
yers=3Dpoints</A><BR>&nbsp;&nbsp;&nbsp;=20
    Try to define one layer with status default and others with status =
off , I=20
    don't know if import, just try.<BR>&nbsp;&nbsp;&nbsp; Well, look the =

    SDO_GTYPE in your databate. It's report type 3003.&nbsp; =
Three-dimensional=20
    polygon, I don't know if mapserv show this type. Try to pass this =
type to=20
    2003=20
    =
.<BR><BR>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=20
    <BR>Fernando Simon - <A class=3Dmoz-txt-link-abbreviated=20
    href=3D"mailto:simon at cttmar.univali.br">simon at cttmar.univali.br</A>=20
    =
<BR>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=20
    <BR>DataBase Manager, Mapserver, OracleSpatial and PostGis Developer =
<BR>G10=20
    - Laborat=F3rio de Computa=E7=E3o Aplicada <BR>Fone: 047 - 341 7960 =
<BR><A=20
    class=3Dmoz-txt-link-freetext=20
    =
href=3D"http://g10.cttmar.univali.br">http://g10.cttmar.univali.br</A><BR=
>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D</FONT>=20
    <BR><BR>Henrik Wilsdorf wrote:=20
    <BLOCKQUOTE cite=3Dmid12090.1077801762 at www38.gmx.net =
type=3D"cite"><PRE wrap=3D"">Hi, Mapserver-users!

I'm trying to get a map from Oracle Spatial 9i (9.2), but only the shape
layer=20
is visible in the image but no data (no polygon, no line, no point) from
oracle.
With the shape layers all works fine in different maps.
No other errors occure, but one in MS_ERRORFILE:
    Thu Feb 26 12:26:40 2004 - msBuildPath: Unable to access file.
*** What does it mean???
 This error comes also, when I get a correct map without oracle layers.

The Oracle connection is also o.k.
When I have an error in the tablename I get the following text:

msDrawMap(): Image handling error. Failed to draw layer named =
'polygons'.=20
msOracleSpatialLayerWhichShapes(): OracleSpatial error. ORA-00942: =
Tabelle
oder View nicht vorhanden .=20
SQL statement: SELECT rownum, GEOMETRY FROM POLYGONS1=20
WHERE SDO_FILTER( POLYGONS1.GEOMETRY,=20
MDSYS.SDO_GEOMETRY(2003, NULL, NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),
MDSYS.SDO_ORDINATE_ARRAY(-40,0,440,400) ),'querytype=3Dwindow') =3D =
'TRUE'=20

With the corrected statement I got tho following data back in SQLplus:

ROWNUM GEOMETRY(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO,
SDO_ORDINATES)
     1 SDO_GEOMETRY(3003, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 1),
SDO_ORDINATE_ARRAY(50, 260, 0, 50, 90, 0, 120, 90, 0, 120, 260, 0, 50, =
260, 0))
     2 SDO_GEOMETRY(3003, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 1),
SDO_ORDINATE_ARRAY(140, 80, 0, 340, 80, 0, 340, 150, 0, 140, 80, 0))
    =20
This should be a rectangle and a triangle. Both are also shown in the =
Oracle
spatial advisor.
The spatial data are created with autodesk Map 2004.
I use Windows 2000 / IIS 5 and the binaries Mapserver 4.0.1 (PNG + =
Oracle)
from mapserver.gis.umn.edu.

Regards

Henrik =
Wilsdorf</PRE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0010_01C3FDFF.62F66AB0--




More information about the mapserver-users mailing list