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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description WritableGridCoverage2D(org.geotools.coverage.grid.GridCoverage2D grid)
-
Method Summary
All Methods Instance Methods Concrete Methods 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)
Object
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
getCoordinateReferenceSystem()
RenderableImage
getRenderableImage(int xAxis, int yAxis)
RenderedImage
getRenderedImage()
boolean
isDataEditable()
void
prefetch(Rectangle2D area)
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
-
-
-
-
Method Detail
-
evaluate
public Object evaluate(org.opengis.geometry.DirectPosition point) throws org.opengis.coverage.CannotEvaluateException
- Specified by:
evaluate
in interfaceorg.opengis.coverage.Coverage
- Overrides:
evaluate
in 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:
evaluate
in interfaceorg.opengis.coverage.Coverage
- Overrides:
evaluate
in 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:
evaluate
in interfaceorg.opengis.coverage.Coverage
- Overrides:
evaluate
in 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:
evaluate
in interfaceorg.opengis.coverage.Coverage
- Overrides:
evaluate
in 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:
evaluate
in interfaceorg.opengis.coverage.Coverage
- Overrides:
evaluate
in classorg.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 classorg.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 classorg.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 classorg.geotools.coverage.grid.GridCoverage2D
- Throws:
org.opengis.coverage.CannotEvaluateException
-
evaluate
public int[] evaluate(org.geotools.coverage.grid.GridCoordinates2D coord, int[] dest)
- Overrides:
evaluate
in classorg.geotools.coverage.grid.GridCoverage2D
-
evaluate
public float[] evaluate(org.geotools.coverage.grid.GridCoordinates2D coord, float[] dest)
- Overrides:
evaluate
in classorg.geotools.coverage.grid.GridCoverage2D
-
evaluate
public double[] evaluate(org.geotools.coverage.grid.GridCoordinates2D coord, double[] dest)
- Overrides:
evaluate
in classorg.geotools.coverage.grid.GridCoverage2D
-
getRenderableImage
public RenderableImage getRenderableImage(int xAxis, int yAxis)
- Specified by:
getRenderableImage
in interfaceorg.opengis.coverage.Coverage
- Overrides:
getRenderableImage
in classorg.geotools.coverage.grid.GridCoverage2D
-
getRenderedImage
public RenderedImage getRenderedImage()
- Specified by:
getRenderedImage
in interfaceorg.opengis.coverage.grid.GridCoverage
- Overrides:
getRenderedImage
in classorg.geotools.coverage.grid.GridCoverage2D
-
isDataEditable
public boolean isDataEditable()
- Specified by:
isDataEditable
in interfaceorg.opengis.coverage.grid.GridCoverage
- Overrides:
isDataEditable
in classorg.geotools.coverage.grid.GridCoverage2D
-
prefetch
public void prefetch(Rectangle2D area)
- Overrides:
prefetch
in classorg.geotools.coverage.grid.GridCoverage2D
-
show
public void show(String title, int xAxis, int yAxis)
- Overrides:
show
in classorg.geotools.coverage.grid.GridCoverage2D
-
show
public void show(String title)
- Overrides:
show
in classorg.geotools.coverage.grid.GridCoverage2D
-
getCoordinateReferenceSystem
public org.opengis.referencing.crs.CoordinateReferenceSystem getCoordinateReferenceSystem()
- Specified by:
getCoordinateReferenceSystem
in interfaceorg.opengis.coverage.Coverage
- Overrides:
getCoordinateReferenceSystem
in 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)
-
-