|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.antelmann.math.GeoPoint
public class GeoPoint
an immutable representation of a location on earth.
| Constructor Summary | |
|---|---|
GeoPoint(BigDecimal latitude,
BigDecimal longitude)
|
|
GeoPoint(BigDecimal latitude,
BigDecimal longitude,
BigDecimal altitude)
|
|
GeoPoint(double latitude,
double longitude)
|
|
GeoPoint(double latitude,
double longitude,
double altitude)
|
|
GeoPoint(Number latitude,
Number longitude)
|
|
GeoPoint(Number latitude,
Number longitude,
Number altitude)
|
|
GeoPoint(String latitudeAndLongitude)
|
|
GeoPoint(String latitude,
String longitude)
|
|
GeoPoint(String latitude,
String longitude,
String altitude)
|
|
| Method Summary | |
|---|---|
GeoPoint |
add(GeoPoint other)
'shifts' this point relative to the other given point by all 3 dimensions |
GeoPoint |
difference(GeoPoint other)
adding the return value to to the given other point would result in an instance equal to this |
static double |
distance(GeoPoint gp1,
GeoPoint gp2)
returns the flat distance in kilometers - disregarding the altitude. |
double |
distanceTo(GeoPoint gp)
|
boolean |
equals(Object obj)
|
void |
exportXML(OutputStream out)
exports the entire object as XML and writes it to the given Writer, so that the object can be reconstructed with importXML(InputSource). |
BigDecimal |
getAltitude()
|
GeoPoint |
getGeoPoint()
|
BigDecimal |
getLatitude()
|
BigDecimal |
getLongitude()
|
URL |
googleURL()
|
int |
hashCode()
|
void |
importXML(InputStream source)
The object is fully reinitialized with the XML data contained in the given ImputSource, so that the object has the same state as it had during export. |
URL |
openStreetMapURL()
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public GeoPoint(String latitudeAndLongitude)
throws FormatException
FormatException
public GeoPoint(String latitude,
String longitude)
throws FormatException
FormatException
public GeoPoint(String latitude,
String longitude,
String altitude)
throws FormatException
FormatException
public GeoPoint(Number latitude,
Number longitude)
public GeoPoint(Number latitude,
Number longitude,
Number altitude)
public GeoPoint(double latitude,
double longitude)
public GeoPoint(double latitude,
double longitude,
double altitude)
public GeoPoint(BigDecimal latitude,
BigDecimal longitude)
@ConstructorProperties(value={"latitude","longitude","altitude"})
public GeoPoint(BigDecimal latitude,
BigDecimal longitude,
BigDecimal altitude)
| Method Detail |
|---|
public GeoPoint getGeoPoint()
getGeoPoint in interface GeoEncodedpublic final BigDecimal getLatitude()
public final BigDecimal getLongitude()
public final BigDecimal getAltitude()
public void exportXML(OutputStream out)
throws IOException
XMLSerializableimportXML(InputSource).
The given stream is neither flushed nor closed, so that other data may be
effectively written to the InputSource after the method returned.
exportXML in interface XMLSerializableIOExceptionXMLSerializable.importXML(InputStream)
@Warning(value="calling this method breaks the contract of this class being immutable")
public void importXML(InputStream source)
throws SAXException,
IOException
XMLSerializable
importXML in interface XMLSerializableSAXException
IOExceptionXMLSerializable.exportXML(OutputStream)public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic GeoPoint add(GeoPoint other)
add in interface Addable<GeoPoint>difference(GeoPoint)public GeoPoint difference(GeoPoint other)
add(GeoPoint)public double distanceTo(GeoPoint gp)
distance(GeoPoint, GeoPoint)
public static double distance(GeoPoint gp1,
GeoPoint gp2)
public String toString()
toString in class Objectpublic URL openStreetMapURL()
public URL googleURL()
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||