Class GeoUtil

java.lang.Object
cn.toint.oktool.util.GeoUtil

public class GeoUtil extends Object
地理工具

坐标系转换可使用CoordinateTransformUtil

Since:
2025/7/19
Author:
Toint
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.gavaghan.geodesy.GeodeticCurve
    calculateCurve(org.gavaghan.geodesy.Ellipsoid reference, org.gavaghan.geodesy.GlobalCoordinates g1, org.gavaghan.geodesy.GlobalCoordinates g2)
    计算两个地点之间的距离
    static org.gavaghan.geodesy.GeodeticCurve
    calculateCurveWgs84(org.gavaghan.geodesy.GlobalCoordinates g1, org.gavaghan.geodesy.GlobalCoordinates g2)
    计算两个地点之间的距离
    static BigDecimal
    getDistanceKm(org.gavaghan.geodesy.GeodeticCurve geodeticCurve)
    获取距离(单位千米)
    static long
    getDistanceM(org.gavaghan.geodesy.GeodeticCurve geodeticCurve)
    获取距离(单位米)

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 - 位置1
      g2 - 位置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, WGS84
      g2 - 位置2, WGS84
      Returns:
      距离信息

      获取距离: curve.getEllipsoidalDistance()

      获取方位角: curve.getAzimuth()

      获取反向方位角: curve.getReverseAzimuth()

    • getDistanceM

      public static long getDistanceM(org.gavaghan.geodesy.GeodeticCurve geodeticCurve)
      获取距离(单位米)
      Parameters:
      geodeticCurve - 距离信息
      Returns:
      距离距离(单位米)
    • getDistanceKm

      public static BigDecimal getDistanceKm(org.gavaghan.geodesy.GeodeticCurve geodeticCurve)
      获取距离(单位千米)
      Parameters:
      geodeticCurve - 距离信息
      Returns:
      距离距离(单位千米), 保留3位小数