public abstract class PointCollectionImpl extends java.lang.Object implements PointFeatureCollection
| Modifier and Type | Class and Description |
|---|---|
protected static class |
PointCollectionImpl.PointCollectionSubset |
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
altUnits |
protected LatLonRect |
boundingBox |
protected CalendarDateRange |
dateRange |
protected java.util.List<Variable> |
extras |
protected PointFeatureIterator |
localIterator |
protected java.lang.String |
name |
protected int |
npts |
protected DateUnit |
timeUnit |
| Modifier | Constructor and Description |
|---|---|
protected |
PointCollectionImpl(java.lang.String name,
DateUnit timeUnit,
java.lang.String altUnits) |
| Modifier and Type | Method and Description |
|---|---|
void |
calcBounds()
Caclulate date range and bounding box, and size, even if the data has to be scanned.
|
void |
finish()
Make sure that the internal iterator is complete, and recover resources.
|
java.lang.String |
getAltUnits()
The altitude unit string if it exists.
|
LatLonRect |
getBoundingBox()
The boundingBox for the FeatureCollection.
|
CalendarDateRange |
getCalendarDateRange()
Calendar date range for the FeatureCollection.
|
FeatureType |
getCollectionFeatureType()
All features in this collection have this feature type
|
DateRange |
getDateRange()
Date range for the FeatureCollection.
|
java.util.List<Variable> |
getExtraVariables()
Other variables needed for co,pleteness, eg joined coordinate variables
|
java.lang.String |
getName()
Get the name of this feature collection.
|
int |
getNobs() |
DateUnit |
getTimeUnit()
The udunit time unit string.
|
boolean |
hasNext()
Use the internal iterator to check if there is another PointFeature in the iteration.
|
PointFeature |
next()
Use the internal iterator to get the next PointFeature in the iteration.
|
void |
resetIteration()
Reset the internal iterator for another iteration over the PointFeatures in this Collection.
|
void |
setBoundingBox(LatLonRect bb)
Set the boundingBox for the FeatureCollection.
|
void |
setCalendarDateRange(CalendarDateRange range)
Set the calendar date range for the FeatureCollection.
|
void |
setDateRange(DateRange range)
Set the date range for the FeatureCollection.
|
void |
setSize(int npts)
Set the size of the FeatureCollection.
|
int |
size()
The number of points in the collection.
|
PointFeatureCollection |
subset(LatLonRect boundingBox,
CalendarDateRange dateRange)
Subset this collection by boundingBox and/or dateRange
|
PointFeatureCollection |
subset(LatLonRect boundingBox,
DateRange dateRange) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPointFeatureIteratorprotected java.lang.String name
protected LatLonRect boundingBox
protected CalendarDateRange dateRange
protected int npts
protected PointFeatureIterator localIterator
protected DateUnit timeUnit
protected java.lang.String altUnits
protected java.util.List<Variable> extras
protected PointCollectionImpl(java.lang.String name,
DateUnit timeUnit,
java.lang.String altUnits)
public DateUnit getTimeUnit()
PointFeatureCollectiongetTimeUnit in interface PointFeatureCollectionpublic java.lang.String getAltUnits()
PointFeatureCollectiongetAltUnits in interface PointFeatureCollectionpublic java.util.List<Variable> getExtraVariables()
PointFeatureCollectiongetExtraVariables in interface PointFeatureCollectionpublic void setDateRange(DateRange range)
PointFeatureCollectionsetDateRange in interface PointFeatureCollectionrange - the date range for the entire collectionpublic void setCalendarDateRange(CalendarDateRange range)
PointFeatureCollectionsetCalendarDateRange in interface PointFeatureCollectionrange - the calendar date range for the entire collectionpublic void setBoundingBox(LatLonRect bb)
PointFeatureCollectionsetBoundingBox in interface PointFeatureCollectionbb - the lat/lon boundingBox for the entire collection.public void calcBounds()
throws java.io.IOException
PointFeatureCollectioncalcBounds in interface PointFeatureCollectionjava.io.IOException - or read error.public void setSize(int npts)
PointFeatureCollectionsetSize in interface PointFeatureCollectionnpts - size of the collectionpublic java.lang.String getName()
FeatureCollectiongetName in interface FeatureCollectionpublic boolean hasNext()
throws java.io.IOException
PointFeatureCollectionhasNext in interface PointFeatureCollectionjava.io.IOException - on read errorPointFeatureIterator.hasNext()public void finish()
PointFeatureCollectionfinish in interface PointFeatureCollectionPointFeatureIterator.finish()public PointFeature next() throws java.io.IOException
PointFeatureCollectionnext in interface PointFeatureCollectionjava.io.IOException - on read errorPointFeatureIterator.next()public void resetIteration()
throws java.io.IOException
PointFeatureCollectionresetIteration in interface PointFeatureCollectionjava.io.IOException - on read errorpublic int size()
PointFeatureCollectionsize in interface PointFeatureCollectionpublic int getNobs()
public DateRange getDateRange()
PointFeatureCollectiongetDateRange in interface PointFeatureCollectionpublic CalendarDateRange getCalendarDateRange()
PointFeatureCollectiongetCalendarDateRange in interface PointFeatureCollectionpublic LatLonRect getBoundingBox()
PointFeatureCollectiongetBoundingBox in interface PointFeatureCollectionpublic FeatureType getCollectionFeatureType()
FeatureCollectiongetCollectionFeatureType in interface FeatureCollectionpublic PointFeatureCollection subset(LatLonRect boundingBox, CalendarDateRange dateRange) throws java.io.IOException
PointFeatureCollectionsubset in interface PointFeatureCollectionboundingBox - only points in this lat/lon bounding box. may be null.dateRange - only points in this date range. may be null.java.io.IOException - on read errorpublic PointFeatureCollection subset(LatLonRect boundingBox, DateRange dateRange) throws java.io.IOException
subset in interface PointFeatureCollectionjava.io.IOException