Class CoverageStore

All Implemented Interfaces:
PopupActivationListener, SpatialStore, Serializable, Comparable, EventListener, ListSelectionListener, TableModel

public class CoverageStore extends ShapeStore
Access ESRI coverage files. This class reads polygon and line coverages. Point coverages have not yet been thoroughly tested.
See Also:
Serialized Form
  • Constructor Details

    • CoverageStore

      public CoverageStore(File directory, int type) throws FileNotFoundException
      Create a coverage reader object. The directory parameter describes the path to the coverage directory. The type parameter is one of POLYGON, POLYLINE or POINT.
      Throws:
      FileNotFoundException
  • Method Details

    • getValueAt

      public Object getValueAt(int row, int column, int period)
      Implementation of data accessor
      Specified by:
      getValueAt in class AttributeStore
      Parameters:
      row - The row containing the cell
      column - The column containing the cell
      period - The period of interest
      Returns:
      An object containing the cell value.
    • getType

      public int getType()
      Return the coverage type.
    • getDirectory

      public File getDirectory()
    • getRowCount

      public int getRowCount()
      Return the number of records in the coverage.
      Specified by:
      getRowCount in interface SpatialStore
      Specified by:
      getRowCount in interface TableModel
      Specified by:
      getRowCount in class AttributeStore
      Returns:
      the number of rows in this store
    • getPeriodCount

      public int getPeriodCount()
      Description copied from class: AttributeStore
      Get the total number of periods that this store supports
      Specified by:
      getPeriodCount in class AttributeStore
      Returns:
      The number of periods in this store
    • getYearForPeriod

      public int getYearForPeriod(int period)
      Description copied from class: AttributeStore
      Get the ending year for a given period.
      Specified by:
      getYearForPeriod in class AttributeStore
      Parameters:
      period - The period of interest
      Returns:
      the year for a given period
    • close

      public void close()
      Release resources.
      Overrides:
      close in class AttributeStore
    • getSelection

      public BitSet getSelection(Extent2D e)
      Return a selection bitmap.
      Parameters:
      e - The selection rectangle of interest
      Returns:
      A set of selected records
    • getShape

      public GeoShape getShape(int id, int period)
      Retrieve a specified shape from the shapefile. Record numbers start at 0.
      Parameters:
      id - The record of interest
      period - The period of interest
      Returns:
      A shape object
    • getCoordinates

      public double[][] getCoordinates(int row)
      Description copied from interface: SpatialStore
      Get a list of raw coordinates for the points in this shape.
      Parameters:
      row - The row of interest
      Returns:
      An array of arrays of coordinate points. Each element in the outer array contains a 'part' of the underlying shape (for example, and island or a multi-part polygon). The inner array index holds the coordinate points of that part.
    • getExtent2D

      public Extent2D getExtent2D(int row, int period)
      Description copied from interface: SpatialStore
      Get the enclosing rectangle of a feature
      Parameters:
      row - The record of interest
      period - The period of interest
      Returns:
      A rectangle
    • getArcCoords

      public double[] getArcCoords(int arcId) throws IOException
      Return the coordinates of an arc with a given internal id.
      Throws:
      IOException
    • getLength

      public double getLength(double[] c)
      Return the length of a arc specified by an array of coordinates.
    • getArcBox

      public double[] getArcBox(double[] c)
      Return the bounding box specified by an array of coordinates.
    • getPal

      public int[][] getPal(int polyId) throws IOException
      Return an array of topology information about a polygon with a given polyId.
      Returns:
      An 2d array of elements. The first dimension is for the number of pal records. The second dimension is for the pal information (arcId, neighbour, nodeId).
      Throws:
      IOException
    • hasSpatialIndex

      public boolean hasSpatialIndex()
      Description copied from interface: SpatialStore
      Query if this SpatialStore has a spatial index
    • canBuildSpatialIndex

      public boolean canBuildSpatialIndex()
      Description copied from interface: SpatialStore
      Query if this SpatialStore is capable of building a spatial index
    • makeSpatialIndex

      public void makeSpatialIndex() throws Exception
      Description copied from interface: SpatialStore
      Request that this SpatialStore create a spatial index
      Throws:
      Exception