路线选择时,要素距离计算
This commit is contained in:
@@ -443,6 +443,15 @@ public class GeometryTools {
|
||||
|
||||
}
|
||||
|
||||
public static double distanceToDouble(Geometry startGeoPoint, Geometry endGeoPoint) {
|
||||
if (startGeoPoint != null && endGeoPoint != null) {
|
||||
double d = startGeoPoint.distance(endGeoPoint);
|
||||
return convertDistanceToDegree(d, startGeoPoint.getCoordinate().y);
|
||||
}
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* LINESTRING (116.4206899999999933 39.9620999999999995,
|
||||
|
||||
Reference in New Issue
Block a user