4 Replies Latest reply on May 31, 2013 9:30 AM by 1010855

    SVG Path to Oracle Spatial conversion

    1010855
      Need advice for a particular problem.

      I am trying to convert an elliptical arc from one geometry format (SVG) to another (SDO_GEOMETRY). I need to store the following elliptical curve in SDO_GEOM. This geometry is in SVG format and the parameter details are as follows,

      *<path d="M 20,8 A 571,250 30.0 1 0 -1122,8" />*

      X1, Y1 = 20, 8 (starting co-ordinate)
      X2, Y2 = -1122, 8 (ending co-ordinate)
      X-radius = 571 (x-radius of ellipse)
      Y-radius = 250 (y-radius of ellipse)
      X-axis rotation = 30.0 (here the x-axis is kept as 0 degrees. Hence no rotation. But the x-axis can be rotated to change the elliptical curve)
      large-arc-flag = 1 ( 1 specifies to use the large sweep 180 degrees or greater, 0 specifies to use the small sweep less than 180 degrees)
      sweep-flag = 0 (1 specifies that the arc is drawn clockwise, 0 specifies arc is drawn counter-clockwise)

      Now in SDO_GEOMETRY, an arc is created using 3 points. I have the starting and ending X,Y coordinates. I need to compute the third point based on the above parameters. Any pointers will be very helpful. Are there any available library which converts SVG path into SDO_GEOMETRY?