Package noaa.coastwatch.render.feature
Class BinnedGSHHSReader.Bin
java.lang.Object
noaa.coastwatch.render.feature.BinnedGSHHSReader.Bin
- Enclosing class:
- BinnedGSHHSReader
The bin class acts as a container for GSHHS shore segments. Each
bin contains a number of segments and a corner location. Bin
indexing starts at 0 at (90N, 0E) and proceeds west to east,
north to south.
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
The segment class acts as a container for GSHHS shore segment data. -
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The east side constant.static final int
The north side constant.static final int
The north-east corner.static final int
The north-west corner.static final int
The south side constant.static final int
The south-east corner.static final int
The south-west corner.static final int
The west side constant. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the south-west corner earth location.getCorner
(int index) Gets the specified corner earth location.byte
getCornerLevel
(int index) Gets the specified corner level.getLineFeature
(int index) Gets an earth vector for the specified segment.byte
Gets the minimum bin corner level.Gets the segments in this bin as a list of closed Earth polygons.getSegment
(int index) Gets the specified segment.int
Gets the number of segments.
-
Field Details
-
SOUTH_WEST
public static final int SOUTH_WESTThe south-west corner.- See Also:
-
SOUTH_EAST
public static final int SOUTH_EASTThe south-east corner.- See Also:
-
NORTH_EAST
public static final int NORTH_EASTThe north-east corner.- See Also:
-
NORTH_WEST
public static final int NORTH_WESTThe north-west corner.- See Also:
-
SOUTH
public static final int SOUTHThe south side constant.- See Also:
-
EAST
public static final int EASTThe east side constant.- See Also:
-
NORTH
public static final int NORTHThe north side constant.- See Also:
-
WEST
public static final int WESTThe west side constant.- See Also:
-
-
Constructor Details
-
Bin
Creates a new bin from the specified index. The segments are read into the bin using the current minimum area.- Parameters:
binIndex
- the bin index.- Throws:
IOException
- See Also:
-
-
Method Details
-
getSegments
public int getSegments()Gets the number of segments. -
getSegment
Gets the specified segment. -
getCorner
Gets the south-west corner earth location. -
getCorner
Gets the specified corner earth location. -
getCornerLevel
public byte getCornerLevel(int index) Gets the specified corner level. -
getMinimumLevel
public byte getMinimumLevel()Gets the minimum bin corner level. -
getLineFeature
Gets an earth vector for the specified segment.- Parameters:
index
- the index of the segment to convert.- Returns:
- the new earth vector.
-
getPolygonFeatures
Gets the segments in this bin as a list of closed Earth polygons. The convention used is for land polygons to have the counter-clockwise winding direction and water polygons to have clockwise winding. The polygons in the list are specified in rendering order.- Returns:
- a list of earth polygon objects based on the segments in this bin.
-