[Mapserver-users] Unable to display data stored in Oracle Spatial
Fernando S.
simon at inf.univali.br
Thu Mar 18 09:45:09 PST 2004
This is a multi-part message in MIME format.
--------------040103000208020308010306
Content-Type: text/plain; charset=ISO-8859-2; format=flowed
Content-Transfer-Encoding: 8bit
Jiri,
I believe that you need a quickly report. Well, if you execute a CGI
call to mapserv, what's happen? Can you see any image with db data?
Try to execute the same query in SQLPLUS, SELECT BOUNDARY FROM
PARCELS. What the sqplus report? Can you report one complete line that
sql report? Like this:
SQL> select shape from cola_markets;
SHAPE(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES)
--------------------------------------------------------------------------------
SDO_GEOMETRY(2003, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 3),
SDO_ORDINATE_ARR
AY(1, 1, 5, 7))
What kind of geometry report? 2003?, 3003? If it's report 300X, this
is the problem, when you import the data using loader, it import with
type 300X (if you have this type of shape), the mapserv can't show this
type. Only 100x or 200x.
When you convert your shape to sdo, what command you execute? I use
this ( I didn't use SRID in this example):
shp2sdo.exe -o <SHAPE> <TABLE> -g <GEOMETRY_COLUMNS> -d -x
(-180,180) -y (-90,90) -v
And after don't forget to execute this function (select
sdo_tune.extent_of('table with geometry_column', 'geometry_columns')
from dual;)
Well, here we developer one project tha use all of informations,
(user datas, shapes, user points) from Oracle. Look in this link
(http://g10novo.cttmar.univali.br/gtznovo/principal.php).
If you need some help, you can report me.
==================================================================
Fernando Simon - simon at cttmar.univali.br <mailto:simon at cttmar.univali.br>
==================================================================
DataBase Manager, Mapserver, OracleSpatial and PostGis Developer
G10 - Laboratório de Computaça~o Aplicada
Fone: 047 - 341 7960
http://g10.cttmar.univali.br
==================================================================
Jiri Potocny wrote:
>Fernando,
>
>thank you for your hints.
>
>I used Oracle SQL loader utility to import the data:
>SQLLDR uid/pwd at srvcname control=parcely log=parcely.log
>The data were stored in comma separated value text file in the format like
>this:
>4|777777||"1"|1|3007|
>|pt||||1|1003|1|;-554984,87|-1285550,04|0|-554998,75|-1285529,3200000001|0|-
>555001,98999999999|-1285530,8100000001|0|-554984,87|-1285550,04|0|:1|02/13/2
>004 00:00:00||
>
>Anyway, I tried to execute SDO_MIGRATE.TO_CURRENT(' TABLE ','
>GEOMETRY_COLUMN '), but the problem remains.
>
>Regards,
>Jirka
>
>P.S. Your English is perfect enough for this purposes, no need to
>appologize.
>
>----- Original Message -----
>From: Fernando S.
>To: Jiri Potocny ; mapserver-users at lists.gis.umn.edu
>Sent: Wednesday, March 17, 2004 6:12 PM
>Subject: Re: [Mapserver-users] Unable to display data stored in Oracle
>Spatial
>
>
>Hi Jiri,
> I don't know if I can help you. But I will try.
> I need to do some questions to help you:
> How you imported the data to Oracle?
> Using shp2sdo? If yes, after you imported the data, did you execute
>this function:
> SDO_MIGRATE.TO_CURRENT(' TABLE ',' GEOMETRY_COLUMN ');
> If you create a table with geometry columns, and populate it, and
>try show it in the mapserv? It appeared in the image?
>
> I don't know if I help you, sorry my poor english.
> If you need some help, you can report me.
>
>==================================================================
>Fernando Simon - simon at cttmar.univali.br
>==================================================================
>DataBase Manager, Mapserver, OracleSpatial and PostGis Developer
>G10 - Laboratório de Computaçao Aplicada
>Fone: 047 - 341 7960
>http://g10.cttmar.univali.br
>==================================================================
>
>Jiri Potocny wrote:
>Dear MapServer experts,
>
>could you please help me with following problem?
>
>I'm trying to display data strored in Oracle Spatial, but I allways get a
>blank map.
>The map file is as follows:
>
>MAP
> IMAGETYPE PNG
> EXTENT -551051 -1288960 -548185 -1286773
> SIZE 800 600
> IMAGECOLOR 255 255 255
>
> LAYER
> NAME parcels
> DUMP TRUE
> STATUS DEFAULT
> TYPE POLYGON
>
> CONNECTIONTYPE oraclespatial
> CONNECTION username/password at netservisname
> DATA "BOUNDARY FROM PARCELS"
>
> CLASS
> COLOR 232 232 232
> OUTLINECOLOR 32 32 32
> END
> END
>
>END
>
>If I export the data from oracle into the shapefile and use following map
>file, everything is O.K.
>
>MAP
> IMAGETYPE PNG
> EXTENT -551051 -1288960 -548185 -1286773
> SIZE 800 600
> SHAPEPATH "data"
> IMAGECOLOR 255 255 255
>
> LAYER
> NAME parcely
> DUMP TRUE
> STATUS DEFAULT
> TYPE POLYGON
> DATA PARCELS
>
> CLASS
> COLOR 232 232 232
> OUTLINECOLOR 32 32 32
> END
> END
>
>END
>
>The only difference is in the data source, the data (attributes as well as
>geometries) are the same. I'm running MapServer 4.0.1 with Oracle Spatial
>support (downloaded from
>http://hypnos.cbs.umn.edu/projects/downloads/ms401_png_oracle.zip) and
>Oracle Database Server version 9.2.0.1.0 on Windows 2000 Professional SP 3.
>
>Could anybody get throught this problem.
>
>Much appreciated,
>Jirka
>
>_______________________________________________
>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
>
>
>
--------------040103000208020308010306
Content-Type: text/html; charset=ISO-8859-2
Content-Transfer-Encoding: 8bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-2" http-equiv="Content-Type">
<title></title>
</head>
<body>
Jiri,<br>
I believe that you need a quickly report. Well, if you execute a
CGI call to mapserv, what's happen? Can you see any image with db data?<br>
Try to execute the same query in SQLPLUS, SELECT BOUNDARY FROM
PARCELS. What the sqplus report? Can you report one complete line that
sql report? Like this: <br>
<br>
SQL> select shape from cola_markets;<br>
<br>
SHAPE(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO,
SDO_ORDINATES)<br>
--------------------------------------------------------------------------------<br>
SDO_GEOMETRY(2003, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 3),
SDO_ORDINATE_ARR<br>
AY(1, 1, 5, 7))<br>
<br>
What kind of geometry report? 2003?, 3003? If it's report 300X,
this is the problem, when you import the data using loader, it import
with type 300X (if you have this type of shape), the mapserv can't show
this type. Only 100x or 200x.<br>
When you convert your shape to sdo, what command you execute? I
use this ( I didn't use SRID in this example): <br>
shp2sdo.exe -o <SHAPE> <TABLE> -g
<GEOMETRY_COLUMNS> -d -x (-180,180) -y (-90,90) -v<br>
And after don't forget to execute this function (select
sdo_tune.extent_of('table with geometry_column', 'geometry_columns')
from dual;) <br>
<br>
Well, here we developer one project tha use all of informations,
(user datas, shapes, user points) from Oracle. Look in this link (<a
class="moz-txt-link-freetext"
href="http://g10novo.cttmar.univali.br/gtznovo/principal.php">http://g10novo.cttmar.univali.br/gtznovo/principal.php</a>).<br>
<br>
<br>
If you need some help, you can report me.<br>
<br>
<font face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial;">==================================================================
<br>
Fernando Simon - <a href="mailto:simon at cttmar.univali.br">simon at cttmar.univali.br</a>
<br>
================================================================== <br>
DataBase Manager, Mapserver, OracleSpatial and PostGis Developer <br>
G10 - Laboratório de Computação Aplicada <br>
Fone: 047 - 341 7960 <br>
<a href="http://g10.cttmar.univali.br">http://g10.cttmar.univali.br</a>
<br>
==================================================================</span></font><br>
<br>
Jiri Potocny wrote:
<blockquote cite="mid00d901c40cec$c7869e40$bc03a8c0 at twoflower"
type="cite">
<pre wrap="">Fernando,
thank you for your hints.
I used Oracle SQL loader utility to import the data:
SQLLDR uid/pwd at srvcname control=parcely log=parcely.log
The data were stored in comma separated value text file in the format like
this:
4|777777||"1"|1|3007|
|pt||||1|1003|1|;-554984,87|-1285550,04|0|-554998,75|-1285529,3200000001|0|-
555001,98999999999|-1285530,8100000001|0|-554984,87|-1285550,04|0|:1|02/13/2
004 00:00:00||
Anyway, I tried to execute SDO_MIGRATE.TO_CURRENT(' TABLE ','
GEOMETRY_COLUMN '), but the problem remains.
Regards,
Jirka
P.S. Your English is perfect enough for this purposes, no need to
appologize.
----- Original Message -----
From: Fernando S.
To: Jiri Potocny ; <a class="moz-txt-link-abbreviated" href="mailto:mapserver-users at lists.gis.umn.edu">mapserver-users at lists.gis.umn.edu</a>
Sent: Wednesday, March 17, 2004 6:12 PM
Subject: Re: [Mapserver-users] Unable to display data stored in Oracle
Spatial
Hi Jiri,
I don't know if I can help you. But I will try.
I need to do some questions to help you:
How you imported the data to Oracle?
Using shp2sdo? If yes, after you imported the data, did you execute
this function:
SDO_MIGRATE.TO_CURRENT(' TABLE ',' GEOMETRY_COLUMN ');
If you create a table with geometry columns, and populate it, and
try show it in the mapserv? It appeared in the image?
I don't know if I help you, sorry my poor english.
If you need some help, you can report me.
==================================================================
Fernando Simon - <a class="moz-txt-link-abbreviated" href="mailto:simon at cttmar.univali.br">simon at cttmar.univali.br</a>
==================================================================
DataBase Manager, Mapserver, OracleSpatial and PostGis Developer
G10 - Laboratório de Computaçao Aplicada
Fone: 047 - 341 7960
<a class="moz-txt-link-freetext" href="http://g10.cttmar.univali.br">http://g10.cttmar.univali.br</a>
==================================================================
Jiri Potocny wrote:
Dear MapServer experts,
could you please help me with following problem?
I'm trying to display data strored in Oracle Spatial, but I allways get a
blank map.
The map file is as follows:
MAP
IMAGETYPE PNG
EXTENT -551051 -1288960 -548185 -1286773
SIZE 800 600
IMAGECOLOR 255 255 255
LAYER
NAME parcels
DUMP TRUE
STATUS DEFAULT
TYPE POLYGON
CONNECTIONTYPE oraclespatial
CONNECTION username/password at netservisname
DATA "BOUNDARY FROM PARCELS"
CLASS
COLOR 232 232 232
OUTLINECOLOR 32 32 32
END
END
END
If I export the data from oracle into the shapefile and use following map
file, everything is O.K.
MAP
IMAGETYPE PNG
EXTENT -551051 -1288960 -548185 -1286773
SIZE 800 600
SHAPEPATH "data"
IMAGECOLOR 255 255 255
LAYER
NAME parcely
DUMP TRUE
STATUS DEFAULT
TYPE POLYGON
DATA PARCELS
CLASS
COLOR 232 232 232
OUTLINECOLOR 32 32 32
END
END
END
The only difference is in the data source, the data (attributes as well as
geometries) are the same. I'm running MapServer 4.0.1 with Oracle Spatial
support (downloaded from
<a class="moz-txt-link-freetext" href="http://hypnos.cbs.umn.edu/projects/downloads/ms401_png_oracle.zip">http://hypnos.cbs.umn.edu/projects/downloads/ms401_png_oracle.zip</a>) and
Oracle Database Server version 9.2.0.1.0 on Windows 2000 Professional SP 3.
Could anybody get throught this problem.
Much appreciated,
Jirka
_______________________________________________
Mapserver-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Mapserver-users at lists.gis.umn.edu">Mapserver-users at lists.gis.umn.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.gis.umn.edu/mailman/listinfo/mapserver-users">http://lists.gis.umn.edu/mailman/listinfo/mapserver-users</a>
_______________________________________________
Mapserver-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Mapserver-users at lists.gis.umn.edu">Mapserver-users at lists.gis.umn.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.gis.umn.edu/mailman/listinfo/mapserver-users">http://lists.gis.umn.edu/mailman/listinfo/mapserver-users</a>
</pre>
</blockquote>
<br>
</body>
</html>
--------------040103000208020308010306--
More information about the MapServer-users
mailing list