This content has been marked as final.
Show 1 reply

1. Re: Can't show Greate Circle Route (in SRID 8307) in Map Viewer
jsharmaOracle Mar 21, 2013 6:35 PM (in response to Wishmaster)MapViewer doesn't display them as great circles. This will be fixed in a future release.
Meanwhile you can use Oracle Spatial functions to create the sissified lines which will approximate/be displayed as flight paths/great circles.
That is use something like Dan Geringer's (sample code so usual disclaimers apply) densify_line plsql stored procedure below.
The densify_line function takes two arguments:
• two_pt_line  The line to densify
• arc_tolerance  The interval (in meters) used to densify the line
The first argument calls for a two point line. It ensures the endpoints are included in the densified result.
You can also pass in a linestring with more than two points. The end points are ensured to be part of the densified line, but the intermediate shape points are not. To guarantee shape points, you can call densify_line iteratively with the 2 point line segments of a linestring.
CREATE OR REPLACE FUNCTION densify_line (two_pt_line MDSYS.SDO_GEOMETRY,
arc_tolerance number) RETURN MDSYS.SDO_GEOMETRY
DETERMINISTIC IS
lrs_segment MDSYS.SDO_GEOMETRY;
new_point MDSYS.SDO_GEOMETRY;
densified_line MDSYS.SDO_GEOMETRY := mdsys.sdo_geometry (two_pt_line.sdo_gtype,
two_pt_line.sdo_srid,
null,
mdsys.sdo_elem_info_array (1,2,1),
mdsys.sdo_ordinate_array ());
curr_measure NUMBER;
times_to_loop NUMBER;
BEGIN
IF two_pt_line IS NOT NULL
THEN
densified_line.sdo_ordinates.extend(2);
densified_line.sdo_ordinates(1) := two_pt_line.sdo_ordinates(1);
densified_line.sdo_ordinates(2) := two_pt_line.sdo_ordinates(2);
lrs_segment := SDO_LRS.CONVERT_TO_LRS_GEOM (two_pt_line);
times_to_loop := FLOOR (lrs_segment.sdo_ordinates(lrs_segment.sdo_ordinates.count) / arc_tolerance);
curr_measure := 0;
FOR i IN 1 .. times_to_loop LOOP
curr_measure := curr_measure + arc_tolerance;
densified_line.sdo_ordinates.extend(2);
new_point := sdo_lrs.locate_pt (lrs_segment, curr_measure);
densified_line.sdo_ordinates(densified_line.sdo_ordinates.count1) := new_point.sdo_ordinates(1);
densified_line.sdo_ordinates(densified_line.sdo_ordinates.count) := new_point.sdo_ordinates(2);
END LOOP;
IF curr_measure < lrs_segment.sdo_ordinates(lrs_segment.sdo_ordinates.count)
THEN
densified_line.sdo_ordinates.extend(2);
densified_line.sdo_ordinates(densified_line.sdo_ordinates.count  1) :=
two_pt_line.sdo_ordinates(two_pt_line.sdo_ordinates.count  1);
densified_line.sdo_ordinates(densified_line.sdo_ordinates.count) :=
two_pt_line.sdo_ordinates(two_pt_line.sdo_ordinates.count);
END IF;
END IF;
RETURN densified_line;
END;
/