Package ucar.unidata.metdata
Class NamedStationImpl
java.lang.Object
ucar.unidata.metdata.NamedStationImpl
- All Implemented Interfaces:
Serializable
,Comparable
,NamedStation
,Station
- Direct Known Subclasses:
SoundingStation
A class to hold named location information, for a
landmark, city, observation point or station, data point, etc.
Name should be unique.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionA no-op ctor for unpersiting thisNamedStationImpl
(String id, String name, double latitude, double longitude, double alt, Unit unit) Construct an object to hold and transfer settings for a landmark, city, observation point, etc.NamedStationImpl
(String id, String name, List coords, Unit unit) _more_NamedStationImpl
(String name, NamedLocationTuple in_nLT) Create a NamedStationImpl from the name and NamedLocation -
Method Summary
Modifier and TypeMethodDescriptionvoid
addProperty
(String key, Object value) Add an extra propertyint
Compare this NamedStationImpl to another objectint
Compare this NamedStationImpl to another NamedStationImpl.boolean
See if the Object in question is equal to this.Get the altitude as a real (value and unit)double
Return altitude in units of getAltitudeUnit().ReturnUnit
of altitude_more_Create, if needed, and return the location of this stationgetID()
Get the station ID.Get the identifier for this NamedLocation.double
Get the latitude.double
Get the longitude.getName()
Get the station name.Get theNamedLocation
for this.Get the hashtable of extra propertiesgetProperty
(String key, Object deflt) Get an extra propertyvoid
setAltitude
(Real v) Set the alitude.void
Set the station ID.void
setLatitude
(double v) Set the latitude.void
setLongitude
(double v) Set the longitude.void
Get the station name.void
Set theNamedLocation
for this.void
Have this method here for backward compatibility with bundles.void
Set the table of extra propertiestoString()
Return a String representation of this NamedLocation
-
Constructor Details
-
NamedStationImpl
public NamedStationImpl(String id, String name, double latitude, double longitude, double alt, Unit unit) throws VisADException, RemoteException Construct an object to hold and transfer settings for a landmark, city, observation point, etc.- Parameters:
id
- typically a letter or number codename
- some kind of name such as "Kansas City" - should be UNIQUE.latitude
- latitude in decimal geographic degreeslongitude
- longitude in decimal geographic degreesalt
- VisAD Real for height above the geoid ("sea level")unit
- VisAD Unit of the altitude- Throws:
RemoteException
- Java RMI problemVisADException
- VisAD problem
-
NamedStationImpl
public NamedStationImpl(String id, String name, List coords, Unit unit) throws VisADException, RemoteException _more_- Parameters:
id
- _more_name
- _more_coords
- _more_unit
- _more_- Throws:
RemoteException
- _more_VisADException
- _more_
-
NamedStationImpl
Create a NamedStationImpl from the name and NamedLocation- Parameters:
name
- station namein_nLT
- NamedLocation
-
NamedStationImpl
public NamedStationImpl()A no-op ctor for unpersiting this
-
-
Method Details
-
setNamedLocationTuple
Have this method here for backward compatibility with bundles. deprecated- Parameters:
v
- new NamedLocationTuple
-
getCoords
_more_- Returns:
- _more_
-
getEarthLocation
Create, if needed, and return the location of this station- Returns:
- location
- Throws:
RemoteException
- Java RMI problemVisADException
- VisAD problem
-
getNamedLocation
Get theNamedLocation
for this. Used mostly by XML encoder.- Specified by:
getNamedLocation
in interfaceNamedStation
- Returns:
- NamedLocation
-
setNamedLocation
Set theNamedLocation
for this. Used mostly by XML encoder.- Specified by:
setNamedLocation
in interfaceNamedStation
- Parameters:
v
- the NamedLocation
-
getLatitude
public double getLatitude()Get the latitude. Used mostly by XML encoding.- Specified by:
getLatitude
in interfaceNamedStation
- Specified by:
getLatitude
in interfaceStation
- Returns:
- latitude (degrees)
-
setLatitude
public void setLatitude(double v) Set the latitude. Used mostly by XML encoding.- Specified by:
setLatitude
in interfaceNamedStation
- Parameters:
v
- latitude (degrees)
-
getLongitude
public double getLongitude()Get the longitude. Used mostly by XML encoding.- Specified by:
getLongitude
in interfaceNamedStation
- Specified by:
getLongitude
in interfaceStation
- Returns:
- longitude (degrees)
-
setLongitude
public void setLongitude(double v) Set the longitude. Used mostly by XML encoding.- Specified by:
setLongitude
in interfaceNamedStation
- Parameters:
v
- longitude (degrees)
-
getAltitude
Get the altitude as a real (value and unit)- Specified by:
getAltitude
in interfaceNamedStation
- Returns:
- altitude
-
setAltitude
Set the alitude. Used mostly by XML encoder.- Specified by:
setAltitude
in interfaceNamedStation
- Parameters:
v
- altitude
-
getID
Get the station ID. Used mostly by XML encoder.- Specified by:
getID
in interfaceNamedStation
- Returns:
- the station ID
-
setID
Set the station ID. Used mostly by XML encoder.- Specified by:
setID
in interfaceNamedStation
- Parameters:
v
- the station ID
-
getName
Get the station name. Used mostly by XML encoder.- Specified by:
getName
in interfaceNamedStation
- Returns:
- the station name
-
setName
Get the station name. Used mostly by XML encoder.- Specified by:
setName
in interfaceNamedStation
- Parameters:
v
- the station name
-
equals
See if the Object in question is equal to this.- Specified by:
equals
in interfaceNamedStation
- Overrides:
equals
in classObject
- Parameters:
o
- Object in question- Returns:
- true if they are equal
-
getIdentifier
Get the identifier for this NamedLocation. It can either be the station ID, or the name if ID is null- Specified by:
getIdentifier
in interfaceStation
- Returns:
- identifier for this station
-
getAltitudeAsDouble
public double getAltitudeAsDouble()Return altitude in units of getAltitudeUnit().- Returns:
- altitude value
-
getAltitudeUnit
ReturnUnit
of altitude- Returns:
- altitude Unit
-
getProperties
Get the hashtable of extra properties- Returns:
- extra properties
-
setProperties
Set the table of extra properties- Parameters:
v
- extra properties
-
addProperty
Add an extra property- Parameters:
key
- property namevalue
- property value
-
getProperty
Get an extra property- Parameters:
key
- property namedeflt
- default value if property doesn't exist
-
toString
Return a String representation of this NamedLocation -
compareTo
Compare this NamedStationImpl to another NamedStationImpl. Comparison is on the unique identifying name.- Parameters:
stn
- other NamedStationImpl to compare- Returns:
- comparative value
- See Also:
-
compareTo
Compare this NamedStationImpl to another object- Specified by:
compareTo
in interfaceComparable
- Parameters:
oo
- other object to compare- Returns:
- comparative value
-