Class GeoKit.Point

java.lang.Object
org.aoju.bus.core.toolkit.GeoKit.Point
All Implemented Interfaces:
Serializable
Enclosing class:
GeoKit

public static class GeoKit.Point extends Object implements Serializable
地理坐标点

坐标系转换代码参考自: https://blog.csdn.net/a13570320979/article/details/51366355

See Also:
  • Constructor Details

    • Point

      public Point(double longitude, double latitude, GeoKit.PointType type)
      构造器
      Parameters:
      longitude - 经度
      latitude - 纬度
      type - 坐标点类型, 默认为WGS84
    • Point

      public Point(double longitude, double latitude)
  • Method Details

    • getLongitude

      public double getLongitude()
    • setLongitude

      public void setLongitude(double longitude)
    • getLatitude

      public double getLatitude()
    • setLatitude

      public void setLatitude(double latitude)
    • getType

      public GeoKit.PointType getType()
    • setType

      public void setType(GeoKit.PointType type)
    • toPoint2D

      public Point2D.Double toPoint2D()
    • toGcj02

      public GeoKit.Point toGcj02()
      Returns:
      将当前坐标点转换为火星坐标
    • toWgs84

      public GeoKit.Point toWgs84()
      Returns:
      将当前坐标点转换为GPS原始坐标
    • toBd09

      public GeoKit.Point toBd09()
      Returns:
      将当前坐标点转换为百度坐标
    • retain6

      public GeoKit.Point retain6()
      Returns:
      保留小数点后六位
    • notInChina

      public boolean notInChina()
      Returns:
      是否超出中国范围
    • distance

      public double distance(GeoKit.Point point)
      Parameters:
      point - 坐标点
      Returns:
      计算两点间的距离(米)
    • isValidCoordinate

      public boolean isValidCoordinate()
      Returns:
      验证是否为合法有效的经纬度
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object