目录:
- 获取AB连线与正北方向的角度
- 求距离此点一定距离、一定夹角的点经纬度
- 判断point点 在线段startPoint-etartPoint的左侧或者右侧
- 米转换为弧度
- 弧度转换为米
定义Point点
public class LatLngPoint {
final static double RC = 6378137;
final static double RJ = RC;
double longitude, latitude;
double radLongitude, radLatitude;
double Ec;
double Ed;
static final String LatLngPointString = "%.6f:%.6f";
public LatLngPoint(double longitude, double latitude) {
this.longitude = longitude;
this.latitude = latitude;
radLongitude = this.longitude * Math.PI / 180.;
radLatitude = this.latitude * Math.PI / 180.;
Ec = RJ + (RC - RJ) * (90. - latitude) / 90.;
Ed = Ec * Math.cos(radLatitude);
}
p