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, wait
getPointFeatureIterator
protected 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()
PointFeatureCollection
getTimeUnit
in interface PointFeatureCollection
public java.lang.String getAltUnits()
PointFeatureCollection
getAltUnits
in interface PointFeatureCollection
public java.util.List<Variable> getExtraVariables()
PointFeatureCollection
getExtraVariables
in interface PointFeatureCollection
public void setDateRange(DateRange range)
PointFeatureCollection
setDateRange
in interface PointFeatureCollection
range
- the date range for the entire collectionpublic void setCalendarDateRange(CalendarDateRange range)
PointFeatureCollection
setCalendarDateRange
in interface PointFeatureCollection
range
- the calendar date range for the entire collectionpublic void setBoundingBox(LatLonRect bb)
PointFeatureCollection
setBoundingBox
in interface PointFeatureCollection
bb
- the lat/lon boundingBox for the entire collection.public void calcBounds() throws java.io.IOException
PointFeatureCollection
calcBounds
in interface PointFeatureCollection
java.io.IOException
- or read error.public void setSize(int npts)
PointFeatureCollection
setSize
in interface PointFeatureCollection
npts
- size of the collectionpublic java.lang.String getName()
FeatureCollection
getName
in interface FeatureCollection
public boolean hasNext() throws java.io.IOException
PointFeatureCollection
hasNext
in interface PointFeatureCollection
java.io.IOException
- on read errorPointFeatureIterator.hasNext()
public void finish()
PointFeatureCollection
finish
in interface PointFeatureCollection
PointFeatureIterator.finish()
public PointFeature next() throws java.io.IOException
PointFeatureCollection
next
in interface PointFeatureCollection
java.io.IOException
- on read errorPointFeatureIterator.next()
public void resetIteration() throws java.io.IOException
PointFeatureCollection
resetIteration
in interface PointFeatureCollection
java.io.IOException
- on read errorpublic int size()
PointFeatureCollection
size
in interface PointFeatureCollection
public int getNobs()
public DateRange getDateRange()
PointFeatureCollection
getDateRange
in interface PointFeatureCollection
public CalendarDateRange getCalendarDateRange()
PointFeatureCollection
getCalendarDateRange
in interface PointFeatureCollection
public LatLonRect getBoundingBox()
PointFeatureCollection
getBoundingBox
in interface PointFeatureCollection
public FeatureType getCollectionFeatureType()
FeatureCollection
getCollectionFeatureType
in interface FeatureCollection
public PointFeatureCollection subset(LatLonRect boundingBox, CalendarDateRange dateRange) throws java.io.IOException
PointFeatureCollection
subset
in interface PointFeatureCollection
boundingBox
- 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 PointFeatureCollection
java.io.IOException