From 58e344a0c14692fce547d64ea9295f866754fe63 Mon Sep 17 00:00:00 2001
From: luofl <1442745593@qq.com>
Date: 星期四, 03 四月 2025 18:19:26 +0800
Subject: [PATCH] 1
---
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