1 Reply Latest reply: Nov 12, 2012 5:23 AM by _jum RSS

    SDO_CS.TRANSFORM accuracy?

    973504
      Hello,

      i would like to understand Oracle Transformation on (Oracle Database 11g Express Edition Release 11.2.0.2.0)
      When i transform my coordiantes for example from SRID 4326 to 31467 and then back from SRID 31467 to 4326
      my coordiantes change
      from
      7.057038904337076; 52.2122279447782,
      to
      7,05703901650071; 52,2122285325819

      Could somebody explain this?

      Step 1:
      select SDO_CS.TRANSFORM(
      MDSYS.SDO_GEOMETRY(´
      2001,
      4326,
      SDO_POINT_TYPE(
      7.057038904337076,
      52.2122279447782,
      NULL),
      null,
      null
      )
      ,31467
      )
      from dual;

      Result1: (2001; 31467; (0,123155298074948; 0,911230557958703; );

      Step 2:
      select SDO_CS.TRANSFORM(
      MDSYS.SDO_GEOMETRY(
      2001,
      31467,
      SDO_POINT_TYPE(
      0.123155298074948,
      0.911230557958703,
      NULL),
      null,
      null
      )
      ,4326
      )
      from dual;

      Result2: (2001; 4326; (7,05703901650071; 52,2122285325819; );

      with kind regards

      Marin
        • 1. Re: SDO_CS.TRANSFORM accuracy?
          _jum
          Yes the coordinates change (a little), the reasons lie somwhere in complicated mathematics...
          I turned your example to get values in meters.
          SELECT 
            SDO_CS.TRANSFORM(
              MDSYS.SDO_GEOMETRY(
                2001, 31467,
                SDO_POINT_TYPE(3367271.93490396, 5788296.89197313,NULL),NULL,NULL)
            ,4326)
          FROM dual;
          
          --(2001; 4326; (7.05703901512463; 52.2122279673675; ); ; )
          
          SELECT 
            SDO_CS.TRANSFORM(
              MDSYS.SDO_GEOMETRY(2001, 4326,
                SDO_POINT_TYPE(7.05703901512463, 52.2122279673675,NULL),NULL,NULL)
            ,31467)
          FROM dual;
          
          --(2001; 31467; (3367271.94254288; 5788296.89428338; ); ; )
          
          --the difference is 7mm in north and 2mm in east
          
          SELECT 
            SDO_GEOM.SDO_DISTANCE(
                --original point
                MDSYS.SDO_GEOMETRY(
                  2001, 31467,
                  SDO_POINT_TYPE(3367271.93490396, 5788296.89197313,NULL),NULL,NULL),
              SDO_CS.TRANSFORM(    
                SDO_CS.TRANSFORM(
                  --original point
                  MDSYS.SDO_GEOMETRY(
                    2001, 31467,
                    SDO_POINT_TYPE(3367271.93490396, 5788296.89197313,NULL),NULL,NULL)
                ,4326)
              ,31467),
            0.00001) dist
          FROM dual;
          
          dist
          --------------
          0.00798062328453863        
          The distance is about 8mm...

          Btw. my values in CS 31467 differ complete from yours (?) but seem to be correct for DHDN / Gauss-Kruger zone 3.