# GeoPt
Date: 2012-02-24

## com.google.appengine.api.datastore
Class GeoPt

    java.lang.Object
      com.google.appengine.api.datastore.GeoPt

All Implemented Interfaces:
  java.io.Serializable, java.lang.Comparable<GeoPt>

    public final class GeoPt

extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable<GeoPt>

A geographical point, specified by float latitude and longitude coordinates. Often used to integrate with mapping sites like Google Maps.

See Also:
  Serialized Form

Field Summary
`static long` `serialVersionUID`

Constructor Summary
`GeoPt(float latitude, float longitude)` Constructs a `GeoPt`.

Method Summary
`int` `compareTo(GeoPt o)` Sort first by latitude, then by longitude
`boolean` `equals(java.lang.Object o)`
`float` `getLatitude()`
`float` `getLongitude()`
`int` `hashCode()`
`java.lang.String` `toString()`

Methods inherited from class java.lang.Object
`getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### serialVersionUID

    public static final long serialVersionUID

See Also:
  Constant Field Values

Constructor Detail

### GeoPt

    public GeoPt(float latitude,
                 float longitude)

  Constructs a `GeoPt`.

  Parameters:
    `latitude` - The latitude. Must be between -90 and 90 (inclusive).
    `longitude` - The longitude. Must be between -180 and 180 (inclusive).
  Throws:
    `java.lang.IllegalArgumentException` - If `latitude` or `longitude` is outside the legal range.

Method Detail

### getLatitude

    public float getLatitude()

### getLongitude

    public float getLongitude()

### compareTo

    public int compareTo(GeoPt o)

  Sort first by latitude, then by longitude

  Specified by:
    `compareTo` in interface `java.lang.Comparable<GeoPt>`

### equals

    public boolean equals(java.lang.Object o)

  Overrides:
    `equals` in class `java.lang.Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `java.lang.Object`

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`