No geometry validation on insert ?

From: BleuBleu <mathieu.gauthier_at_jcmb.com>
Date: 24 Oct 2002 07:31:11 -0700
Message-ID: <1be8547d.0210240631.27ae459c_at_posting.google.com>


Hi!

How come Oracle let me insert a non-closed polygon in an spatial-indexed table ? When I run SDO_GEOM.VALIDATE_GEOMETRY() I get the right error code (ORA-13348 polygon boundary is not closed) but I really CAN insert it !!!

Here's the polygon i've inserted. This is really just example 2.3.3, but modified to be a polygon instead of a line.

INSERT INTO cola_markets VALUES(
  11,
  'compound_line_string',
  MDSYS.SDO_GEOMETRY(

    2003,
    NULL,
    NULL,

    MDSYS.SDO_ELEM_INFO_ARRAY(1,1005,2, 1,2,1, 3,2,2),     MDSYS.SDO_ORDINATE_ARRAY(10,10, 10,14, 6,10, 14,10)   )
);

Is it the programmer's responsability to write his own trigger to validate the geometry that is inserted ? I dont mind doing it, but I still think there's something weird going on !

Thank you!

Mathieu Gauthier
Development Team
JCMB Technology Inc Received on Thu Oct 24 2002 - 16:31:11 CEST

Original text of this message