org.hd.d.pg2k.svrCore.location
Class Location.Estd

java.lang.Object
  extended by org.hd.d.pg2k.svrCore.location.Location.Base
      extended by org.hd.d.pg2k.svrCore.location.Location.Time
          extended by org.hd.d.pg2k.svrCore.location.Location.Estd
All Implemented Interfaces:
java.io.Serializable, MemoryTools.Internable
Enclosing class:
Location

public static final class Location.Estd
extends Location.Time

Earth-standard coordinates. Eastings and Northings, with optional altitude above mean sea level (in metres).

This class is immutable.

Time is handled by a base class if any.

TODO: needs to validate on deserialisation.

See Also:
Serialized Form

Field Summary
private  Location.DoubleValueAndBounds Alt
          How many metres above mean sea level are we?
private  Location.DoubleValueAndBounds E
          How many degrees East are we?
static int MAX_E
          Get maximum value for E (positive); minimum is negation of this.
static int MAX_N
          Get maximum value for N (positive); minimum is negation of this.
private  Location.DoubleValueAndBounds N
          How many degrees North are we?
private static long serialVersionUID
          Unique Serialisation class ID generated by http://random.hd.org/.
static Location.Estd WHOLE_EARTH
          "Whole Earth" value; not null.
 
Fields inherited from class org.hd.d.pg2k.svrCore.location.Location.Base
specific, specificKey, type, typeKey
 
Constructor Summary
Location.Estd(boolean _specific, java.lang.String prefix, java.util.Properties p)
          Build Earth-standard coordinates in WGS84 space.
 
Method Summary
 boolean containsArea(Location.Estd other)
          True if this Location and bounding box contains the bounding box of the argument Location.
 boolean containsCentre(Location.Estd other)
          True if this Location and bounding box contains the centre of the argument Location.
 boolean equals(java.lang.Object obj)
          Depends on all the elements of this class and base classes.
 Location.DoubleValueAndBounds getAlt()
          Get the altitude in metres; null indicates not known.
 Location.DoubleValueAndBounds getE()
          Get the Easting value; never null.
 Location.DoubleValueAndBounds getN()
          Get the Northing value; never null.
 int hashCode()
          Depends on base hash plus E and N values.
 boolean isLargerThan(Location.Estd other)
          True if this Location is "bigger" than that of its argument.
 boolean strictlyContainsArea(Location.Estd other)
          True if this Location and bounding box strictly contains the bounding box of the argument Location.
 java.lang.String toString()
          Get value as a String.
 
Methods inherited from class org.hd.d.pg2k.svrCore.location.Location.Time
getTime
 
Methods inherited from class org.hd.d.pg2k.svrCore.location.Location.Base
buildFromFile, buildFromFileOrNONE, buildFromProperties, buildFromProperties, getBooleanProp, getDoubleProp, getDoubleProps, getLongProp, getLongProps
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MAX_E

public static final int MAX_E
Get maximum value for E (positive); minimum is negation of this.

See Also:
Constant Field Values

MAX_N

public static final int MAX_N
Get maximum value for N (positive); minimum is negation of this.

See Also:
Constant Field Values

E

private final Location.DoubleValueAndBounds E
How many degrees East are we?


N

private final Location.DoubleValueAndBounds N
How many degrees North are we?


Alt

private final Location.DoubleValueAndBounds Alt
How many metres above mean sea level are we?


WHOLE_EARTH

public static final Location.Estd WHOLE_EARTH
"Whole Earth" value; not null.


serialVersionUID

private static final long serialVersionUID
Unique Serialisation class ID generated by http://random.hd.org/.

See Also:
Constant Field Values
Constructor Detail

Location.Estd

public Location.Estd(boolean _specific,
                     java.lang.String prefix,
                     java.util.Properties p)
              throws PGException
Build Earth-standard coordinates in WGS84 space.

Throws:
PGException
Method Detail

getE

public final Location.DoubleValueAndBounds getE()
Get the Easting value; never null.


getN

public final Location.DoubleValueAndBounds getN()
Get the Northing value; never null.


getAlt

public final Location.DoubleValueAndBounds getAlt()
Get the altitude in metres; null indicates not known.


isLargerThan

public boolean isLargerThan(Location.Estd other)
True if this Location is "bigger" than that of its argument. True if:


containsArea

public boolean containsArea(Location.Estd other)
True if this Location and bounding box contains the bounding box of the argument Location. Note that this is reflexive, ie a Location contains its own bounding box.


strictlyContainsArea

public boolean strictlyContainsArea(Location.Estd other)
True if this Location and bounding box strictly contains the bounding box of the argument Location. Note that this is not reflexive, ie a Location not not strictly contain its own bounding box, since the contained item must be smaller, or equivalently contained but not equal.


containsCentre

public boolean containsCentre(Location.Estd other)
True if this Location and bounding box contains the centre of the argument Location. Note that this is reflexive, ie a Location contains its own centre.


hashCode

public int hashCode()
Depends on base hash plus E and N values.

Overrides:
hashCode in class Location.Time

equals

public boolean equals(java.lang.Object obj)
Depends on all the elements of this class and base classes.

Overrides:
equals in class Location.Time

toString

public java.lang.String toString()
Get value as a String.

Overrides:
toString in class Location.Time

DHD Multimedia Gallery V1.57.21

Copyright (c) 1996-2011, Damon Hart-Davis. All rights reserved.