com.bigdata.rdf.internal.gis

## Interface ICoordinate

• All Known Implementing Classes:
CoordinateDD, CoordinateDDM, CoordinateDMS

`public interface ICoordinate`
Interface for a coordinate (latitude, longitude) on a sphere. There are several ways in which a coordinate may be expressed:
```     Degrees, Minutes and Seconds

DDD� MM' SS.S"
32� 18' 23.1" N 122� 36' 52.5" W

Degrees and Decimal Minutes

DDD� MM.MMM'
32� 18.385' N 122� 36.875' W

Decimal Degrees

DDD.DDDDD�
32.30642� N 122.61458� W
or +32.30642, -122.61458

These are the basics, but they can be listed many different ways.

Here are a few examples:

32� 18' 23.1" N 122� 36' 52.5" W

32 18 23.1N 122 36 52.5 W

32 18 23.1N/122 36 52.5W

32:18:23N/122:36:52W

321823N/1223652W (zeros would need to go in front of single digits and two zeros
in front of the longitude degrees because it�s range is up to 180 � the latitude
range is only up to 90)

3218N/12236W
```
Version:
\$Id\$
Author:
Bryan Thompson
`http://en.wikipedia.org/wiki/Geographic_coordinate_system`
• ### Nested Class Summary

Nested Classes
Modifier and Type Interface and Description
`static class ` `ICoordinate.UNITS`
Typesafe enumeration for units in which distances may be expressed.
• ### Method Summary

Methods
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(ICoordinate o)`
Return true if two coordinates are exactly the same.
`CoordinateDD` `toDD()`
Convert to decimal degrees.
`CoordinateDDM` `toDDM()`
Convert to degrees and decimal minutes.
`CoordinateDMS` `toDMS()`
Convert to degrees, minutes and (tenths of) seconds.
• ### Method Detail

• #### equals

`boolean equals(ICoordinate o)`
Return true if two coordinates are exactly the same.

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.

Parameters:
`o` - Another coordinate.
• #### distance

```double distance(ICoordinate o,
ICoordinate.UNITS units)```
Computes the distance to the specified coordinate and returns that distance in the specified units.
Parameters:
`o` - Another coordinate.
`units` - The units in which the distance will be reported.
Returns:
The distance in the specified units.
• #### toDMS

`CoordinateDMS toDMS()`
Convert to degrees, minutes and (tenths of) seconds.
Returns:
The coordinate expressed as degrees, minutes and (tenths of) seconds.
• #### toDDM

`CoordinateDDM toDDM()`
Convert to degrees and decimal minutes.
Returns:
The coordinate expressed as degrees and decimal minutes.
• #### toDD

`CoordinateDD toDD()`
Convert to decimal degrees.
Returns:
The coordinate expressed as decimal degrees.