visad.georef
Class EarthLocationLite
- java.lang.Object
-
- visad.ThingImpl
-
- visad.DataImpl
-
- visad.Tuple
-
- visad.RealTuple
-
- visad.georef.EarthLocationLite
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, Data, EarthLocation, LatLonPoint, RealTupleIface, Thing, TupleIface
public class EarthLocationLite extends RealTuple implements EarthLocation
This provides a LoCal EarthLocation that is much faster to create than the EarthLocationTuple. Assumes units of lat/lon are degrees and Altitude is meters.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class visad.DataImpl
DataImpl.Syncher
-
-
Field Summary
-
Fields inherited from interface visad.Data
ABS, ACOS, ACOS_DEGREES, ADD, ASIN, ASIN_DEGREES, ATAN, ATAN_DEGREES, ATAN2, ATAN2_DEGREES, CEIL, COS, COS_DEGREES, DEGREES_TO_RADIANS, DEPENDENT, DIVIDE, EXP, FLOOR, INDEPENDENT, INV_ATAN2, INV_ATAN2_DEGREES, INV_DIVIDE, INV_POW, INV_REMAINDER, INV_SUBTRACT, LOG, MAX, MIN, MULTIPLY, NEAREST_NEIGHBOR, NEGATE, NO_ERRORS, NOP, POW, RADIANS_TO_DEGREES, REMAINDER, RINT, ROUND, SIN, SIN_DEGREES, SQRT, SUBTRACT, TAN, TAN_DEGREES, WEIGHTED_AVERAGE
-
-
Constructor Summary
Constructors Constructor and Description EarthLocationLite(double lat, double lon, double alt)Construct a new EarthLocationLiteEarthLocationLite(Real lat, Real lon, Real alt)Construct a new EarthLocationLite
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleanequals(java.lang.Object obj)Indicates if this Tuple is identical to an object.RealgetAltitude()get altitudeDatagetComponent(int i)Get the i'th component.Data[]getComponents(boolean copy)Create, if needed, and return the component array.RealgetLatitude()get latitudeLatLonPointgetLatLonPoint()This is an EarthLocation interface method.RealgetLongitude()get longitudeinthashCode()Returns the hash code of this object.booleanisMissing()is missingstatic voidmain(java.lang.String[] args)run 'java ucar.visad.EarthLocationLite' to test the RealTuple class.java.lang.StringtoString()to string-
Methods inherited from class visad.RealTuple
addReference, binary, clone, computeRanges, getCoordinateSystem, getErrors, getTupleUnits, getValues, longString, removeReference, unary
-
Methods inherited from class visad.Tuple
__getitem__, __len__, adjustSamplingError, buildTupleType, getComponents, getDimension, getLength, getRealComponents, makeTuple
-
Methods inherited from class visad.DataImpl
__add__, __add__, __div__, __div__, __mod__, __mod__, __mul__, __mul__, __neg__, __pow__, __pow__, __radd__, __rdiv__, __rmod__, __rmul__, __rpow__, __rsub__, __sub__, __sub__, abs, abs, acos, acos, acosDegrees, acosDegrees, add, add, asin, asin, asinDegrees, asinDegrees, atan, atan, atan2, atan2, atan2Degrees, atan2Degrees, atanDegrees, atanDegrees, binary, ceil, ceil, changeMathType, computeRanges, computeRanges, cos, cos, cosDegrees, cosDegrees, dataClone, divide, divide, exp, exp, floor, floor, getType, local, log, log, longString, max, max, min, min, multiply, multiply, negate, negate, notifyReferences, pow, pow, remainder, remainder, rint, rint, round, round, sin, sin, sinDegrees, sinDegrees, sqrt, sqrt, subtract, subtract, tan, tan, tanDegrees, tanDegrees, unary
-
Methods inherited from interface visad.Data
abs, abs, acos, acos, acosDegrees, acosDegrees, add, add, adjustSamplingError, asin, asin, asinDegrees, asinDegrees, atan, atan, atan2, atan2, atan2Degrees, atan2Degrees, atanDegrees, atanDegrees, binary, binary, ceil, ceil, changeMathType, computeRanges, computeRanges, computeRanges, cos, cos, cosDegrees, cosDegrees, dataClone, divide, divide, exp, exp, floor, floor, getType, local, log, log, longString, longString, max, max, min, min, multiply, multiply, negate, negate, pow, pow, remainder, remainder, rint, rint, round, round, sin, sin, sinDegrees, sinDegrees, sqrt, sqrt, subtract, subtract, tan, tan, tanDegrees, tanDegrees, unary, unary
-
Methods inherited from interface visad.Thing
addReference, removeReference
-
Methods inherited from interface visad.TupleIface
adjustSamplingError, getDimension, getRealComponents
-
-
-
-
Constructor Detail
-
EarthLocationLite
public EarthLocationLite(double lat, double lon, double alt) throws VisADExceptionConstruct a new EarthLocationLite- Parameters:
lat- latitudelon- longitudealt- altitude- Throws:
VisADException- On badness
-
-
Method Detail
-
isMissing
public boolean isMissing()
is missing
-
getLatitude
public Real getLatitude()
get latitude- Specified by:
getLatitudein interfaceLatLonPoint- Returns:
- latitude
-
getLongitude
public Real getLongitude()
get longitude- Specified by:
getLongitudein interfaceLatLonPoint- Returns:
- longitude
-
getAltitude
public Real getAltitude()
get altitude- Specified by:
getAltitudein interfaceEarthLocation- Returns:
- altitude
-
getLatLonPoint
public LatLonPoint getLatLonPoint()
This is an EarthLocation interface method. It just a LatLonTuple made from getLatitude() and getLongitude();- Specified by:
getLatLonPointin interfaceEarthLocation- Returns:
- this
-
getComponent
public Data getComponent(int i) throws VisADException, java.rmi.RemoteException
Get the i'th component.- Specified by:
getComponentin interfaceTupleIface- Overrides:
getComponentin classTuple- Parameters:
i- Which one- Returns:
- The component
- Throws:
java.rmi.RemoteException- On badnessVisADException- On badness
-
getComponents
public Data[] getComponents(boolean copy)
Create, if needed, and return the component array.- Overrides:
getComponentsin classTuple- Parameters:
copy- if true then return a copy of the tuple array. Else return the actual array- Returns:
- components
-
equals
public boolean equals(java.lang.Object obj)
Indicates if this Tuple is identical to an object.- Specified by:
equalsin interfaceLatLonPoint- Overrides:
equalsin classTuple- Parameters:
obj- The object.- Returns:
trueif and only if the object is a Tuple and both Tuple-s have identical component sequences.
-
hashCode
public int hashCode()
Returns the hash code of this object.
-
toString
public java.lang.String toString()
to string- Specified by:
toStringin interfaceRealTupleIface- Overrides:
toStringin classRealTuple- Returns:
- string of me
-
main
public static void main(java.lang.String[] args) throws VisADException, java.rmi.RemoteExceptionrun 'java ucar.visad.EarthLocationLite' to test the RealTuple class. This does a performance comparison of creating this object and the EarthLocationTuple- Parameters:
args- ignored- Throws:
java.rmi.RemoteException- Java RMI problemVisADException- Unable to create the VisAD objects
-
-
DMelt 3.0 © DataMelt by jWork.ORG