[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, [...]) )

Julien Collaer JC at sodiplan.be
Fri Jul 31 08:14:32 EDT 2009


Hello Pano,

 

Thanks for the idea, it wasn't done yet !

I've just executed the validate_layer_with_context verification Oracle function and my geometries are ok (the result table is empty for the circular / problematics geometries).

 

But some of the others geometries (correctly rendered by Mapserver) are presenting some errors (only some 13367 - vertex in wrong order)...

 

Thanks,

 

Julien Collaer

 

De : Pano Voudouris [mailto:pvoudouris at gaiocorp.com] 
Envoyé : vendredi 31 juillet 2009 10:50
À : Julien Collaer; mapserver-users at lists.osgeo.org
Objet : 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, [...]) )

 

Julien,

I know you said you verified the geometries by Mapviewer but have you tried the sdo_validate layer routine? Just to be sure...

 

Example from the manual:

 

-- Is a layer valid? (First, create the result table.)

CREATE TABLE val_results (sdo_rowid ROWID, result varchar2(1000));

-- (Next statement must be on one command line.)

CALL SDO_GEOM.VALIDATE_LAYER_WITH_CONTEXT('COLA_MARKETS','SHAPE','VAL_RESULTS');

Call completed.

SQL> SELECT * from val_results;

SDO_ROWID

------------------

RESULT

--------------------------------------------------------------------------------

Rows Processed <12>

AAABXNAABAAAK+YAAC

13349 [Element <1>] [Ring <1>][Edge <1>][Edge <3>]

 

 

Cheers,

Pano

 

From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Julien Collaer
Sent: 30 July 2009 18:38
To: Bob Basques; mapserver-users at lists.osgeo.org
Subject: 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, [...]) )

 

Hello Bob,

thanks for your fast response.

These geometries are generated by Oracle : SDO_Buffer function on multipoints geometries.

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 :

MDSYS.SDO_GEOMETRY(2007,26273,null,
MDSYS.SDO_ELEM_INFO_ARRAY(
1,1003,2,
11,1003,2,
21,1003,2),
MDSYS.SDO_ORDINATE_ARRAY(

--Geom 1 :
83933,            89879.010577196,
83936.989422804,  89883,
83933,            89886.989422804,
83929.010577196,  89883,
83933,            89879.010577196,

--Geom 2 :
83345,            89445.010577196,
83348.989422804,  89449,
83345,            89452.989422804,
83341.010577196,  89449,
83345,            89445.010577196,

--Geom 3 :
82793,            89490.010577196,
82796.989422804,  89494,
82793,            89497.989422804,
82789.010577196,  89494,
82793,            89490.010577196
))

So i suppose that the problem must be something else.

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.

Thanks,

Julien Collaer


-------- Message d'origine--------
De: Bob Basques [mailto:Bob.Basques at ci.stpaul.mn.us]
Date: jeu. 30/07/2009 16:57
À: Julien Collaer
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, [...]) )

Julien,

Looking at the SDO description in the Oracle MAN for . . .


-----------
1003 or 2003     2

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.

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.
-----------


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 . . .

bobb

+

>>> "Julien Collaer" <JC at sodiplan.be> wrote:


Hello list,

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).
Everything is working fine except for some geometries : multipolygons with interpretation 2 (vertex connected by arcs).

Here is an example of such geometry :
MDSYS.SDO_GEOMETRY(2007,26273,null,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,2,11,1003,2,21,1003,2),
MDSYS.SDO_ORDINATE_ARRAY(83933,89879.010577196,
83936.989422804,89883,
83933,89886.989422804,
83929.010577196,89883,

83933,89879.010577196,
83345,89445.010577196,

83348.989422804,89449,
83345,89452.989422804,

83341.010577196,89449,
83345,89445.010577196,

82793,89490.010577196,
82796.989422804,89494,

82793,89497.989422804,
82789.010577196,89494,

82793,89490.010577196))
The layer is rendered but no feature are displayed.

The geomtries are correct (verified with the Oracle MapViewer).

If someone knows a solution for this case it will be very useful...

Thanks in advance,

Julien Collaer

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090731/fc7d40ec/attachment.html


More information about the mapserver-users mailing list