Package repast.simphony.space.gis
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, imageFields inherited from class org.geotools.coverage.grid.AbstractGridCoverage
LOGGERFields inherited from class org.geotools.coverage.AbstractCoverage
crsFields inherited from class javax.media.jai.PropertySourceImpl
cachedPropertyNames, properties, propertySources -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble[]float[]int[]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) voidflushCache(boolean force) org.opengis.referencing.crs.CoordinateReferenceSystemgetRenderableImage(int xAxis, int yAxis) booleanvoidprefetch(Rectangle2D area) voidsetValue(org.geotools.coverage.grid.GridCoordinates2D gridPos, double value) voidsetValue(org.geotools.coverage.grid.GridCoordinates2D gridPos, float value) voidsetValue(org.geotools.coverage.grid.GridCoordinates2D gridPos, int value) voidsetValue(org.opengis.geometry.DirectPosition worldPos, double value) voidsetValue(org.opengis.geometry.DirectPosition worldPos, float value) voidsetValue(org.opengis.geometry.DirectPosition worldPos, int value) voidvoidMethods inherited from class org.geotools.coverage.grid.GridCoverage2D
dispose, getCoordinateReferenceSystem2D, getDebugString, getEnvelope, getEnvelope2D, getGridGeometry, getInterpolation, getNumSampleDimensions, getOptimalDataBlockSizes, getSampleDimension, getSampleDimensions, toStringMethods inherited from class org.geotools.coverage.grid.AbstractGridCoverage
formatEvaluateError, formatEvaluateError, getNumOverviews, getOverview, getOverviewGridGeometry, getSourcesMethods inherited from class org.geotools.coverage.AbstractCoverage
evaluate, evaluate, getDimension, getLocale, getName, getRangeType, showMethods inherited from class javax.media.jai.PropertySourceImpl
getProperties, getProperty, getPropertyClass, getPropertyNames, getPropertyNamesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
evaluatein interfaceorg.opengis.coverage.Coverage- Overrides:
evaluatein classorg.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:
evaluatein interfaceorg.opengis.coverage.Coverage- Overrides:
evaluatein classorg.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:
evaluatein interfaceorg.opengis.coverage.Coverage- Overrides:
evaluatein classorg.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:
evaluatein interfaceorg.opengis.coverage.Coverage- Overrides:
evaluatein classorg.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:
evaluatein interfaceorg.opengis.coverage.Coverage- Overrides:
evaluatein classorg.geotools.coverage.grid.GridCoverage2D- Throws:
org.opengis.coverage.CannotEvaluateException
-
evaluate
public int[] evaluate(Point2D coord, int[] dest) throws org.opengis.coverage.CannotEvaluateException - Overrides:
evaluatein classorg.geotools.coverage.grid.GridCoverage2D- Throws:
org.opengis.coverage.CannotEvaluateException
-
evaluate
public float[] evaluate(Point2D coord, float[] dest) throws org.opengis.coverage.CannotEvaluateException - Overrides:
evaluatein classorg.geotools.coverage.grid.GridCoverage2D- Throws:
org.opengis.coverage.CannotEvaluateException
-
evaluate
public double[] evaluate(Point2D coord, double[] dest) throws org.opengis.coverage.CannotEvaluateException - Overrides:
evaluatein classorg.geotools.coverage.grid.GridCoverage2D- Throws:
org.opengis.coverage.CannotEvaluateException
-
evaluate
public int[] evaluate(org.geotools.coverage.grid.GridCoordinates2D coord, int[] dest) - Overrides:
evaluatein classorg.geotools.coverage.grid.GridCoverage2D
-
evaluate
public float[] evaluate(org.geotools.coverage.grid.GridCoordinates2D coord, float[] dest) - Overrides:
evaluatein classorg.geotools.coverage.grid.GridCoverage2D
-
evaluate
public double[] evaluate(org.geotools.coverage.grid.GridCoordinates2D coord, double[] dest) - Overrides:
evaluatein classorg.geotools.coverage.grid.GridCoverage2D
-
getRenderableImage
- Specified by:
getRenderableImagein interfaceorg.opengis.coverage.Coverage- Overrides:
getRenderableImagein classorg.geotools.coverage.grid.GridCoverage2D
-
getRenderedImage
- Specified by:
getRenderedImagein interfaceorg.opengis.coverage.grid.GridCoverage- Overrides:
getRenderedImagein classorg.geotools.coverage.grid.GridCoverage2D
-
isDataEditable
public boolean isDataEditable()- Specified by:
isDataEditablein interfaceorg.opengis.coverage.grid.GridCoverage- Overrides:
isDataEditablein classorg.geotools.coverage.grid.GridCoverage2D
-
prefetch
- Overrides:
prefetchin classorg.geotools.coverage.grid.GridCoverage2D
-
show
- Overrides:
showin classorg.geotools.coverage.grid.GridCoverage2D
-
show
- Overrides:
showin classorg.geotools.coverage.grid.GridCoverage2D
-
getCoordinateReferenceSystem
public org.opengis.referencing.crs.CoordinateReferenceSystem getCoordinateReferenceSystem()- Specified by:
getCoordinateReferenceSystemin interfaceorg.opengis.coverage.Coverage- Overrides:
getCoordinateReferenceSystemin classorg.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)
-