public class BinnedGSHHSReaderFactory
extends java.lang.Object
BinnedGSHHSReaderFactory
creates instances of
BinnedGSHHSReader
and BinnedGSHHSLineReader
objects based on a resolution requirement.Modifier and Type | Field and Description |
---|---|
static int |
BORDER
The border database type.
|
static int |
COAST
The coastline database type.
|
static int |
CRUDE
Crude resolution (25 km) database level.
|
static int |
HIGH
High resolution (0.2 km) database level.
|
static int |
INTERMEDIATE
Intermediate resolution (1.0 km) database level.
|
static int |
LOW
Low resolution (5.0 km) database level.
|
static int |
RIVER
The riever database type.
|
Modifier and Type | Method and Description |
---|---|
static int |
getDatabaseLevel(double resolution)
Gets the reader database resolution level.
|
static java.lang.String |
getDatabaseName(int type,
int level)
Gets a database name using its type and resolution level.
|
static BinnedGSHHSReaderFactory |
getInstance()
Gets an instance of this factory the uses local HDF files for
reader data.
|
static BinnedGSHHSReaderFactory |
getInstance(java.lang.String serverPath)
Gets an instance of this factory the uses the specified
OPeNDAP server path for reader data.
|
BinnedGSHHSLineReader |
getLineReader(java.lang.String name)
Gets an instance of a
BinnedGSHHSLineReader object
that uses the specified database. |
BinnedGSHHSReader |
getPolygonReader(java.lang.String name)
Gets an instance of the
BinnedGSHHSReader class that
uses the specified database. |
public static final int HIGH
public static final int INTERMEDIATE
public static final int LOW
public static final int CRUDE
public static final int COAST
public static final int BORDER
public static final int RIVER
public static BinnedGSHHSReaderFactory getInstance()
public static BinnedGSHHSReaderFactory getInstance(java.lang.String serverPath)
serverPath
- the full path to the OPeNDAP server and
subdirectory, for example "http://server.com/data".public static int getDatabaseLevel(double resolution)
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.HIGH
,
INTERMEDIATE
, LOW
, or
CRUDE
.public static java.lang.String getDatabaseName(int type, int level)
type
- the database type: COAST
,
BORDER
, or RIVER
.level
- the database resolution level:
HIGH
, INTERMEDIATE
,
LOW
, or CRUDE
.public BinnedGSHHSReader getPolygonReader(java.lang.String name) throws java.io.IOException
BinnedGSHHSReader
class that
uses the specified database. Only databases of type
COAST
are allowed.name
- the database name as returned from getDatabaseName(int, int)
.java.io.IOException
public BinnedGSHHSLineReader getLineReader(java.lang.String name) throws java.io.IOException
BinnedGSHHSLineReader
object
that uses the specified database. Only databases of type
BORDER
and RIVER
are allowed.name
- the database name as returned from getDatabaseName(int, int)
.java.io.IOException