public class OpendapGSHHSLineReader extends BinnedGSHHSLineReader
OpendapGSHHSLineReader
extends
BinnedGSHHSLineReader
to read data from an OPeNDAP-enabled
binned data file. Some optimizations are made for network
connections.BinnedGSHHSLineReader.Bin
binSize, database, dxID, dyID, firstSegment, latBins, lonBins, multiplier, numSegments, sdID, segmentLevelID, segmentPointsID, segmentStart, totalBins, totalPoints, totalSegments
area, featureList
Constructor and Description |
---|
OpendapGSHHSLineReader(java.lang.String path,
java.lang.String name)
Creates a new reader from the database name.
|
Modifier and Type | Method and Description |
---|---|
protected void |
getGlobalData()
Reads data about the entire file, including binSize,
multiplier, lonBins, latBins, totalBins, firstSegment,
numSegments, and segmentStart.
|
protected int |
openFile(java.lang.String name)
Opens the data file and returns the file ID.
|
protected void |
readData(int sdsid,
int[] start,
int[] count,
java.lang.Object data)
Reads data for the specified variable ID.
|
protected void |
readData(java.lang.String var,
int[] start,
int[] count,
java.lang.Object data)
Reads data for the specified variable name.
|
protected int |
selectData(java.lang.String var)
Gets the variable ID for the specified variable.
|
protected void |
setBinHint(int index)
Sets a hint that subsequent bin data access is about to occur.
|
protected void |
setBinListHint(java.util.List indexList)
Sets a hint that subsequent bin data access is about to occur for
a list of bins.
|
getBinIndex, getBinIndices, getBins, getDatabase, init, iterator, select, setLevelRange
render
getArea, getAttributeCount, getAttributeNameMap, getAttributes, getFilter, select, setAttributes, setFilter
public OpendapGSHHSLineReader(java.lang.String path, java.lang.String name) throws java.io.IOException
path
- the OPeNDAP server path as http://server/path.name
- the database name. Several predefined database
names are available from BinnedGSHHSReaderFactory.getDatabaseName(int, int)
.java.io.IOException
- if an error occurred reading the file.protected void setBinHint(int index)
BinnedGSHHSLineReader
setBinHint
in class BinnedGSHHSLineReader
index
- the bin that data access will be performed for next.protected void readData(int sdsid, int[] start, int[] count, java.lang.Object data) throws java.io.IOException
BinnedGSHHSLineReader
readData
in class BinnedGSHHSLineReader
sdsid
- the identifier for the variable.start
- the starting data index for reading.count
- the number of data values to read.data
- the data array to fill with values.java.io.IOException
- if an error occurred reading the data.protected void readData(java.lang.String var, int[] start, int[] count, java.lang.Object data) throws java.io.IOException
BinnedGSHHSLineReader
readData
in class BinnedGSHHSLineReader
var
- the name of the variable.start
- the starting data index for reading.count
- the number of data values to read.data
- the data array to fill with values.java.io.IOException
- if an error occurred reading the data.protected void setBinListHint(java.util.List indexList)
BinnedGSHHSLineReader
setBinListHint
in class BinnedGSHHSLineReader
indexList
- the list of bin indices to be accessed sorted in
increasing order.protected int selectData(java.lang.String var) throws java.io.IOException
BinnedGSHHSLineReader
selectData
in class BinnedGSHHSLineReader
var
- the variable name to retrieve an ID.java.io.IOException
- if an error occurred retrieving the ID.protected int openFile(java.lang.String name) throws java.io.IOException
BinnedGSHHSLineReader
openFile
in class BinnedGSHHSLineReader
name
- the data file name.java.io.IOException
- if an error occurred opening the file.protected void getGlobalData() throws java.io.IOException
BinnedGSHHSLineReader
getGlobalData
in class BinnedGSHHSLineReader
java.io.IOException
- if an error occurred reading the data.