Package noaa.coastwatch.render.feature
Class OpendapGSHHSReader
java.lang.Object
noaa.coastwatch.render.feature.AbstractFeatureSource
noaa.coastwatch.render.feature.LineFeatureSource
noaa.coastwatch.render.feature.PolygonFeatureSource
noaa.coastwatch.render.feature.BinnedGSHHSReader
noaa.coastwatch.render.feature.OpendapGSHHSReader
- All Implemented Interfaces:
Iterable<Feature>
,FeatureSource
The
OpendapGSHHSReader
extends
BinnedGSHHSReader
to read data from an OPeNDAP-enabled
binned data file. Some optimizations are made for network
connections.- Since:
- 3.2.1
- Author:
- Peter Hollemans
-
Nested Class Summary
Nested classes/interfaces inherited from class noaa.coastwatch.render.feature.BinnedGSHHSReader
BinnedGSHHSReader.Bin
-
Field Summary
Fields inherited from class noaa.coastwatch.render.feature.BinnedGSHHSReader
binInfo, binSize, database, dxID, dyID, firstSegment, latBins, lonBins, multiplier, numSegments, sdID, segmentAreaID, segmentInfoID, segmentStart, totalBins, totalPoints, totalSegments
Fields inherited from class noaa.coastwatch.render.feature.PolygonFeatureSource
polygonList
Fields inherited from class noaa.coastwatch.render.feature.AbstractFeatureSource
area, featureList
-
Constructor Summary
ConstructorDescriptionOpendapGSHHSReader
(String path, String name) Creates a new binned GSHHS reader from the database name. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Reads data about the entire file, including binSize, multiplier, lonBins, latBins, totalBins, firstSegment, numSegments, binInfo, 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.protected void
setBinHint
(int index) Sets a hint that subsequent bin data access is about to occur.protected void
setBinListHint
(List indexList) Sets a hint that subsequent bin data access is about to occur for a list of bins.Methods inherited from class noaa.coastwatch.render.feature.BinnedGSHHSReader
getBinIndex, getBinIndices, getBins, getDatabase, getMinArea, getPolygonRendering, init, select, setMinArea, setPolygonRendering
Methods inherited from class noaa.coastwatch.render.feature.PolygonFeatureSource
renderOutlines, renderPolygons
Methods inherited from class noaa.coastwatch.render.feature.LineFeatureSource
render
Methods inherited from class noaa.coastwatch.render.feature.AbstractFeatureSource
getArea, getAttributeCount, getAttributeNameMap, getAttributes, getFilter, iterator, select, setAttributes, setFilter
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
OpendapGSHHSReader
Creates a new binned GSHHS reader from the database name. By default, there is no minimum area for polygon selection and no polygons are selected.- Parameters:
path
- the OPeNDAP server path as http://server/path.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
-
setBinHint
protected void setBinHint(int index) Description copied from class:BinnedGSHHSReader
Sets a hint that subsequent bin data access is about to occur. This may be used by child classes to increase the speed of bin data access.- Overrides:
setBinHint
in classBinnedGSHHSReader
- Parameters:
index
- the bin that data access will be performed for next.
-
readData
Description copied from class:BinnedGSHHSReader
Reads data for the specified variable ID.- Specified by:
readData
in classBinnedGSHHSReader
- 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:BinnedGSHHSReader
Reads data for the specified variable name.- Specified by:
readData
in classBinnedGSHHSReader
- 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.
-
setBinListHint
Description copied from class:BinnedGSHHSReader
Sets a hint that subsequent bin data access is about to occur for a list of bins. This may be used by child classes to increase the speed of bin data access.- Overrides:
setBinListHint
in classBinnedGSHHSReader
- Parameters:
indexList
- the list of bin indices to be accessed sorted in increasing order.
-
selectData
Description copied from class:BinnedGSHHSReader
Gets the variable ID for the specified variable.- Specified by:
selectData
in classBinnedGSHHSReader
- 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:BinnedGSHHSReader
Opens the data file and returns the file ID.- Specified by:
openFile
in classBinnedGSHHSReader
- Parameters:
name
- the data file name.- Throws:
IOException
- if an error occurred opening the file.
-
getGlobalData
Description copied from class:BinnedGSHHSReader
Reads data about the entire file, including binSize, multiplier, lonBins, latBins, totalBins, firstSegment, numSegments, binInfo, and segmentStart.- Specified by:
getGlobalData
in classBinnedGSHHSReader
- Throws:
IOException
- if an error occurred reading the data.
-