Class BinnedGSHHSReader.Bin.Segment

java.lang.Object
noaa.coastwatch.render.feature.BinnedGSHHSReader.Bin.Segment
Enclosing class:
BinnedGSHHSReader.Bin

public class BinnedGSHHSReader.Bin.Segment extends Object
The segment class acts as a container for GSHHS shore segment data. Segments are part of a larger GSHHS polygon that has been divided into shorter sections based on their respective bins. A segment contains a number of keys to help sort segments based on entry and exit positions. The entry and exit keys sort the segment based on a counter-clockwise position starting at the south-west corner of the bin.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The segment closed constant.
    static final int
    Island in lake level constant.
    static final int
    Lake level constant.
    static final int
    Land level constant.
    static final int
    Pond in island in lake level constant.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Segment(byte level, byte entry, byte exit, double area, short[] dx, short[] dy)
    Creates a new segment from the specified parameters.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Gets the segment area in km^2.
    short[]
    Gets the raw segment longitude offsets.
    short[]
    Gets the raw segment latitude offsets.
    Gets the entry sorting key.
    byte
    Gets the segment entry side.
    Gets the exit sorting key.
    byte
    Gets the segment exit side.
    byte
    Gets the segment level.
    Gets the earth vector for this segment.
    boolean
    Determines if this segment is closed.
    boolean
    Determines if this polygon segment encloses land.
    boolean
    Determines if this polygon segment encloses water.
    Returns a string representation of this segment.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • LAND

      public static final int LAND
      Land level constant.
      See Also:
    • LAKE

      public static final int LAKE
      Lake level constant.
      See Also:
    • ISLAND_IN_LAKE

      public static final int ISLAND_IN_LAKE
      Island in lake level constant.
      See Also:
    • POND_IN_ISLAND

      public static final int POND_IN_ISLAND
      Pond in island in lake level constant.
      See Also:
    • CLOSED

      public static final int CLOSED
      The segment closed constant.
      See Also:
  • Constructor Details

    • Segment

      public Segment(byte level, byte entry, byte exit, double area, short[] dx, short[] dy)
      Creates a new segment from the specified parameters.
      Parameters:
      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.
  • Method Details

    • toString

      public String toString()
      Returns a string representation of this segment.
      Overrides:
      toString in class Object
    • getLevel

      public byte getLevel()
      Gets the segment level.
    • getEntrySide

      public byte getEntrySide()
      Gets the segment entry side.
    • getExitSide

      public byte getExitSide()
      Gets the segment exit side.
    • getArea

      public double getArea()
      Gets the segment area in km^2.
    • getLineFeature

      public LineFeature getLineFeature()
      Gets the earth vector for this segment.
    • getDx

      public short[] getDx()
      Gets the raw segment longitude offsets.
    • getDy

      public short[] getDy()
      Gets the raw segment latitude offsets.
    • isClosed

      public boolean isClosed()
      Determines if this segment is closed.
    • getEntryKey

      public Integer getEntryKey()
      Gets the entry sorting key.
    • getExitKey

      public Integer getExitKey()
      Gets the exit sorting key.
    • isLand

      public boolean isLand()
      Determines if this polygon segment encloses land.
    • isWater

      public boolean isWater()
      Determines if this polygon segment encloses water.