<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<title>RE : [mapserver-users] Impossible to draw SDO Geometries
fromOraclewhen SDO_GTYPE is 2007 and the interpretation is2(connectivity by
arcs : SDO_ELEM_INFO(1, 1003, 2, [...]) )</title>
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Courier;
        panose-1:2 7 4 9 2 2 5 2 4 4;}
@font-face
        {font-family:Courier;
        panose-1:2 7 4 9 2 2 5 2 4 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Tahoma","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Tahoma","sans-serif";
color:#1F497D'>Julien,<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Tahoma","sans-serif";
color:#1F497D'>I know you said you verified the geometries by Mapviewer but
have you tried the sdo_validate layer routine? Just to be sure...<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Tahoma","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Tahoma","sans-serif";
color:#1F497D'>Example from the manual:<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Tahoma","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:9.0pt;
font-family:Courier'>-- Is a layer valid? (First, create the result table.)<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:9.0pt;
font-family:Courier'>CREATE TABLE val_results (sdo_rowid ROWID, result
varchar2(1000));<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:9.0pt;
font-family:Courier'>-- (Next statement must be on one command line.)<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:9.0pt;
font-family:Courier'>CALL SDO_GEOM.VALIDATE_LAYER_WITH_CONTEXT('COLA_MARKETS','SHAPE','VAL_RESULTS');<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:9.0pt;
font-family:Courier'>Call completed.<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:9.0pt;
font-family:Courier'>SQL> SELECT * from val_results;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:9.0pt;
font-family:Courier'>SDO_ROWID<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:9.0pt;
font-family:Courier'>------------------<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:9.0pt;
font-family:Courier'>RESULT<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:9.0pt;
font-family:Courier'>--------------------------------------------------------------------------------<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:9.0pt;
font-family:Courier'>Rows Processed <12><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:9.0pt;
font-family:Courier'>AAABXNAABAAAK+YAAC<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:9.0pt;font-family:Courier'>13349
[Element <1>] [Ring <1>][Edge <1>][Edge <3>]</span><span
lang=EN-GB style='font-size:9.0pt;font-family:"Tahoma","sans-serif";color:#1F497D'><o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Tahoma","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Tahoma","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Tahoma","sans-serif";
color:#1F497D'>Cheers,<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Tahoma","sans-serif";
color:#1F497D'>Pano<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Tahoma","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<div>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal style='margin-left:36.0pt'><b><span style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'> mapserver-users-bounces@lists.osgeo.org
[mailto:mapserver-users-bounces@lists.osgeo.org] <b>On Behalf Of </b>Julien
Collaer<br>
<b>Sent:</b> 30 July 2009 18:38<br>
<b>To:</b> Bob Basques; mapserver-users@lists.osgeo.org<br>
<b>Subject:</b> RE : [mapserver-users] Impossible to draw SDO Geometries
fromOraclewhen SDO_GTYPE is 2007 and the interpretation is2(connectivity by
arcs : SDO_ELEM_INFO(1, 1003, 2, [...]) )<o:p></o:p></span></p>

</div>

</div>

<p class=MsoNormal style='margin-left:36.0pt'><o:p> </o:p></p>

<p style='mso-margin-top-alt:5.0pt;margin-right:0cm;margin-bottom:12.0pt;
margin-left:36.0pt'><span style='font-size:10.0pt'>Hello Bob,<br>
<br>
thanks for your fast response.<br>
<br>
These geometries are generated by Oracle : SDO_Buffer function on multipoints
geometries.<br>
<br>
When i look to the SDO_GEOM example,there are three geometries (polygons)
composed of five points with the first point being the same of the last one :<br>
<br>
MDSYS.SDO_GEOMETRY(2007,26273,null,<br>
MDSYS.SDO_ELEM_INFO_ARRAY(<br>
1,1003,2,<br>
11,1003,2,<br>
21,1003,2),<br>
MDSYS.SDO_ORDINATE_ARRAY(<br>
<br>
--Geom 1 :<br>
83933,           
89879.010577196,<br>
83936.989422804,  89883,<br>
83933,           
89886.989422804,<br>
83929.010577196,  89883,<br>
83933,           
89879.010577196,<br>
<br>
--Geom 2 :<br>
83345,           
89445.010577196,<br>
83348.989422804,  89449,<br>
83345,            89452.989422804,<br>
83341.010577196,  89449,<br>
83345,           
89445.010577196,<br>
<br>
--Geom 3 :<br>
82793,           
89490.010577196,<br>
82796.989422804,  89494,<br>
82793,           
89497.989422804,<br>
82789.010577196,  89494,<br>
82793,           
89490.010577196<br>
))<br>
<br>
So i suppose that the problem must be something else.<br>
<br>
Other thing : If i change manually (but, of course, it's not a solution for the
production version) the interpretation of the vertex from 2 to 1 (arcs to
lines) Mapserver is able to draw the rectangles.<br>
<br>
Thanks,<br>
<br>
Julien Collaer<br>
<br>
<br>
-------- Message d'origine--------<br>
De: Bob Basques [<a href="mailto:Bob.Basques@ci.stpaul.mn.us">mailto:Bob.Basques@ci.stpaul.mn.us</a>]<br>
Date: jeu. 30/07/2009 16:57<br>
À: Julien Collaer<br>
Objet : Re: [mapserver-users] Impossible to draw SDO Geometries fromOraclewhen
SDO_GTYPE is 2007 and the interpretation is 2(connectivity by arcs :
SDO_ELEM_INFO(1, 1003, 2, [...]) )<br>
<br>
Julien,<br>
<br>
Looking at the SDO description in the Oracle MAN for . . .<br>
<br>
<br>
-----------<br>
1003 or 2003     2<br>
<br>
Polygon made up of a connected sequence of circular arcs that closes on itself.
The end point of the last arc is the same as the start point of the first arc.<br>
<br>
Each circular arc is described using three coordinates: the start point of the
arc, any point on the arc, and the end point of the arc. The coordinates for a
point designating the end of one arc and the start of the next arc are not
repeated. For example, five coordinates are used to describe a polygon made up
of two connected circular arcs. Points 1, 2, and 3 define the first arc, and
points 3, 4, and 5 define the second arc. The coordinates for points 1 and 5
must be the same (tolerance is not considered), and point 3 is not repeated.<br>
-----------<br>
<br>
<br>
It looks like the first and last points need to be the same and your record
shows different points for the first and last entries.  You may have one
extra point on the end as well (I think), or maybe you are just missing the
last point on the end . . .<br>
<br>
bobb<br>
<br>
+<br>
<br>
>>> "Julien Collaer" <JC@sodiplan.be> wrote:<br>
<br>
<br>
Hello list,<br>
<br>
I'm using Mapserver CGI 5.0.2 (and i'v tried with the 5.4.x too) to render a
layer from an Oracle Spatial database (SDO geometries).<br>
Everything is working fine except for some geometries : multipolygons with
interpretation 2 (vertex connected by arcs).<br>
<br>
Here is an example of such geometry :<br>
MDSYS.SDO_GEOMETRY(2007,26273,null,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,2,11,1003,2,21,1003,2),<br>
MDSYS.SDO_ORDINATE_ARRAY(83933,89879.010577196,<br>
83936.989422804,89883,<br>
83933,89886.989422804,<br>
83929.010577196,89883,<br>
<br>
83933,89879.010577196,<br>
83345,89445.010577196,<br>
<br>
83348.989422804,89449,<br>
83345,89452.989422804,<br>
<br>
83341.010577196,89449,<br>
83345,89445.010577196,<br>
<br>
82793,89490.010577196,<br>
82796.989422804,89494,<br>
<br>
82793,89497.989422804,<br>
82789.010577196,89494,<br>
<br>
82793,89490.010577196))<br>
The layer is rendered but no feature are displayed.<br>
<br>
The geomtries are correct (verified with the Oracle MapViewer).<br>
<br>
If someone knows a solution for this case it will be very useful...<br>
<br>
Thanks in advance,<br>
<br>
Julien Collaer<br>
<br>
</span><o:p></o:p></p>

</div>

</body>

</html>