Class WritableGridCoverage2D

java.lang.Object
javax.media.jai.PropertySourceImpl
org.geotools.coverage.AbstractCoverage
org.geotools.coverage.grid.AbstractGridCoverage
org.geotools.coverage.grid.GridCoverage2D
repast.simphony.space.gis.WritableGridCoverage2D
All Implemented Interfaces:
Serializable, javax.media.jai.PropertySource, org.opengis.coverage.Coverage, org.opengis.coverage.grid.GridCoverage

public class WritableGridCoverage2D extends org.geotools.coverage.grid.GridCoverage2D
WritableGridCoverage2D provides write capabilities to GridCoverage2D by wrapping a standard GridCoverage2D and overriding the evaluate methods and providing set methods. All other method calls are handled as usual by the parent Abstract coverage which is set via super(). Adapted from example code in the GeoTools distribution. Original work by Michael Bedward. TODO GIS catch set position or lat/lon out of bounds TODO GIS allow multi-band storage
Author:
Michael Bedward, Eric Tatara
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.geotools.coverage.grid.GridCoverage2D

    org.geotools.coverage.grid.GridCoverage2D.Renderable
  • Field Summary

    Fields inherited from class org.geotools.coverage.grid.GridCoverage2D

    gridGeometry, image

    Fields inherited from class org.geotools.coverage.grid.AbstractGridCoverage

    LOGGER

    Fields inherited from class org.geotools.coverage.AbstractCoverage

    crs

    Fields inherited from class javax.media.jai.PropertySourceImpl

    cachedPropertyNames, properties, propertySources
  • Constructor Summary

    Constructors
    Constructor
    Description
    WritableGridCoverage2D(org.geotools.coverage.grid.GridCoverage2D grid)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    double[]
    evaluate(Point2D coord, double[] dest)
     
    float[]
    evaluate(Point2D coord, float[] dest)
     
    int[]
    evaluate(Point2D coord, int[] dest)
     
    double[]
    evaluate(org.geotools.coverage.grid.GridCoordinates2D coord, double[] dest)
     
    float[]
    evaluate(org.geotools.coverage.grid.GridCoordinates2D coord, float[] dest)
     
    int[]
    evaluate(org.geotools.coverage.grid.GridCoordinates2D coord, int[] dest)
     
    evaluate(org.opengis.geometry.DirectPosition point)
     
    byte[]
    evaluate(org.opengis.geometry.DirectPosition coord, byte[] dest)
     
    double[]
    evaluate(org.opengis.geometry.DirectPosition coord, double[] dest)
     
    float[]
    evaluate(org.opengis.geometry.DirectPosition coord, float[] dest)
     
    int[]
    evaluate(org.opengis.geometry.DirectPosition coord, int[] dest)
     
    void
    flushCache(boolean force)
     
    org.opengis.referencing.crs.CoordinateReferenceSystem
     
    getRenderableImage(int xAxis, int yAxis)
     
     
    boolean
     
    void
     
    void
    setValue(org.geotools.coverage.grid.GridCoordinates2D gridPos, double value)
     
    void
    setValue(org.geotools.coverage.grid.GridCoordinates2D gridPos, float value)
     
    void
    setValue(org.geotools.coverage.grid.GridCoordinates2D gridPos, int value)
     
    void
    setValue(org.opengis.geometry.DirectPosition worldPos, double value)
     
    void
    setValue(org.opengis.geometry.DirectPosition worldPos, float value)
     
    void
    setValue(org.opengis.geometry.DirectPosition worldPos, int value)
     
    void
    show(String title)
     
    void
    show(String title, int xAxis, int yAxis)
     

    Methods inherited from class org.geotools.coverage.grid.GridCoverage2D

    dispose, getCoordinateReferenceSystem2D, getDebugString, getEnvelope, getEnvelope2D, getGridGeometry, getInterpolation, getNumSampleDimensions, getOptimalDataBlockSizes, getSampleDimension, getSampleDimensions, toString

    Methods inherited from class org.geotools.coverage.grid.AbstractGridCoverage

    formatEvaluateError, formatEvaluateError, getNumOverviews, getOverview, getOverviewGridGeometry, getSources

    Methods inherited from class org.geotools.coverage.AbstractCoverage

    evaluate, evaluate, getDimension, getLocale, getName, getRangeType, show

    Methods inherited from class javax.media.jai.PropertySourceImpl

    getProperties, getProperty, getPropertyClass, getPropertyNames, getPropertyNames

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.opengis.coverage.Coverage

    evaluate, evaluate, getRangeType
  • Constructor Details

    • WritableGridCoverage2D

      public WritableGridCoverage2D(org.geotools.coverage.grid.GridCoverage2D grid)
  • Method Details

    • evaluate

      public Object evaluate(org.opengis.geometry.DirectPosition point) throws org.opengis.coverage.CannotEvaluateException
      Specified by:
      evaluate in interface org.opengis.coverage.Coverage
      Overrides:
      evaluate in class org.geotools.coverage.grid.GridCoverage2D
      Throws:
      org.opengis.coverage.CannotEvaluateException
    • evaluate

      public byte[] evaluate(org.opengis.geometry.DirectPosition coord, byte[] dest) throws org.opengis.coverage.CannotEvaluateException
      Specified by:
      evaluate in interface org.opengis.coverage.Coverage
      Overrides:
      evaluate in class org.geotools.coverage.grid.GridCoverage2D
      Throws:
      org.opengis.coverage.CannotEvaluateException
    • evaluate

      public int[] evaluate(org.opengis.geometry.DirectPosition coord, int[] dest) throws org.opengis.coverage.CannotEvaluateException
      Specified by:
      evaluate in interface org.opengis.coverage.Coverage
      Overrides:
      evaluate in class org.geotools.coverage.grid.GridCoverage2D
      Throws:
      org.opengis.coverage.CannotEvaluateException
    • evaluate

      public float[] evaluate(org.opengis.geometry.DirectPosition coord, float[] dest) throws org.opengis.coverage.CannotEvaluateException
      Specified by:
      evaluate in interface org.opengis.coverage.Coverage
      Overrides:
      evaluate in class org.geotools.coverage.grid.GridCoverage2D
      Throws:
      org.opengis.coverage.CannotEvaluateException
    • evaluate

      public double[] evaluate(org.opengis.geometry.DirectPosition coord, double[] dest) throws org.opengis.coverage.CannotEvaluateException
      Specified by:
      evaluate in interface org.opengis.coverage.Coverage
      Overrides:
      evaluate in class org.geotools.coverage.grid.GridCoverage2D
      Throws:
      org.opengis.coverage.CannotEvaluateException
    • evaluate

      public int[] evaluate(Point2D coord, int[] dest) throws org.opengis.coverage.CannotEvaluateException
      Overrides:
      evaluate in class org.geotools.coverage.grid.GridCoverage2D
      Throws:
      org.opengis.coverage.CannotEvaluateException
    • evaluate

      public float[] evaluate(Point2D coord, float[] dest) throws org.opengis.coverage.CannotEvaluateException
      Overrides:
      evaluate in class org.geotools.coverage.grid.GridCoverage2D
      Throws:
      org.opengis.coverage.CannotEvaluateException
    • evaluate

      public double[] evaluate(Point2D coord, double[] dest) throws org.opengis.coverage.CannotEvaluateException
      Overrides:
      evaluate in class org.geotools.coverage.grid.GridCoverage2D
      Throws:
      org.opengis.coverage.CannotEvaluateException
    • evaluate

      public int[] evaluate(org.geotools.coverage.grid.GridCoordinates2D coord, int[] dest)
      Overrides:
      evaluate in class org.geotools.coverage.grid.GridCoverage2D
    • evaluate

      public float[] evaluate(org.geotools.coverage.grid.GridCoordinates2D coord, float[] dest)
      Overrides:
      evaluate in class org.geotools.coverage.grid.GridCoverage2D
    • evaluate

      public double[] evaluate(org.geotools.coverage.grid.GridCoordinates2D coord, double[] dest)
      Overrides:
      evaluate in class org.geotools.coverage.grid.GridCoverage2D
    • getRenderableImage

      public RenderableImage getRenderableImage(int xAxis, int yAxis)
      Specified by:
      getRenderableImage in interface org.opengis.coverage.Coverage
      Overrides:
      getRenderableImage in class org.geotools.coverage.grid.GridCoverage2D
    • getRenderedImage

      public RenderedImage getRenderedImage()
      Specified by:
      getRenderedImage in interface org.opengis.coverage.grid.GridCoverage
      Overrides:
      getRenderedImage in class org.geotools.coverage.grid.GridCoverage2D
    • isDataEditable

      public boolean isDataEditable()
      Specified by:
      isDataEditable in interface org.opengis.coverage.grid.GridCoverage
      Overrides:
      isDataEditable in class org.geotools.coverage.grid.GridCoverage2D
    • prefetch

      public void prefetch(Rectangle2D area)
      Overrides:
      prefetch in class org.geotools.coverage.grid.GridCoverage2D
    • show

      public void show(String title, int xAxis, int yAxis)
      Overrides:
      show in class org.geotools.coverage.grid.GridCoverage2D
    • show

      public void show(String title)
      Overrides:
      show in class org.geotools.coverage.grid.GridCoverage2D
    • getCoordinateReferenceSystem

      public org.opengis.referencing.crs.CoordinateReferenceSystem getCoordinateReferenceSystem()
      Specified by:
      getCoordinateReferenceSystem in interface org.opengis.coverage.Coverage
      Overrides:
      getCoordinateReferenceSystem in class org.geotools.coverage.AbstractCoverage
    • setValue

      public void setValue(org.opengis.geometry.DirectPosition worldPos, int value)
    • setValue

      public void setValue(org.opengis.geometry.DirectPosition worldPos, float value)
    • setValue

      public void setValue(org.opengis.geometry.DirectPosition worldPos, double value)
    • setValue

      public void setValue(org.geotools.coverage.grid.GridCoordinates2D gridPos, int value)
    • setValue

      public void setValue(org.geotools.coverage.grid.GridCoordinates2D gridPos, float value)
    • setValue

      public void setValue(org.geotools.coverage.grid.GridCoordinates2D gridPos, double value)
    • flushCache

      public void flushCache(boolean force)