路线选择时,要素距离计算

This commit is contained in:
squallzhjch
2023-09-20 16:21:26 +08:00
parent 427e36bb8a
commit 7d29ce2309
5 changed files with 78 additions and 9 deletions

View File

@@ -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,