public class GeoPoint extends Object implements Serializable
坐标系转换代码参考自:
https://blog.csdn.net/a13570320979/article/details/51366355
https://blog.csdn.net/m0_37738114/article/details/80452485
Constructor and Description |
---|
GeoPoint() |
GeoPoint(double longitude,
double latitude) |
GeoPoint(double longitude,
double latitude,
GeoPointType type)
构造器
|
Modifier and Type | Method and Description |
---|---|
double |
distance(GeoPoint point)
算法代码参考自:https://blog.csdn.net/xiejm2333/article/details/73297004
|
boolean |
equals(Object o) |
double |
getLatitude() |
double |
getLongitude() |
GeoPointType |
getType() |
int |
hashCode() |
boolean |
isValidCoordinate() |
boolean |
notInChina() |
GeoPoint |
retain6() |
void |
setLatitude(double latitude) |
void |
setLongitude(double longitude) |
void |
setType(GeoPointType type) |
GeoPoint |
toBd09() |
GeoPoint |
toGcj02() |
Point2D.Double |
toPoint2D() |
String |
toString() |
GeoPoint |
toWgs84() |
public GeoPoint()
public GeoPoint(double longitude, double latitude, GeoPointType type)
longitude
- 经度latitude
- 纬度type
- 坐标点类型, 默认为WGS84public GeoPoint(double longitude, double latitude)
public double getLongitude()
public void setLongitude(double longitude)
public double getLatitude()
public void setLatitude(double latitude)
public GeoPointType getType()
public void setType(GeoPointType type)
public Point2D.Double toPoint2D()
public GeoPoint toGcj02()
public GeoPoint toWgs84()
public GeoPoint toBd09()
public GeoPoint retain6()
public boolean notInChina()
public double distance(GeoPoint point)
point
- 坐标点public boolean isValidCoordinate()
Copyright © 2022. All rights reserved.