From c560f1a14ae1fc468d90e50e6a32d805295875da Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期一, 01 九月 2025 15:35:59 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/2.0' into 2.0
---
cloud-server-other/src/main/java/com/dsh/other/util/GeodesyUtil.java | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/cloud-server-other/src/main/java/com/dsh/other/util/GeodesyUtil.java b/cloud-server-other/src/main/java/com/dsh/other/util/GeodesyUtil.java
index 9824ee6..4e3978b 100644
--- a/cloud-server-other/src/main/java/com/dsh/other/util/GeodesyUtil.java
+++ b/cloud-server-other/src/main/java/com/dsh/other/util/GeodesyUtil.java
@@ -16,11 +16,12 @@
/**
* 获取直线距离
+ *
* @param fromLonLat
* @param toLonLat
* @return
*/
- public static Map<String, Double> getDistance(String fromLonLat, String toLonLat){
+ public static Map<String, Double> getDistance(String fromLonLat, String toLonLat) {
String[] from = fromLonLat.split(",");
String[] to = toLonLat.split(",");
GlobalCoordinates source = new GlobalCoordinates(Double.valueOf(from[1]), Double.valueOf(from[0]));
@@ -54,7 +55,7 @@
}
- private static double getDistanceMeter(GlobalCoordinates gpsFrom, GlobalCoordinates gpsTo, Ellipsoid ellipsoid){
+ private static double getDistanceMeter(GlobalCoordinates gpsFrom, GlobalCoordinates gpsTo, Ellipsoid ellipsoid) {
//创建GeodeticCalculator,调用计算方法,传入坐标系、经纬度用于计算距离
GeodeticCurve geoCurve = new GeodeticCalculator().calculateGeodeticCurve(ellipsoid, gpsFrom, gpsTo);
return geoCurve.getEllipsoidalDistance();
--
Gitblit v1.7.1