public class LonlatPoint extends java.lang.Object implements LonlatShape<LonlatPoint>
Copyright 2006-2008
| Constructor and Description |
|---|
LonlatPoint(double longitude,
double latitude) |
LonlatPoint(XyPoint xy)
Creates a LonlatPoint from an XyPoint by using X as longitude and Y as latitude.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object nother) |
double |
getLatitude()
Latitude coordinate.
|
double |
getLongitude()
Longitude coordinate.
|
int |
hashCode() |
java.util.Iterator<LonlatPoint> |
iterator() |
LonlatPoint |
scale(double scale)
Return a scaled version of the shape by multiplying all coordinates by
the given factor in both dimensions.
|
LonlatPoint |
scale(double scaleLongitude,
double scaleLatitude) |
java.lang.String |
toDegreesMinutesSeconds(int precision) |
java.lang.String |
toString() |
XyPoint |
toXyPoint()
Returns an XY point where Longitude is X and Latitude is Y.
|
LonlatPoint |
translate(double offsetLongitude,
double offsetLatitude)
Translate the shape by adding all coordinates to the given x and y
offsets.
|
public LonlatPoint(double longitude,
double latitude)
public LonlatPoint(XyPoint xy)
public LonlatPoint scale(double scale)
LonlatShapescale in interface LonlatShape<LonlatPoint>scale - scaling factorpublic LonlatPoint scale(double scaleLongitude, double scaleLatitude)
public LonlatPoint translate(double offsetLongitude, double offsetLatitude)
LonlatShapetranslate in interface LonlatShape<LonlatPoint>offsetLongitude - offset for the x dimensionoffsetLatitude - offset for the y dimensionpublic java.util.Iterator<LonlatPoint> iterator()
iterator in interface java.lang.Iterable<LonlatPoint>public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toDegreesMinutesSeconds(int precision)
public boolean equals(java.lang.Object nother)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic double getLongitude()
public double getLatitude()
public XyPoint toXyPoint()