Package noaa.coastwatch.render.feature
Class BinnedGSHHSReaderFactory
java.lang.Object
noaa.coastwatch.render.feature.BinnedGSHHSReaderFactory
A
BinnedGSHHSReaderFactory
creates instances of
BinnedGSHHSReader
and BinnedGSHHSLineReader
objects based on a resolution requirement.- Since:
- 3.2.1
- Author:
- Peter Hollemans
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The border database type.static final int
The coastline database type.static final int
Crude resolution (25 km) database level.static final int
Full resolution (less than 0.2 km).static final int
High resolution (0.2 km) database level.static final int
Intermediate resolution (1.0 km) database level.static final int
Low resolution (5.0 km) database level.static final int
The riever database type. -
Method Summary
Modifier and TypeMethodDescriptionstatic int
getDatabaseLevel
(double resolution) Gets the reader database resolution level.static String
getDatabaseName
(int type, int level) Gets a database name using its type and resolution level.static BinnedGSHHSReaderFactory
Gets an instance of this factory the uses local HDF files for reader data.static BinnedGSHHSReaderFactory
getInstance
(String serverPath) Gets an instance of this factory the uses the specified OPeNDAP server path for reader data.getLineReader
(String name) Gets an instance of aBinnedGSHHSLineReader
object that uses the specified database.getPolygonReader
(String name) Gets an instance of theBinnedGSHHSReader
class that uses the specified database.
-
Field Details
-
FULL
public static final int FULLFull resolution (less than 0.2 km).- See Also:
-
HIGH
public static final int HIGHHigh resolution (0.2 km) database level.- See Also:
-
INTERMEDIATE
public static final int INTERMEDIATEIntermediate resolution (1.0 km) database level.- See Also:
-
LOW
public static final int LOWLow resolution (5.0 km) database level.- See Also:
-
CRUDE
public static final int CRUDECrude resolution (25 km) database level.- See Also:
-
COAST
public static final int COASTThe coastline database type.- See Also:
-
BORDER
public static final int BORDERThe border database type.- See Also:
-
RIVER
public static final int RIVERThe riever database type.- See Also:
-
-
Method Details
-
getInstance
Gets an instance of this factory the uses local HDF files for reader data. -
getInstance
Gets an instance of this factory the uses the specified OPeNDAP server path for reader data.- Parameters:
serverPath
- the full path to the OPeNDAP server and subdirectory, for example "http://server.com/data".
-
getDatabaseLevel
public static int getDatabaseLevel(double resolution) Gets the reader database resolution level.- Parameters:
resolution
- the pixel resolution in kilometers. The resolution determines the tolerance level used to decimate polygons from the full resolution database. Resolution values should reflect the desired accuracy of line rendering. For example, if the lines are to be rendered on an image where each pixel measures 5 km across, the lines (and possibly polygons) need not include features any smaller than 5 km. The resolution is used to determine the appropriate database name.- Returns:
- the resolution level:
FULL
,HIGH
,INTERMEDIATE
,LOW
, orCRUDE
.
-
getDatabaseName
Gets a database name using its type and resolution level.- Parameters:
type
- the database type:COAST
,BORDER
, orRIVER
.level
- the database resolution level:HIGH
,INTERMEDIATE
,LOW
, orCRUDE
.- Returns:
- the name of the matching database.
-
getPolygonReader
Gets an instance of theBinnedGSHHSReader
class that uses the specified database. Only databases of typeCOAST
are allowed.- Parameters:
name
- the database name as returned fromgetDatabaseName(int, int)
.- Returns:
- the reader object.
- Throws:
IOException
-
getLineReader
Gets an instance of aBinnedGSHHSLineReader
object that uses the specified database. Only databases of typeBORDER
andRIVER
are allowed.- Parameters:
name
- the database name as returned fromgetDatabaseName(int, int)
.- Returns:
- the reader object.
- Throws:
IOException
-