public class CoordinateDDM extends Object implements ICoordinate
Degrees and Decimal Minutes DDD� MM.MMM' 32� 18.385' N 122� 36.875' W
ICoordinate.UNITS
Modifier and Type | Field and Description |
---|---|
int |
degreesEast |
int |
degreesNorth |
static Logger |
log |
int |
thousandthsOfMinutesEast |
int |
thousandthsOfMinutesNorth |
Constructor and Description |
---|
CoordinateDDM(int degreesNorth,
int thousandthsOfMinutesNorth,
int degreesEast,
int thousandthsOfMinutesEast) |
Modifier and Type | Method and Description |
---|---|
double |
distance(ICoordinate o,
ICoordinate.UNITS units)
Computes the distance to the specified coordinate and returns that
distance in the specified units.
|
boolean |
equals(CoordinateDDM o)
Equal if the coordinates are exactly the same (precision to thousandths
of a minute).
|
boolean |
equals(ICoordinate o)
Return true if two coordinates are exactly the same.
|
static CoordinateDDM |
parse(String text)
Some formats that are accepted:
32� 18.385' N 122� 36.875' W
32 18.385N 122 36.875W
32 18.385 N 122 36.875 W
32:18.385N 122:36.875W
32:18:23.1N/122:36:52.5W
|
CoordinateDD |
toDD()
Convert to decimal degrees.
|
CoordinateDDM |
toDDM()
Convert to degrees and decimal minutes.
|
CoordinateDMS |
toDMS()
Convert to degrees, minutes and (tenths of) seconds.
|
String |
toString()
Representation of the coordinate in degrees and (thousandths of) decimal
minutes.
|
public static Logger log
public final int degreesNorth
public final int thousandthsOfMinutesNorth
public final int degreesEast
public final int thousandthsOfMinutesEast
public CoordinateDDM(int degreesNorth, int thousandthsOfMinutesNorth, int degreesEast, int thousandthsOfMinutesEast)
degreesNorth
- Degrees north/south.thousandthsOfMinutesNorth
- Decimal minutes north/south expressed as minutes * 1000.degreesEast
- Degrees east/west.thousandthsOfMinutesEast
- Decimal minutes east/west expressed as minutes * 1000.public String toString()
32 18.385N 122 36.875W
public static CoordinateDDM parse(String text) throws ParseException
ParseException
public boolean equals(ICoordinate o)
ICoordinate
Note: Coordinates MUST be expressed in the same system before they may be compared. E.g., Degrees, Minutes and Seconds or Degrees and Decimal Minutes or Decimal Degrees.
equals
in interface ICoordinate
o
- Another coordinate.public boolean equals(CoordinateDDM o)
o
- Another coordinate expressed in decimal minutes.public double distance(ICoordinate o, ICoordinate.UNITS units)
ICoordinate
distance
in interface ICoordinate
o
- Another coordinate.units
- The units in which the distance will be reported.public CoordinateDMS toDMS()
toDMS
in interface ICoordinate
public CoordinateDD toDD()
toDD
in interface ICoordinate
public CoordinateDDM toDDM()
ICoordinate
toDDM
in interface ICoordinate
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.