Hey Gang,
11gR2 all the bells and whistles
Ok, so given a linestring that represents a road I need to find a point on that linestring.
I have devices that are located with a 2Dpoint and I can use the sdo_nn and sdo_nn_distance to discover which linestring it is closest to.
I use the sdo_lrs_find_measure to know how far down the linestring from its origin ( 1st vertice ) the intersecting point would be.
sdo_lrs.locate_pt(Sdo_Lrs.Convert_To_Lrs_Geom(Ldata.Geom,0.0,Sdo_Geom.Sdo_Length(Ldata.Geom,0.05)),0,100) as snap_to
But this does not work so very well sa the point does not seem to trace the geometry of the line.
Any ideas?
Sorry I did not add any of the geom data so here it is:
The linestring:
MDSYS.SDO_GEOMETRY(2002,8307,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,2,1),MDSYS.SDO_ORDINATE_ARRAY(-117.89017,34.1201,-117.89006,34.12026,-117.88996,34.12037,-117.88986,34.12044,-117.88978,34.12047,-117.88966,34.12049,-117.88883,34.12056,-117.88793,34.12062,-117.8875,34.12065,-117.88724,34.12071,-117.88694,34.12083))
The point:
MDSYS.SDO_GEOMETRY(2001,8307,MDSYS.SDO_POINT_TYPE(-117.88843,34.120764,NULL),NULL,NULL)