类 GeoPosition
- java.lang.Object
-
- org.meteoinfo.data.mapdata.webmap.GeoPosition
-
public class GeoPosition extends Object
An immutable coordinate in the real (geographic) world, composed of a latitude and a longitude.- 作者:
- rbair
-
-
构造器概要
构造器 构造器 说明 GeoPosition(double[] coords)Creates a new instance of GeoPosition from the specified latitude and longitude as an array of two doubles, with the latitude first.GeoPosition(double latitude, double longitude)Creates a new instance of GeoPosition from the specified latitude and longitude.GeoPosition(double latDegrees, double latMinutes, double latSeconds, double lonDegrees, double lonMinutes, double lonSeconds)Creates a new instance of GeoPosition from the specified latitude and longitude.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 booleanequals(Object obj)Returns true the specified GeoPosition and this GeoPosition represent the exact same latitude and longitude coordinates.doublegetLatitude()Get the latitude as decimal degreesdoublegetLongitude()Get the longitude as decimal degreesStringtoString()
-
-
-
构造器详细资料
-
GeoPosition
public GeoPosition(double latitude, double longitude)Creates a new instance of GeoPosition from the specified latitude and longitude. These are double values in decimal degrees, not degrees, minutes, and seconds. Use the other constructor for those.- 参数:
latitude- a latitude value in decmial degreeslongitude- a longitude value in decimal degrees
-
GeoPosition
public GeoPosition(double[] coords)
Creates a new instance of GeoPosition from the specified latitude and longitude as an array of two doubles, with the latitude first. These are double values in decimal degrees, not degrees, minutes, and seconds. Use the other constructor for those.- 参数:
coords- latitude and longitude as a double array of length two
-
GeoPosition
public GeoPosition(double latDegrees, double latMinutes, double latSeconds, double lonDegrees, double lonMinutes, double lonSeconds)Creates a new instance of GeoPosition from the specified latitude and longitude. Each are specified as degrees, minutes, and seconds; not as decimal degrees. Use the other constructor for those.- 参数:
latDegrees- the degrees part of the current latitudelatMinutes- the minutes part of the current latitudelatSeconds- the seconds part of the current latitudelonDegrees- the degrees part of the current longitudelonMinutes- the minutes part of the current longitudelonSeconds- the seconds part of the current longitude
-
-
方法详细资料
-
getLatitude
public double getLatitude()
Get the latitude as decimal degrees- 返回:
- the latitude as decimal degrees
-
getLongitude
public double getLongitude()
Get the longitude as decimal degrees- 返回:
- the longitude as decimal degrees
-
equals
public boolean equals(Object obj)
Returns true the specified GeoPosition and this GeoPosition represent the exact same latitude and longitude coordinates.
-
-