[Mapserver-users] Empty Map with Oracle spatial - SDO_GTYPE
François-Xavier Prunayre
fx.prunayre at oieau.fr
Thu Feb 26 07:16:51 PST 2004
This is a multi-part message in MIME format.
------=_NextPart_000_0053_01C3FC83.F144A930
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
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('TA=
BLE','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/t=
estora1.map&mode=3Dmap&layers=3Dpoints
Try to define one layer with status default and others with status of=
f , I don't know if import, just try.
Well, look the SDO_GTYPE in your databate. It's report type 3003. Th=
ree-dimensional polygon, I don't know if mapserv show this type. Try to pas=
s 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=20=20=20=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.
The address I used in
IE6:
http://willi1/scripts/mapserv.exe?map=3D/data/projects/spatial1/testora1.ma=
p&mode=3Dmap
My Mapfile:
MAP
NAME "testora1"
STATUS ON
EXTENT 0 0 400 400=20
SIZE 600 500=20
SHAPEPATH "data"
SYMBOLSET "etc/symbols.sym"
FONTSET "etc/fonts.txt"
IMAGETYPE PNG
IMAGECOLOR 255 255 200
UNITS METERS
WEB
IMAGEPATH "/data/tmp/"
IMAGEURL "/tmp/"
LOG "/data/log/mslog.txt"
END
=20=20
LAYER
NAME "polygonshape"
STATUS DEFAULT
DATA "polygonshape"
TYPE POLYGON
CLASS
STYLE
COLOR 200 200 100
OUTLINECOLOR 1 1 1
END
END
END
=20=20
LAYER
NAME "polygons"
STATUS DEFAULT
DATA "GEOMETRY FROM POLYGONS"
TYPE POLYGON
CONNECTIONTYPE ORACLESPATIAL
CONNECTION "map1/abc at willi1"
CLASS
STYLE
COLOR 0 128 128
OUTLINECOLOR 1 1 1
END
END
END
LAYER
NAME "polylines"
STATUS DEFAULT
DATA "GEOMETRY FROM POLYLINES"
TYPE LINE
CONNECTIONTYPE ORACLESPATIAL
CONNECTION "map1/abc at willi1"
CLASS
STYLE
COLOR 0 0 255
SIZE 50
END
END
END
=20=20
LAYER
NAME "points"
STATUS DEFAULT
DATA "GEOMETRY FROM POINTS"
TYPE POINT
CONNECTIONTYPE ORACLESPATIAL
CONNECTION "map1/abc at willi1"
CLASS
STYLE
SYMBOL 13
COLOR 1 1 1
SIZE 50
END
END
END
=20=20=20
END
----------------
Waiting for some help.
Regards
Henrik Wilsdorf
=20=20
--=20
Ce message a ete verifie par MailScanner pour des virus ou des polluriels=
et rien de suspect n'a ete trouve.=20
Les donnees et renseignements contenus dans ce message sont personnels, c=
onfidentiels et secrets.Toute publication, utilisation ou diffusion, meme p=
artielle, doit etre autorisee.=20
Any data and information contained in this electronic mail is personal, c=
onfidential and secret. Any total or partial publication, use or distributi=
on must be authorized.=20
--=20
Ce message a ete verifie par MailScanner pour des virus ou des polluriels e=
t rien de suspect n'a ete trouve.
Les donnees et renseignements contenus dans ce message sont personnels, con=
fidentiels et secrets.Toute publication, utilisation ou diffusion, meme par=
tielle, doit etre autorisee.
Any data and information contained in this electronic mail is personal, con=
fidential and secret. Any total or partial publication, use or distribution=
must be authorized.
------=_NextPart_000_0053_01C3FC83.F144A930
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, if you are using OGR connection it wor=
ks with=20
SDO_GTYPE =3D 300x. </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>When you load shapefile or mapinfo tab usi=
ng=20
ogr2ogr in oracle spatial, it create 3D geom.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Try to add SRID information in your mapfil=
e as=20
Nicolas said previously ? </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Francois</FONT></DIV>
<BLOCKQUOTE=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LE=
FT: #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>Fro=
m:</B>=20
<A title=3Dsimon at inf.univali.br href=3D"mailto:simon at inf.univali.br">Fern=
ando=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] Emp=
ty Map=20
with Oracle spatial</DIV>
<DIV><FONT face=3DArial size=3D2></FONT><FONT face=3DArial=20
size=3D2></FONT><BR></DIV><FONT face=3D"Helvetica, Arial, sans-serif">Hi=
=20
Henrik<BR> I don't know if I can help you, but I =
will=20
try.<BR> Did you import the data to OracleSpatial from=
=20
shapefile? If yes, did you execute this command in sqlplus? &n=
bsp;=20
(EXECUTE=20
SDO_MIGRATE.TO_CURRENT('TABLE','GEOMETRY_COLUMN');<BR> =
If=20
you execute your CGI passing layer=3Dpoints, what it happens? Can you see=
an=20
image?<BR> <A=20
class=3Dmoz-txt-link-freetext=20
href=3D"http://willi1/scripts/mapserv.exe?map=3D/data/projects/spatial1/t=
estora1.map&mode=3Dmap&layers=3Dpoints">http://willi1/scripts/mapse=
rv.exe?map=3D/data/projects/spatial1/testora1.map&mode=3Dmap&layers=
=3Dpoints</A><BR> =20
Try to define one layer with status default and others with status off , =
I=20
don't know if import, just try.<BR> Well, look the SDO_=
GTYPE=20
in your databate. It's report type 3003. Three-dimensional polygon,=
I=20
don't know if mapserv show this type. Try to pass this type to 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 w=
rap=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=20=20=20=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.
The address I used in
IE6:
<A class=3Dmoz-txt-link-freetext href=3D"http://willi1/scripts/mapserv.exe?=
map=3D/data/projects/spatial1/testora1.map&mode=3Dmap">http://willi1/sc=
ripts/mapserv.exe?map=3D/data/projects/spatial1/testora1.map&mode=3Dmap=
</A>
My Mapfile:
MAP
NAME "testora1"
STATUS ON
EXTENT 0 0 400 400=20
SIZE 600 500=20
SHAPEPATH "data"
SYMBOLSET "etc/symbols.sym"
FONTSET "etc/fonts.txt"
IMAGETYPE PNG
IMAGECOLOR 255 255 200
UNITS METERS
WEB
IMAGEPATH "/data/tmp/"
IMAGEURL "/tmp/"
LOG "/data/log/mslog.txt"
END
=20=20
LAYER
NAME "polygonshape"
STATUS DEFAULT
DATA "polygonshape"
TYPE POLYGON
CLASS
STYLE
COLOR 200 200 100
OUTLINECOLOR 1 1 1
END
END
END
=20=20
LAYER
NAME "polygons"
STATUS DEFAULT
DATA "GEOMETRY FROM POLYGONS"
TYPE POLYGON
CONNECTIONTYPE ORACLESPATIAL
CONNECTION "map1/abc at willi1"
CLASS
STYLE
COLOR 0 128 128
OUTLINECOLOR 1 1 1
END
END
END
LAYER
NAME "polylines"
STATUS DEFAULT
DATA "GEOMETRY FROM POLYLINES"
TYPE LINE
CONNECTIONTYPE ORACLESPATIAL
CONNECTION "map1/abc at willi1"
CLASS
STYLE
COLOR 0 0 255
SIZE 50
END
END
END
=20=20
LAYER
NAME "points"
STATUS DEFAULT
DATA "GEOMETRY FROM POINTS"
TYPE POINT
CONNECTIONTYPE ORACLESPATIAL
CONNECTION "map1/abc at willi1"
CLASS
STYLE
SYMBOL 13
COLOR 1 1 1
SIZE 50
END
END
END
=20=20=20
END
----------------
Waiting for some help.
Regards
Henrik Wilsdorf
</PRE></BLOCKQUOTE><BR><BR>-- <BR>Ce message a ete verifie par <A=20
href=3D"http://www.mailscanner.info/"><B>MailScanner</B></A> pour des vir=
us ou=20
des polluriels et rien de suspect n'a ete trouve.=20
<DIV><FONT face=3D3DArial size=3D3></FONT> </DIV>Les donnees et=20
renseignements contenus dans ce message sont personnels, confidentiels et=
=20
secrets.Toute publication, utilisation ou diffusion, meme partielle, doit=
etre=20
autorisee.=20
<DIV><FONT face=3D3DArial size=3D3></FONT> </DIV>Any data and inform=
ation=20
contained in this electronic mail is personal, confidential and secret. A=
ny=20
total or partial publication, use or distribution must be authorized.=20
</BLOCKQUOTE></BODY><br />--=20
<br />Ce message a ete verifie par <a href=3D"http://www.mailscanner.info/"=
><b>MailScanner</b></a>
pour des virus ou des polluriels et rien de suspect n'a ete trouve.
<DIV><FONT face=3D3DArial size=3D3D2></FONT> </DIV>
Les donnees et renseignements contenus dans ce message sont personnels, con=
fidentiels et secrets.Toute publication, utilisation ou diffusion, meme par=
tielle, doit etre autorisee.
<DIV><FONT face=3D3DArial size=3D3D2></FONT> </DIV>
Any data and information contained in this electronic mail is personal, con=
fidential and secret. Any total or partial publication, use or distribution=
must be authorized.
</HTML>
------=_NextPart_000_0053_01C3FC83.F144A930--
More information about the MapServer-users
mailing list