Package org.aoju.bus.core.toolkit
Class GeoKit.Point
java.lang.Object
org.aoju.bus.core.toolkit.GeoKit.Point
- All Implemented Interfaces:
Serializable
- Enclosing class:
GeoKit
地理坐标点
坐标系转换代码参考自: https://blog.csdn.net/a13570320979/article/details/51366355
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPoint(double longitude, double latitude) Point(double longitude, double latitude, GeoKit.PointType type) 构造器 -
Method Summary
Modifier and TypeMethodDescriptiondoubledistance(GeoKit.Point point) booleandoubledoublegetType()inthashCode()booleanbooleanretain6()voidsetLatitude(double latitude) voidsetLongitude(double longitude) voidsetType(GeoKit.PointType type) toBd09()toGcj02()toWgs84()
-
Constructor Details
-
Point
构造器- 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
-
setType
-
toPoint2D
-
toGcj02
- Returns:
- 将当前坐标点转换为火星坐标
-
toWgs84
- Returns:
- 将当前坐标点转换为GPS原始坐标
-
toBd09
- Returns:
- 将当前坐标点转换为百度坐标
-
retain6
- Returns:
- 保留小数点后六位
-
notInChina
public boolean notInChina()- Returns:
- 是否超出中国范围
-
distance
- Parameters:
point- 坐标点- Returns:
- 计算两点间的距离(米)
-
isValidCoordinate
public boolean isValidCoordinate()- Returns:
- 验证是否为合法有效的经纬度
-
equals
-
hashCode
-