Package ucar.nc2.ft.point
Class StationProfileFeatureImpl
- java.lang.Object
-
- ucar.nc2.ft.point.DsgCollectionImpl
-
- ucar.nc2.ft.point.PointFeatureCCImpl
-
- ucar.nc2.ft.point.StationProfileFeatureImpl
-
- All Implemented Interfaces:
Comparable<Station>,Iterable<ProfileFeature>,DsgFeatureCollection,StationFeature,PointFeatureCC,StationProfileFeature,EarthLocation,Station
- Direct Known Subclasses:
StationProfileFeatureImpl.StationProfileFeatureSubset
public abstract class StationProfileFeatureImpl extends PointFeatureCCImpl implements StationProfileFeature
Abstract superclass for implementations of StationProfileFeature. Subclass must implement getPointFeatureCollectionIterator();- Since:
- Feb 29, 2008
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classStationProfileFeatureImpl.StationProfileFeatureSubset
-
Field Summary
Fields Modifier and Type Field Description protected PointFeatureCollectionIteratorlocalIteratorprotected Stationstationprotected inttimeSeriesNpts-
Fields inherited from class ucar.nc2.ft.point.PointFeatureCCImpl
collectionFeatureType
-
-
Constructor Summary
Constructors Constructor Description StationProfileFeatureImpl(String name, String desc, String wmoId, double lat, double lon, double alt, CalendarDateUnit timeUnit, String altUnits, int npts)StationProfileFeatureImpl(Station s, CalendarDateUnit timeUnit, String altUnits, int npts)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Station so)doublegetAltitude()Returns the altitude in some unit.StringgetDescription()Station descriptiondoublegetLatitude()Returns the latitude in some unit.LatLonPointgetLatLon()Get the lat/lon locationdoublegetLongitude()Returns the longitude in some unit.StringgetName()Get the name of this feature collection.intgetNobs()get Number of obs at this stationStringgetWmoId()WMO station id.booleanhasNext()Use the internal iterator to check if there is another ProfileFeature in the iteration.booleanisMissing()Are either lat or lon missing?Iterator<ProfileFeature>iterator()ProfileFeaturenext()Use the internal iterator to get the next ProfileFeature in the iteration.voidresetIteration()Reset the internal iterator for another iteration over the ProfileFeature in this Collection.intsize()The number of Features in the collection.StationProfileFeaturesubset(CalendarDateRange dateRange)Subset this collection by dateRangeStationProfileFeaturesubset(LatLonRect boundingBox)-
Methods inherited from class ucar.nc2.ft.point.PointFeatureCCImpl
getCollectionFeatureType
-
Methods inherited from class ucar.nc2.ft.point.DsgCollectionImpl
getAltUnits, getBoundingBox, getCalendarDateRange, getExtraVariables, getInfo, getTimeUnit
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ucar.nc2.ft.DsgFeatureCollection
getAltUnits, getBoundingBox, getCalendarDateRange, getCollectionFeatureType, getExtraVariables, getTimeUnit
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface ucar.nc2.ft.PointFeatureCC
getCollectionIterator
-
Methods inherited from interface ucar.nc2.ft.StationProfileFeature
getFeatureData, getPointFeatureCollectionIterator, getProfileByDate, getTimes
-
-
-
-
Field Detail
-
timeSeriesNpts
protected int timeSeriesNpts
-
station
protected Station station
-
localIterator
protected PointFeatureCollectionIterator localIterator
-
-
Constructor Detail
-
StationProfileFeatureImpl
public StationProfileFeatureImpl(String name, String desc, String wmoId, double lat, double lon, double alt, CalendarDateUnit timeUnit, String altUnits, int npts)
-
StationProfileFeatureImpl
public StationProfileFeatureImpl(Station s, CalendarDateUnit timeUnit, String altUnits, int npts)
-
-
Method Detail
-
getNobs
public int getNobs()
Description copied from interface:Stationget Number of obs at this station- Specified by:
getNobsin interfaceStation- Overrides:
getNobsin classDsgCollectionImpl- Returns:
- Number of obs or -1 if unknown
-
size
public int size()
Description copied from interface:DsgFeatureCollectionThe number of Features in the collection. May not be known until after iterating through the collection.- Specified by:
sizein interfaceDsgFeatureCollection- Specified by:
sizein interfaceStationProfileFeature- Overrides:
sizein classDsgCollectionImpl- Returns:
- number of elements in the collection, or -1 if not known.
-
getName
@Nonnull public String getName()
Description copied from interface:DsgFeatureCollectionGet the name of this feature collection.- Specified by:
getNamein interfaceDsgFeatureCollection- Specified by:
getNamein interfaceStation- Overrides:
getNamein classDsgCollectionImpl- Returns:
- the name of this feature collection
-
getDescription
public String getDescription()
Description copied from interface:StationStation description- Specified by:
getDescriptionin interfaceStation- Returns:
- station description or null
-
getLatitude
public double getLatitude()
Description copied from interface:EarthLocationReturns the latitude in some unit. The unit is very likely decimal degrees north, but we don't enforce that anywhere.- Specified by:
getLatitudein interfaceEarthLocation- Returns:
- the latitude in some unit.
-
getLongitude
public double getLongitude()
Description copied from interface:EarthLocationReturns the longitude in some unit. The unit is very likely decimal degrees east, but we don't enforce that anywhere.- Specified by:
getLongitudein interfaceEarthLocation- Returns:
- the longitude in some unit.
-
getAltitude
public double getAltitude()
Description copied from interface:EarthLocationReturns the altitude in some unit.- Specified by:
getAltitudein interfaceEarthLocation- Returns:
- the altitude in some unit. A value of
Double.NaNindicates "no altitude".
-
getLatLon
public LatLonPoint getLatLon()
Description copied from interface:EarthLocationGet the lat/lon location- Specified by:
getLatLonin interfaceEarthLocation- Returns:
- lat/lon location
-
isMissing
public boolean isMissing()
Description copied from interface:EarthLocationAre either lat or lon missing?- Specified by:
isMissingin interfaceEarthLocation- Returns:
- true if lat or lon is missing
-
compareTo
public int compareTo(@Nonnull Station so)- Specified by:
compareToin interfaceComparable<Station>
-
subset
public StationProfileFeature subset(LatLonRect boundingBox)
-
subset
public StationProfileFeature subset(CalendarDateRange dateRange)
Description copied from interface:StationProfileFeatureSubset this collection by dateRange- Specified by:
subsetin interfaceStationProfileFeature- Parameters:
dateRange- only points in this date range. may be null.- Returns:
- subsetted collection, may be null if empty
-
iterator
public Iterator<ProfileFeature> iterator()
- Specified by:
iteratorin interfaceIterable<ProfileFeature>
-
hasNext
public boolean hasNext() throws IOExceptionDescription copied from interface:StationProfileFeatureUse the internal iterator to check if there is another ProfileFeature in the iteration.- Specified by:
hasNextin interfaceStationProfileFeature- Returns:
- true is there is another ProfileFeature in the iteration.
- Throws:
IOException- on read error
-
next
public ProfileFeature next() throws IOException
Description copied from interface:StationProfileFeatureUse the internal iterator to get the next ProfileFeature in the iteration. You must call hasNext() before you call this.- Specified by:
nextin interfaceStationProfileFeature- Returns:
- the next ProfileFeature in the iteration
- Throws:
IOException- on read error
-
resetIteration
public void resetIteration() throws IOExceptionDescription copied from interface:StationProfileFeatureReset the internal iterator for another iteration over the ProfileFeature in this Collection.- Specified by:
resetIterationin interfaceStationProfileFeature- Throws:
IOException- on read error
-
-