Package noaa.coastwatch.render.feature
Class HDFGSHHSLineReader
java.lang.Object
noaa.coastwatch.render.feature.AbstractFeatureSource
noaa.coastwatch.render.feature.LineFeatureSource
noaa.coastwatch.render.feature.BinnedGSHHSLineReader
noaa.coastwatch.render.feature.HDFGSHHSLineReader
- All Implemented Interfaces:
Iterable<Feature>
,FeatureSource
The
HDFGSHHSLineReader
extends
BinnedGSHHSLineReader
to read data from an HDF binned
data file.- Since:
- 3.2.1
- Author:
- Peter Hollemans
-
Nested Class Summary
Nested classes/interfaces inherited from class noaa.coastwatch.render.feature.BinnedGSHHSLineReader
BinnedGSHHSLineReader.Bin
-
Field Summary
Fields inherited from class noaa.coastwatch.render.feature.BinnedGSHHSLineReader
binSize, database, dxID, dyID, firstSegment, latBins, lonBins, multiplier, numSegments, sdID, segmentLevelID, segmentPointsID, segmentStart, totalBins, totalPoints, totalSegments
Fields inherited from class noaa.coastwatch.render.feature.AbstractFeatureSource
area, featureList
-
Constructor Summary
ConstructorDescriptionHDFGSHHSLineReader
(String name) Creates a new binned GSHHS reader from the database file name. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
finalize()
protected void
Reads data about the entire file, including binSize, multiplier, lonBins, latBins, totalBins, firstSegment, numSegments, and segmentStart.protected int
Opens the data file and returns the file ID.protected void
Reads data for the specified variable ID.protected void
Reads data for the specified variable name.protected int
selectData
(String var) Gets the variable ID for the specified variable.Methods inherited from class noaa.coastwatch.render.feature.BinnedGSHHSLineReader
getBinIndex, getBinIndices, getBins, getDatabase, init, iterator, select, setBinHint, setBinListHint, setLevelRange
Methods inherited from class noaa.coastwatch.render.feature.LineFeatureSource
render
Methods inherited from class noaa.coastwatch.render.feature.AbstractFeatureSource
getArea, getAttributeCount, getAttributeNameMap, getAttributes, getFilter, select, setAttributes, setFilter
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
HDFGSHHSLineReader
Creates a new binned GSHHS reader from the database file name. By default, there is no minimum area for polygon selection and no polygons are selected.- Parameters:
name
- the database name. Several predefined database names are available fromBinnedGSHHSReaderFactory.getDatabaseName(int, int)
.- Throws:
IOException
- if an error occurred reading the file.
-
-
Method Details
-
readData
Description copied from class:BinnedGSHHSLineReader
Reads data for the specified variable ID.- Specified by:
readData
in classBinnedGSHHSLineReader
- Parameters:
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.- Throws:
IOException
- if an error occurred reading the data.
-
readData
Description copied from class:BinnedGSHHSLineReader
Reads data for the specified variable name.- Specified by:
readData
in classBinnedGSHHSLineReader
- Parameters:
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.- Throws:
IOException
- if an error occurred reading the data.
-
selectData
Description copied from class:BinnedGSHHSLineReader
Gets the variable ID for the specified variable.- Specified by:
selectData
in classBinnedGSHHSLineReader
- Parameters:
var
- the variable name to retrieve an ID.- Returns:
- the variable ID.
- Throws:
IOException
- if an error occurred retrieving the ID.
-
openFile
Description copied from class:BinnedGSHHSLineReader
Opens the data file and returns the file ID.- Specified by:
openFile
in classBinnedGSHHSLineReader
- Parameters:
name
- the data file name.- Throws:
IOException
- if an error occurred opening the file.
-
getGlobalData
Description copied from class:BinnedGSHHSLineReader
Reads data about the entire file, including binSize, multiplier, lonBins, latBins, totalBins, firstSegment, numSegments, and segmentStart.- Specified by:
getGlobalData
in classBinnedGSHHSLineReader
- Throws:
IOException
- if an error occurred reading the data.
-
finalize
-