Class GeoUtil
java.lang.Object
cn.toint.oktool.util.GeoUtil
地理工具
坐标系转换可使用CoordinateTransformUtil
- Since:
- 2025/7/19
- Author:
- Toint
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.gavaghan.geodesy.GeodeticCurvecalculateCurve(org.gavaghan.geodesy.Ellipsoid reference, org.gavaghan.geodesy.GlobalCoordinates g1, org.gavaghan.geodesy.GlobalCoordinates g2) 计算两个地点之间的距离static org.gavaghan.geodesy.GeodeticCurvecalculateCurveWgs84(org.gavaghan.geodesy.GlobalCoordinates g1, org.gavaghan.geodesy.GlobalCoordinates g2) 计算两个地点之间的距离static BigDecimalgetDistanceKm(org.gavaghan.geodesy.GeodeticCurve geodeticCurve) 获取距离(单位千米)static longgetDistanceM(org.gavaghan.geodesy.GeodeticCurve geodeticCurve) 获取距离(单位米)
-
Constructor Details
-
GeoUtil
public GeoUtil()
-
-
Method Details
-
calculateCurve
public static org.gavaghan.geodesy.GeodeticCurve calculateCurve(org.gavaghan.geodesy.Ellipsoid reference, org.gavaghan.geodesy.GlobalCoordinates g1, org.gavaghan.geodesy.GlobalCoordinates g2) 计算两个地点之间的距离- Parameters:
reference- 坐标系g1- 位置1g2- 位置2- Returns:
- 距离信息
获取距离: curve.getEllipsoidalDistance()
获取方位角: curve.getAzimuth()
获取反向方位角: curve.getReverseAzimuth()
-
calculateCurveWgs84
public static org.gavaghan.geodesy.GeodeticCurve calculateCurveWgs84(org.gavaghan.geodesy.GlobalCoordinates g1, org.gavaghan.geodesy.GlobalCoordinates g2) 计算两个地点之间的距离- Parameters:
g1- 位置1, WGS84g2- 位置2, WGS84- Returns:
- 距离信息
获取距离: curve.getEllipsoidalDistance()
获取方位角: curve.getAzimuth()
获取反向方位角: curve.getReverseAzimuth()
-
getDistanceM
public static long getDistanceM(org.gavaghan.geodesy.GeodeticCurve geodeticCurve) 获取距离(单位米)- Parameters:
geodeticCurve- 距离信息- Returns:
- 距离距离(单位米)
-
getDistanceKm
获取距离(单位千米)- Parameters:
geodeticCurve- 距离信息- Returns:
- 距离距离(单位千米), 保留3位小数
-