|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectucar.nc2.ft.point.PointCollectionImpl
public abstract class PointCollectionImpl
Abstract superclass for PointFeatureCollection Subclass must supply getPointFeatureIterator().
| Nested Class Summary | |
|---|---|
protected class |
PointCollectionImpl.PointCollectionSubset
|
| Field Summary | |
|---|---|
protected LatLonRect |
boundingBox
|
protected DateRange |
dateRange
|
protected PointFeatureIterator |
localIterator
|
protected String |
name
|
protected int |
npts
|
| Constructor Summary | |
|---|---|
protected |
PointCollectionImpl(String name)
|
protected |
PointCollectionImpl(String name,
LatLonRect boundingBox,
DateRange dateRange,
int npts)
|
| Method Summary | |
|---|---|
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. |
LatLonRect |
getBoundingBox()
The boundingBox for the FeatureCollection. |
FeatureType |
getCollectionFeatureType()
All features in this collection have this feature type |
DateRange |
getDateRange()
Date range for the FeatureCollection. |
String |
getName()
Get the name of this feature collection. |
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 |
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,
DateRange dateRange)
Subset this collection by boundingBox and/or dateRange |
| 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.PointFeatureCollection |
|---|
getPointFeatureIterator |
| Field Detail |
|---|
protected String name
protected LatLonRect boundingBox
protected DateRange dateRange
protected int npts
protected PointFeatureIterator localIterator
| Constructor Detail |
|---|
protected PointCollectionImpl(String name)
protected PointCollectionImpl(String name,
LatLonRect boundingBox,
DateRange dateRange,
int npts)
| Method Detail |
|---|
public String getName()
FeatureCollection
getName in interface FeatureCollection
public boolean hasNext()
throws IOException
PointFeatureCollection
hasNext in interface PointFeatureCollectionIOException - on read errorPointFeatureIterator.hasNext()public void finish()
PointFeatureCollection
finish in interface PointFeatureCollectionPointFeatureIterator.finish()
public PointFeature next()
throws IOException
PointFeatureCollection
next in interface PointFeatureCollectionIOException - on read errorPointFeatureIterator.next()
public void resetIteration()
throws IOException
PointFeatureCollection
resetIteration in interface PointFeatureCollectionIOException - on read errorpublic int size()
PointFeatureCollection
size in interface PointFeatureCollectionpublic DateRange getDateRange()
PointFeatureCollection
getDateRange in interface PointFeatureCollectionpublic LatLonRect getBoundingBox()
PointFeatureCollection
getBoundingBox in interface PointFeatureCollectionpublic void setDateRange(DateRange range)
PointFeatureCollection
setDateRange in interface PointFeatureCollectionrange - the date range for the entire collectionpublic void setBoundingBox(LatLonRect bb)
PointFeatureCollection
setBoundingBox in interface PointFeatureCollectionbb - the lat/lon boundingBox for the entire collection.
public void calcBounds()
throws IOException
PointFeatureCollection
calcBounds in interface PointFeatureCollectionIOException - or read error.public void setSize(int npts)
PointFeatureCollection
setSize in interface PointFeatureCollectionnpts - size of the collectionpublic FeatureType getCollectionFeatureType()
FeatureCollection
getCollectionFeatureType in interface FeatureCollection
public PointFeatureCollection subset(LatLonRect boundingBox,
DateRange dateRange)
throws IOException
PointFeatureCollection
subset in interface PointFeatureCollectionboundingBox - only points in this lat/lon bounding box. may be null.dateRange - only points in this date range. may be null.
IOException - on read error
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||