Opened 14 years ago

Last modified 14 years ago

#618 closed defect (fixed)

multipolygon set from oraclespatial crash with OGR

Reported by: bluecarto@… Owned by: warmerdam
Priority: high Milestone:
Component: OGR_SF Version: unspecified
Severity: normal Keywords:
Cc:

Description

Using Mapserver, I'm having problems encountered when trying to render
multipolygons from oracle with OGR connectiontype. Those polygons are in
opposite well rendered with oraclespatial connectiontype.
 You can find below a SQL snippet that permit to create table records that I
think should allow to identify the bug source. Note that shape 1,4,7 and 8 cause
ogrinfo and mapserver crash.
 The different studied cases try to take account of the many possibilities.
 Shape 7 and 8 are "clones" of the first one, but using counterclockwise order
(as  said in the spatial manual section 2.2.4).


CREATE TABLE MYTABLE (
GID NUMBER(10),
NAME VARCHAR2(30),
GEOMETRY MDSYS.SDO_GEOMETRY);

INSERT INTO MYTABLE VALUES (
1, 'shape1',
MDSYS.SDO_GEOMETRY(
2007, NULL, NULL, 
MDSYS.SDO_ELEM_INFO_ARRAY(1, 2003, 1, 11, 1003, 1),
MDSYS.SDO_ORDINATE_ARRAY(1,1,1,5,4,5,4,1,1,1,2,2,2,4,3,4,2,2)));

INSERT INTO MYTABLE VALUES (
2, 'shape2',
MDSYS.SDO_GEOMETRY(
2007, NULL, NULL, 
MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 1, 11, 2003, 1),
MDSYS.SDO_ORDINATE_ARRAY(1,1,1,5,4,5,4,1,1,1,2,2,2,4,3,4,2,2)));


INSERT INTO MYTABLE VALUES (
3, 'shape3',
MDSYS.SDO_GEOMETRY(
2007, NULL, NULL, 
MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 1, 11, 1003, 1),
MDSYS.SDO_ORDINATE_ARRAY(1,1,1,5,4,5,4,1,1,1,2,2,2,4,3,4,2,2)));

INSERT INTO MYTABLE VALUES (
4, 'shape4',
MDSYS.SDO_GEOMETRY(
2007, NULL, NULL, 
MDSYS.SDO_ELEM_INFO_ARRAY(1, 2003, 1, 9, 1003, 1),
MDSYS.SDO_ORDINATE_ARRAY(2,2,2,4,3,4,2,2,1,1,1,5,4,5,4,1,1,1)));

INSERT INTO MYTABLE VALUES (
5, 'shape5',
MDSYS.SDO_GEOMETRY(
2007, NULL, NULL, 
MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 1, 9, 2003, 1),
MDSYS.SDO_ORDINATE_ARRAY(2,2,2,4,3,4,2,2,1,1,1,5,4,5,4,1,1,1)));

INSERT INTO MYTABLE VALUES (
6, 'shape6',
MDSYS.SDO_GEOMETRY(
2007, NULL, NULL, 
MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 1, 9, 1003, 1),
MDSYS.SDO_ORDINATE_ARRAY(2,2,2,4,3,4,2,2,1,1,1,5,4,5,4,1,1,1)));

INSERT INTO MYTABLE VALUES (
7, 'shape7',
MDSYS.SDO_GEOMETRY(
2007, NULL, NULL, 
MDSYS.SDO_ELEM_INFO_ARRAY(1, 2003, 1, 11, 1003, 1),
MDSYS.SDO_ORDINATE_ARRAY(1,1,4,1,4,5,1,5,1,1,2,2,2,4,3,4,2,2)));

INSERT INTO MYTABLE VALUES (
8, 'shape8',
MDSYS.SDO_GEOMETRY(
2007, NULL, NULL, 
MDSYS.SDO_ELEM_INFO_ARRAY(1, 2003, 1, 11, 1003, 1),
MDSYS.SDO_ORDINATE_ARRAY(1,1,1,5,4,5,4,1,1,1,2,2,3,4,2,4,2,2)));


INSERT INTO USER_SDO_GEOM_METADATA (TABLE_NAME,COLUMN_NAME,DIMINFO,SRID) VALUES
('MYTABLE','GEOMETRY',
MDSYS.SDO_DIM_ARRAY(
MDSYS.SDO_DIM_ELEMENT('X',0,100,1),
MDSYS.SDO_DIM_ELEMENT('Y',0,100,1)),
NULL);

CREATE INDEX MYTABLE_GEOM ON MYTABLE (GEOMETRY) INDEXTYPE IS MDSYS.SPATIAL_INDEX
PARAMETERS ('SDO_LEVEL=6');

Change History (1)

comment:1 Changed 14 years ago by warmerdam

It turns out there was a missing case for 3D multi-polygons.  I have committed
a fix for this which will appear in GDAL 1.2.5.

Thanks!

Note: See TracTickets for help on using tickets.