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
FieldsModifier and TypeFieldDescriptionstatic final intThe border database type.static final intThe coastline database type.static final intCrude resolution (25 km) database level.static final intFull resolution (less than 0.2 km).static final intHigh resolution (0.2 km) database level.static final intIntermediate resolution (1.0 km) database level.static final intLow resolution (5.0 km) database level.static final intThe riever database type. -
Method Summary
Modifier and TypeMethodDescriptionstatic intgetDatabaseLevel(double resolution) Gets the reader database resolution level.static StringgetDatabaseName(int type, int level) Gets a database name using its type and resolution level.static BinnedGSHHSReaderFactoryGets an instance of this factory the uses local HDF files for reader data.static BinnedGSHHSReaderFactorygetInstance(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 aBinnedGSHHSLineReaderobject that uses the specified database.getPolygonReader(String name) Gets an instance of theBinnedGSHHSReaderclass 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 theBinnedGSHHSReaderclass that uses the specified database. Only databases of typeCOASTare allowed.- Parameters:
name- the database name as returned fromgetDatabaseName(int, int).- Returns:
- the reader object.
- Throws:
IOException
-
getLineReader
Gets an instance of aBinnedGSHHSLineReaderobject that uses the specified database. Only databases of typeBORDERandRIVERare allowed.- Parameters:
name- the database name as returned fromgetDatabaseName(int, int).- Returns:
- the reader object.
- Throws:
IOException
-