ucar.nc2.ft.point
Class StationFeatureImpl

java.lang.Object
  extended by ucar.nc2.ft.point.PointCollectionImpl
      extended by ucar.nc2.ft.point.StationFeatureImpl
All Implemented Interfaces:
Comparable<Station>, FeatureCollection, PointFeatureCollection, StationTimeSeriesFeature, EarthLocation, Station

public abstract class StationFeatureImpl
extends PointCollectionImpl
implements StationTimeSeriesFeature

Superclass for implementations of StationFeature: time series of data at a point Concrete subclass must implement getPointFeatureIterator();

Author:
caron

Nested Class Summary
 
Nested classes/interfaces inherited from class ucar.nc2.ft.point.PointCollectionImpl
PointCollectionImpl.PointCollectionSubset
 
Field Summary
protected  Station s
           
protected  DateUnit timeUnit
           
 
Fields inherited from class ucar.nc2.ft.point.PointCollectionImpl
boundingBox, dateRange, localIterator, name, npts
 
Constructor Summary
StationFeatureImpl(Station s, DateUnit timeUnit, int npts)
           
StationFeatureImpl(String name, String desc, String wmoId, double lat, double lon, double alt, DateUnit timeUnit, int npts)
           
 
Method Summary
 int compareTo(Station so)
           
 double getAltitude()
          altitude in meters; missing = NaN.
 FeatureType getCollectionFeatureType()
          All features in this collection have this feature type
 String getDescription()
          Station description
 double getLatitude()
          latitude in decimal degrees north
 LatLonPoint getLatLon()
          Get the lat/lon location
 double getLongitude()
          longitude in decimal degrees east
 String getName()
          Get the name of this feature collection.
 String getWmoId()
          WMO station id.
 boolean isMissing()
          Are either lat or lon missing?
 void setNumberPoints(int npts)
           
 int size()
          The number of points in the collection.
 StationTimeSeriesFeature subset(DateRange dateRange)
          Subset this collection by dateRange
 String toString()
           
 
Methods inherited from class ucar.nc2.ft.point.PointCollectionImpl
calcBounds, finish, getBoundingBox, getDateRange, hasNext, next, resetIteration, setBoundingBox, setDateRange, setSize, subset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ucar.nc2.ft.PointFeatureCollection
calcBounds, finish, getBoundingBox, getDateRange, getPointFeatureIterator, hasNext, next, resetIteration, setBoundingBox, setDateRange, setSize, subset
 

Field Detail

s

protected Station s

timeUnit

protected DateUnit timeUnit
Constructor Detail

StationFeatureImpl

public StationFeatureImpl(String name,
                          String desc,
                          String wmoId,
                          double lat,
                          double lon,
                          double alt,
                          DateUnit timeUnit,
                          int npts)

StationFeatureImpl

public StationFeatureImpl(Station s,
                          DateUnit timeUnit,
                          int npts)
Method Detail

getWmoId

public String getWmoId()
Description copied from interface: Station
WMO station id.

Specified by:
getWmoId in interface Station
Returns:
WMO station id, or null.

size

public int size()
Description copied from interface: PointFeatureCollection
The number of points in the collection. May not be known until after iterating through the collection.

Specified by:
size in interface PointFeatureCollection
Specified by:
size in interface StationTimeSeriesFeature
Overrides:
size in class PointCollectionImpl
Returns:
number of points in the collection, or -1 if not known.

setNumberPoints

public void setNumberPoints(int npts)

getName

public String getName()
Description copied from interface: FeatureCollection
Get the name of this feature collection.

Specified by:
getName in interface FeatureCollection
Specified by:
getName in interface Station
Overrides:
getName in class PointCollectionImpl
Returns:
the name of this feature collection

getDescription

public String getDescription()
Description copied from interface: Station
Station description

Specified by:
getDescription in interface Station
Returns:
station description

getLatitude

public double getLatitude()
Description copied from interface: EarthLocation
latitude in decimal degrees north

Specified by:
getLatitude in interface EarthLocation
Returns:
latitude in decimal degrees north

getLongitude

public double getLongitude()
Description copied from interface: EarthLocation
longitude in decimal degrees east

Specified by:
getLongitude in interface EarthLocation
Returns:
longitude in decimal degrees east

getAltitude

public double getAltitude()
Description copied from interface: EarthLocation
altitude in meters; missing = NaN. LOOK: what is the reference surface ? for now assume mean sea level ???

Specified by:
getAltitude in interface EarthLocation
Returns:
altitude in meters; missing = NaN.

getLatLon

public LatLonPoint getLatLon()
Description copied from interface: EarthLocation
Get the lat/lon location

Specified by:
getLatLon in interface EarthLocation
Returns:
lat/lon location

isMissing

public boolean isMissing()
Description copied from interface: EarthLocation
Are either lat or lon missing?

Specified by:
isMissing in interface EarthLocation
Returns:
true if lat or lon is missing

getCollectionFeatureType

public FeatureType getCollectionFeatureType()
Description copied from interface: FeatureCollection
All features in this collection have this feature type

Specified by:
getCollectionFeatureType in interface FeatureCollection
Overrides:
getCollectionFeatureType in class PointCollectionImpl
Returns:
the feature type

toString

public String toString()
Overrides:
toString in class Object

subset

public StationTimeSeriesFeature subset(DateRange dateRange)
                                throws IOException
Description copied from interface: StationTimeSeriesFeature
Subset this collection by dateRange

Specified by:
subset in interface StationTimeSeriesFeature
Parameters:
dateRange - only points in this date range. may be null.
Returns:
subsetted collection, may be null if empty
Throws:
IOException - on read error

compareTo

public int compareTo(Station so)
Specified by:
compareTo in interface Comparable<Station>


Copyright © 1999-2011 UCAR/Unidata. All Rights Reserved.