3 Replies Latest reply: Jan 31, 2012 9:04 AM by 636190 RSS

    10g vs 11g - Line issue

    636190
      Hi,
      The following validates on 10g:
      MDSYS.SDO_GEOMETRY(2002,2236,null,
      MDSYS.SDO_ELEM_INFO_ARRAY(1,4,1,1,2,2),
      MDSYS.SDO_ORDINATE_ARRAY(893934.159168674,532595.478458636,893934.083722943,532595.517409051,
      893934.056678331,532595.59789372,893934.136215532,532595.899994259,893934.309861756,532596.159682324,
      893934.391041542,532596.188103395,893934.476085038,532596.200968813,
      893934.561986986,532596.196628291,893934.645592036,532596.176424815,893934.844207455,532595.935291496,
      893934.953397516,532595.642595592,893934.934488834,532595.559820608,893934.863289249,532595.513562037,
      893934.68809226,532595.492094401,893934.512210824,532595.477242982,893934.335637136,532595.474522407,893934.15917366,532595.478457668))

      On an 11g instance (that I do not have access to) I have been told it does NOT validate.
      Would someone be kind enough to confirm the 11g failure?
      r,
      dennis
        • 1. Re: 10g vs 11g - Line issue
          NoelKhan
          Dennis,

          . . . .The first triplet in the SDO_ELEM_INFO_ARRAY is invalid.
          ...
          MDSYS.SDO_ELEM_INFO_ARRAY(
               1,4,1, -- "<-- Problem. SDO_INTERPRETATION must be greater than 1."
               1,2,2
          ),
          ...
          
          -- "Validate Returns 13033"
          This isn't a problem with 11g; rather 11g is enforcing the above requirement. To fix this geometry, remove the compound line-string triplet (the geometry is only composed of arcs anyway). Validate will return TRUE (Tested on Oracle 11.2.0.1.0).

          Regards,
          Noel
          • 2. Re: 10g vs 11g - Line issue
            636190
            Noel,
            Thank you for your quick response.
            r,
            dennis
            • 3. Re: 10g vs 11g - Line issue
              636190
              As an update. After getting the news from Noel I had to go back and see what caused this malformation.
              Here is the geometry that my application extracted from an Autodesk Map3d 2012 polyline object: (checked by hand and it represents the object exactly)

              MDSYS.SDO_GEOMETRY(2002,2236,null,MDSYS.SDO_ELEM_INFO_ARRAY(1,4,3,1,2,2,29,2,1,31,2,2),MDSYS.SDO_ORDINATE_ARRAY(893934.1591687,532595.4784586,893934.0837229,532595.5174091,893934.0566783,532595.5978937,893934.1362155,532595.8999943,893934.3098618,532596.1596823,893934.3910415,532596.1881034,893934.476085,532596.2009688,893934.561987,532596.1966283,893934.645592,532596.1764248,893934.8442075,532595.9352915,893934.9533975,532595.6425956,893934.9344888,532595.5598206,893934.8632892,532595.513562,893934.6880923,532595.4920944,893934.5122108,532595.477243,893934.5121236,532595.4772386,893934.3356371,532595.4745224,893934.1591737,532595.4784577))

              Then doing validate_geometry_with_context produces this error: 13356 [Element <1>] [Coordinate <15>]

              Ok ... got it ... not a problem at all for Map3d but bad for Oracle. I just do a rectify_geometry:

              select SDO_UTIL.RECTIFY_GEOMETRY(
              MDSYS.SDO_GEOMETRY(2002,2236,null,MDSYS.SDO_ELEM_INFO_ARRAY(1,4,3,1,2,2,29,2,1,31,2,2),MDSYS.SDO_ORDINATE_ARRAY(893934.1591687,532595.4784586,893934.0837229,532595.5174091,893934.0566783,532595.5978937,893934.1362155,532595.8999943,893934.3098618,532596.1596823,893934.3910415,532596.1881034,893934.476085,532596.2009688,893934.561987,532596.1966283,893934.645592,532596.1764248,893934.8442075,532595.9352915,893934.9533975,532595.6425956,893934.9344888,532595.5598206,893934.8632892,532595.513562,893934.6880923,532595.4920944,893934.5122108,532595.477243,893934.5121236,532595.4772386,893934.3356371,532595.4745224,893934.1591737,532595.4784577))
              , 0.0001) from dual;

              .... which produced the evil non-standard result which is Ok for 10g but not 11g.
              MDSYS.SDO_GEOMETRY(2002,2236,null,MDSYS.SDO_ELEM_INFO_ARRAY(1,4,1,1,2,2),MDSYS.SDO_ORDINATE_ARRAY(893934.1591687,532595.4784586,893934.0837229,532595.5174091,893934.0566783,532595.5978937,893934.1362155,532595.8999943,893934.3098618,532596.1596823,893934.3910415,532596.1881034,893934.476085,532596.2009688,893934.561987,532596.1966283,893934.645592,532596.1764248,893934.8442075,532595.9352915,893934.9533975,532595.6425956,893934.9344888,532595.5598206,893934.8632892,532595.513562,893934.6880923,532595.4920944,893934.5122108,532595.477243,893934.3356371,532595.4745224,893934.1591737,532595.4784577))

              Curiously, what will 11g do with:
              select SDO_UTIL.RECTIFY_GEOMETRY(
              MDSYS.SDO_GEOMETRY(2002,2236,null,MDSYS.SDO_ELEM_INFO_ARRAY(1,4,3,1,2,2,29,2,1,31,2,2),MDSYS.SDO_ORDINATE_ARRAY(893934.1591687,532595.4784586,893934.0837229,532595.5174091,893934.0566783,532595.5978937,893934.1362155,532595.8999943,893934.3098618,532596.1596823,893934.3910415,532596.1881034,893934.476085,532596.2009688,893934.561987,532596.1966283,893934.645592,532596.1764248,893934.8442075,532595.9352915,893934.9533975,532595.6425956,893934.9344888,532595.5598206,893934.8632892,532595.513562,893934.6880923,532595.4920944,893934.5122108,532595.477243,893934.5121236,532595.4772386,893934.3356371,532595.4745224,893934.1591737,532595.4784577))
              , 0.0001) from dual;
              ???
              r,
              dennis