|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectucar.nc2.dt.TypedDatasetImpl
ucar.nc2.dt.point.PointObsDatasetImpl
ucar.nc2.dt.point.DapperDataset
public class DapperDataset
Handles datasets using Dapper doubley nested sequences.
Nested Class Summary | |
---|---|
class |
DapperDataset.SeqPointObs
|
class |
DapperDataset.SeqStationObs
|
Field Summary | |
---|---|
protected Variable |
altVar
|
protected DODSNetcdfFile |
dodsFile
|
protected boolean |
fatal
|
protected StructureDS |
innerSequence
|
protected boolean |
isProfile
|
protected Variable |
latVar
|
protected Variable |
lonVar
|
protected StructureDS |
outerSequence
|
protected Variable |
timeVar
|
Fields inherited from class ucar.nc2.dt.point.PointObsDatasetImpl |
---|
formatter, timeUnit |
Fields inherited from class ucar.nc2.dt.TypedDatasetImpl |
---|
boundingBox, dataVariables, desc, endDate, location, ncfile, parseInfo, startDate, title |
Constructor Summary | |
---|---|
DapperDataset()
|
|
DapperDataset(NetcdfDataset ds)
|
Method Summary | |
---|---|
static PointObsDataset |
factory(NetcdfDataset ds)
|
List |
getData(CancelTask cancel)
Get all data, allow user to cancel. |
List |
getData(LatLonRect boundingBox,
CancelTask cancel)
Get all data within the specified bounding box, allow user to cancel. |
List |
getData(LatLonRect boundingBox,
Date start,
Date end,
CancelTask cancel)
Get all data within the specified bounding box and date range, allow user to cancel. |
int |
getDataCount()
Get estimate of number of data records (may not be exact). |
DataIterator |
getDataIterator(int bufferSize)
Get an efficient iterator over all the data in the Collection. |
boolean |
isMine(NetcdfDataset ds)
Determine if this dataset belongs to you |
static boolean |
isValidFile(NetcdfFile ds)
|
static void |
main(String[] args)
|
TypedDataset |
open(NetcdfDataset ncd,
CancelTask task,
StringBuilder errlog)
Open a NetcdfDataset as a TypedDataset. |
List |
readStationData(Station s,
CancelTask cancel)
|
void |
readStations(List stations)
|
protected void |
setBoundingBox()
|
protected void |
setEndDate()
|
protected void |
setStartDate()
|
protected void |
setTimeUnits()
|
Methods inherited from class ucar.nc2.dt.point.PointObsDatasetImpl |
---|
getData, getData, getData, getDataClass, getDetailInfo, getMetersConversionFactor, getScientificDataType, getTime, getTimeUnits |
Methods inherited from class ucar.nc2.dt.TypedDatasetImpl |
---|
close, findGlobalAttributeIgnoreCase, getBoundingBox, getDataVariable, getDataVariables, getDescription, getEndDate, getGlobalAttributes, getLocation, getLocationURI, getNetcdfFile, getStartDate, getTitle, removeDataVariable, setDescription, setLocationURI, setTitle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface ucar.nc2.dt.TypedDatasetFactoryIF |
---|
getScientificDataType |
Methods inherited from interface ucar.nc2.dt.TypedDataset |
---|
close, findGlobalAttributeIgnoreCase, getBoundingBox, getDataVariable, getDataVariables, getDescription, getEndDate, getGlobalAttributes, getLocationURI, getNetcdfFile, getStartDate, getTitle |
Field Detail |
---|
protected DODSNetcdfFile dodsFile
protected Variable latVar
protected Variable lonVar
protected Variable altVar
protected Variable timeVar
protected StructureDS innerSequence
protected StructureDS outerSequence
protected boolean isProfile
protected boolean fatal
Constructor Detail |
---|
public DapperDataset()
public DapperDataset(NetcdfDataset ds) throws IOException
IOException
Method Detail |
---|
public static boolean isValidFile(NetcdfFile ds)
public static PointObsDataset factory(NetcdfDataset ds) throws IOException
IOException
public boolean isMine(NetcdfDataset ds)
TypedDatasetFactoryIF
isMine
in interface TypedDatasetFactoryIF
ds
- examine this NetcdfDataset to see if it belongs to this class.
public TypedDataset open(NetcdfDataset ncd, CancelTask task, StringBuilder errlog) throws IOException
TypedDatasetFactoryIF
open
in interface TypedDatasetFactoryIF
ncd
- already opened NetcdfDataset.task
- use may cancelerrlog
- place errors here
IOException
- on errorprotected void setTimeUnits()
setTimeUnits
in class PointObsDatasetImpl
protected void setStartDate()
setStartDate
in class TypedDatasetImpl
protected void setEndDate()
setEndDate
in class TypedDatasetImpl
protected void setBoundingBox()
setBoundingBox
in class TypedDatasetImpl
public int getDataCount()
PointCollection
getDataCount
in interface PointCollection
public List getData(CancelTask cancel) throws IOException
PointCollection
getData
in interface PointCollection
cancel
- allow user to cancel. Implementors should return ASAP.
IOException
- on io erroras a (possibly) more efficient alternative
public List getData(LatLonRect boundingBox, CancelTask cancel) throws IOException
PointCollection
getData
in interface PointCollection
boundingBox
- restrict data to this bounding noxcancel
- allow user to cancel. Implementors should return ASAP.
IOException
- on io erroras a (possibly) more efficient alternative
public List getData(LatLonRect boundingBox, Date start, Date end, CancelTask cancel) throws IOException
PointCollection
getData
in interface PointCollection
boundingBox
- restrict data to this bounding noxstart
- restrict data to after this timeend
- restrict data to before this timecancel
- allow user to cancel. Implementors should return ASAP.
IOException
- on io erroras a (possibly) more efficient alternative
public void readStations(List stations) throws IOException
IOException
public List readStationData(Station s, CancelTask cancel) throws IOException
IOException
public DataIterator getDataIterator(int bufferSize) throws IOException
PointCollection
We dont need a cancelTask, just stop the iteration if the user want to cancel.
Example for point observations: Iterator iter = pointObsDataset.getDataIterator(); while (iter.hasNext()) { PointObsDatatype pobs = (PointObsDatatype) iter.next(); StructureData sdata = pobs.getData(); // process fully }
getDataIterator
in interface PointCollection
bufferSize
- if > 0, the internal buffer size, else use the default. Typically 100k - 1M for best results.
IOException
- on io errorpublic static void main(String[] args) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |