I am trying to find nearest road segment to a point in Oracle. I can do this with SDO_GEOMETRY type i.e
select
/*+ LEADING(pois) INDEX(route ALL_ROUTES_SPTAIL_INDEX) */
route.*
from DEVICE_STATUS pois,ALL_ROUTES route where
MDSYS.sdo_nn(route.shape, pois.shape,'sdo_num_res=1') = 'TRUE'
and pois.objectid=729415
How can I find nearest neighbor when both tables have ST_GEOMETRY type? or is there any way to convert ST_GEOMETRY to SDO_GEOMETRY