public class BinnedGSHHSReader.Bin.Segment
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
CLOSED
The segment closed constant.
|
static int |
ISLAND_IN_LAKE
Island in lake level constant.
|
static int |
LAKE
Lake level constant.
|
static int |
LAND
Land level constant.
|
static int |
POND_IN_ISLAND
Pond in island in lake level constant.
|
Constructor and Description |
---|
Segment(byte level,
byte entry,
byte exit,
double area,
short[] dx,
short[] dy)
Creates a new segment from the specified parameters.
|
Modifier and Type | Method and Description |
---|---|
double |
getArea()
Gets the segment area in km^2.
|
short[] |
getDx()
Gets the raw segment longitude offsets.
|
short[] |
getDy()
Gets the raw segment latitude offsets.
|
java.lang.Integer |
getEntryKey()
Gets the entry sorting key.
|
byte |
getEntrySide()
Gets the segment entry side.
|
java.lang.Integer |
getExitKey()
Gets the exit sorting key.
|
byte |
getExitSide()
Gets the segment exit side.
|
byte |
getLevel()
Gets the segment level.
|
LineFeature |
getLineFeature()
Gets the earth vector for this segment.
|
boolean |
isClosed()
Determines if this segment is closed.
|
boolean |
isLand()
Determines if this polygon segment encloses land.
|
boolean |
isWater()
Determines if this polygon segment encloses water.
|
java.lang.String |
toString()
Returns a string representation of this segment.
|
public static final int LAND
public static final int LAKE
public static final int ISLAND_IN_LAKE
public static final int POND_IN_ISLAND
public static final int CLOSED
public Segment(byte level, byte entry, byte exit, double area, short[] dx, short[] dy)
level
- the segment level: land, lake, island, or pond.entry
- the segment starting side: north, south, east,
west, or closed.exit
- the segment ending side: north, south, east, west,
or closed.area
- the area of the segment polygon in km^2.dx
- the array of scaled longitudes relative to the bin
corner.dy
- the array of scaled latitudes relative to the bin
corner.public java.lang.String toString()
toString
in class java.lang.Object
public byte getLevel()
public byte getEntrySide()
public byte getExitSide()
public double getArea()
public LineFeature getLineFeature()
public short[] getDx()
public short[] getDy()
public boolean isClosed()
public java.lang.Integer getEntryKey()
public java.lang.Integer getExitKey()
public boolean isLand()
public boolean isWater()