oracle spatial Given a line segment and the distance from a point to the endpoint of the line segment, find the latitude and longitude of a point

The requirements are like the title. I have been looking for some mathematical formulas
on the Internet for a long time, but after I set them up, I found that the results were incorrect. Finally, I read the official documents of Oracle.
http://docs.oracle.com/cd/E24693_01/appdev.11203/e11830/sdo_util.htm

The process you are looking for is here.

SDO_UTIL.POINT_AT_BEARING

Format

SDO_UTIL.POINT_AT_BEARING(

     start_point IN SDO_GEOMETRY,

     bearing IN NUMBER,

     distance IN NUMBER

     ) RETURN SDO_GEOMETRY;


See Description
Description

Returns a point geometry that is at the specified distance and bearing from the start point.

Bearing
Number of radians, measured clockwise from North. Must be in the range of either -pi to pi or 0 to 2*pi. (Either convention on ranges will work).

Distance
Number of meters from start_point and along the initial bearing direction to the computed destination point. Must be less than one-half the circumference of the Earth.

Probably meets my needs. The meaning of this sentence should be, return a point, and change the position of the point at a distance from the starting point according to the specified bearing
(bearing should mean bearing), which is actually a radian.
So how do you know this arc?

Moving on,
To compute the bearing and tilt from a start point to an end point, you can use the SDO_UTIL.BEARING_TILT_FOR_POINTS procedure.

That is to say, if I know two points, then I can calculate the radian of this line segment. In theory, the coordinates of all the points on the line segment can also be calculated.


So, point1, point2, how to find the coordinates of the point 200 meters away from point1?

First, use
SDO_UTIL.BEARING_TILT_FOR_POINTS(

     start_point IN SDO_GEOMETRY,

     end_point IN SDO_GEOMETRY,

     tol IN NUMBER,

     bearing OUT NUMBER,

     tilt OUT NUMBER

     ) RETURN SDO_GEOMETRY;
SDO_UTIL.BEARING_TILT_FOR_POINTS(point1,point2,0.00005,radians,tilt) to calculate a radians,tilt Clockwise, one counterclockwise, I need to use a clockwise arc.
Then use radians and point1 and distance to calculate the points on the line segment.

Of course, if the line segment is less than 200 meters, then the point flies outside.
GEOMETRY point3 :=SDO_UTIL.BEARING_TILT_FOR_POINTS(point1,ra,200);

At this point, point3 is obtained.




Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326646778&siteId=291194637