
1. Re: Is there a simple way to create a linestring sdo
navaneet Apr 10, 2014 11:14 AM (in response to FlyingGuy)The following function could take two point's coordinates and return a line. Do you think this solves your problem now?
FUNCTION xy2line ( pi_x1 number, pi_y1 number, pi_x2 number, pi_y2 number, srid NUMBER DEFAULT null )
RETURN Mdsys.Sdo_geometry
DETERMINISTIC
IS
Line mdsys.sdo_geometry ;
var_SRID number;
begin
Line := Mdsys.Sdo_geometry( 2002, SRID, null,
MDSYS.SDO_ELEM_INFO_ARRAY(1, 2, 1),
MDSYS.SDO_ORDINATE_ARRAY( pi_x1, pi_y1, pi_x2,pi_y2 ) );
RETURN Line;
END;
Best
Navaneet

2. Re: Is there a simple way to create a linestring sdo
FlyingGuy Apr 10, 2014 3:02 PM (in response to navaneet)Hey Havaneet,
You that answeres it, I was just hoping for some sdo function that would take it n points, but that will work. It is better then trying to take apart the points and then run them through wkt.
Thanks so much.