Package repast.simphony.space.gis
Class RepastCoverageFactory
java.lang.Object
repast.simphony.space.gis.RepastCoverageFactory
Factory that provides support for creating GridCoverage2D instances that are
writable.
Current write capability of WritableGridCoverage2D is limited to a single band.
TODO GIS provide multiple band write capability.
- Author:
- Eric Tatara
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.geotools.coverage.grid.GridCoverage2D
createCoverageFromFile
(File file, boolean forceLonLatAxisOrder) Create a coverage using a coverage file.static WritableGridCoverage2D
createWritableByteIndexedCoverage
(String name, int width, int height, org.geotools.geometry.jts.ReferencedEnvelope envelope, org.geotools.coverage.Category[] categories, javax.measure.Unit<?> unit, int defaultValue) static WritableGridCoverage2D
createWritableCoverage
(String name, int width, int height, org.geotools.geometry.jts.ReferencedEnvelope envelope, int dataType, javax.measure.Unit<?> unit, Double defaultValue, Double minValue, Double maxValue, Double noDataValue) Create a WritableGridCoverage2D suitable for in-memory read/write.static WritableGridCoverage2D
createWritableCoverageDouble
(String name, int width, int height, org.geotools.geometry.jts.ReferencedEnvelope envelope, javax.measure.Unit<?> unit, double defaultValue, double minValue, double maxValue, double noDataValue) Create a WritableGridCoverage2D suitable for in-memory read/write with double precision data.static WritableGridCoverage2D
createWritableCoverageFloat
(String name, int width, int height, org.geotools.geometry.jts.ReferencedEnvelope envelope, javax.measure.Unit<?> unit, double defaultValue, double minValue, double maxValue, double noDataValue) Create a WritableGridCoverage2D suitable for in-memory read/write with float precision data.static WritableGridCoverage2D
createWritableCoverageFromFile
(File file, boolean forceLonLatAxisOrder) Create a writable coverage using a coverage file.static WritableGridCoverage2D
createWritableIndexedCoverage
(String name, int width, int height, org.geotools.geometry.jts.ReferencedEnvelope envelope, org.geotools.coverage.Category[] categories, int dataType, javax.measure.Unit<?> unit, Integer defaultValue) static WritableGridCoverage2D
createWritableShortIndexedCoverage
(String name, int width, int height, org.geotools.geometry.jts.ReferencedEnvelope envelope, org.geotools.coverage.Category[] categories, javax.measure.Unit<?> unit, int defaultValue)
-
Field Details
-
NO_DATA_CATEGORY_LABEL
-
MAX_SHORT_COLOR_INDEX
public static int MAX_SHORT_COLOR_INDEX -
MAX_BYTE_COLOR_INDEX
public static int MAX_BYTE_COLOR_INDEX
-
-
Constructor Details
-
RepastCoverageFactory
public RepastCoverageFactory()
-
-
Method Details
-
createWritableCoverageFromFile
public static WritableGridCoverage2D createWritableCoverageFromFile(File file, boolean forceLonLatAxisOrder) Create a writable coverage using a coverage file.- Parameters:
file
- a georeferenced coverage file such as GeoTifforceLonLatAxisOrder
- forces lon,lat coordinate order on read- Returns:
- WritableGridCoverage2D a writable GridCoverage2D
-
createCoverageFromFile
public static org.geotools.coverage.grid.GridCoverage2D createCoverageFromFile(File file, boolean forceLonLatAxisOrder) Create a coverage using a coverage file.- Parameters:
file
- a georeferenced coverage file such as GeoTifforceLonLatAxisOrder
- forces lon,lat coordinate order on read- Returns:
- GridCoverage2D
-
createWritableCoverageDouble
public static WritableGridCoverage2D createWritableCoverageDouble(String name, int width, int height, org.geotools.geometry.jts.ReferencedEnvelope envelope, javax.measure.Unit<?> unit, double defaultValue, double minValue, double maxValue, double noDataValue) Create a WritableGridCoverage2D suitable for in-memory read/write with double precision data.- Parameters:
name
- of the coveragewidth
- the integer width of the gridheight
- the integer height of the gridenvelope
- the georeferenced envelopeunit
- the optionalUnit
of the datadefaultValue
- the optional default data valueminValue
- the optional minimum data used for grayscale color rangemaxValue
- the optional maximum data used for grayscale color rangenoDataValue
- the optional "NO DATA" value- Returns:
- the WritableGridCoverage2D created with input arguments
-
createWritableCoverageFloat
public static WritableGridCoverage2D createWritableCoverageFloat(String name, int width, int height, org.geotools.geometry.jts.ReferencedEnvelope envelope, javax.measure.Unit<?> unit, double defaultValue, double minValue, double maxValue, double noDataValue) Create a WritableGridCoverage2D suitable for in-memory read/write with float precision data.- Parameters:
name
- of the coveragewidth
- the integer width of the gridheight
- the integer height of the gridenvelope
- the georeferenced envelopeunit
- the optionalUnit
of the datadefaultValue
- the optional default data valueminValue
- the optional minimum data used for grayscale color rangemaxValue
- the optional maximum data used for grayscale color rangenoDataValue
- the optional "NO DATA" value- Returns:
- the WritableGridCoverage2D created with input arguments
-
createWritableCoverage
public static WritableGridCoverage2D createWritableCoverage(String name, int width, int height, org.geotools.geometry.jts.ReferencedEnvelope envelope, int dataType, javax.measure.Unit<?> unit, Double defaultValue, Double minValue, Double maxValue, Double noDataValue) Create a WritableGridCoverage2D suitable for in-memory read/write.- Parameters:
name
- of the coveragewidth
- the integer width of the gridheight
- the integer height of the gridenvelope
- the georeferenced envelopedataType
- the DataBuffer type, e.g. DataBuffer.TYPE_FLOAT or TYPE_DOUBLEunit
- the optionalUnit
of the datadefaultValue
- the optional default data valueminValue
- the optional minimum data used for grayscale color rangemaxValue
- the optional maximum data used for grayscale color rangenoDataValue
- the optional "NO DATA" value- Returns:
- the WritableGridCoverage2D created with input arguments
-
createWritableByteIndexedCoverage
public static WritableGridCoverage2D createWritableByteIndexedCoverage(String name, int width, int height, org.geotools.geometry.jts.ReferencedEnvelope envelope, org.geotools.coverage.Category[] categories, javax.measure.Unit<?> unit, int defaultValue) -
createWritableShortIndexedCoverage
public static WritableGridCoverage2D createWritableShortIndexedCoverage(String name, int width, int height, org.geotools.geometry.jts.ReferencedEnvelope envelope, org.geotools.coverage.Category[] categories, javax.measure.Unit<?> unit, int defaultValue) -
createWritableIndexedCoverage
public static WritableGridCoverage2D createWritableIndexedCoverage(String name, int width, int height, org.geotools.geometry.jts.ReferencedEnvelope envelope, org.geotools.coverage.Category[] categories, int dataType, javax.measure.Unit<?> unit, Integer defaultValue)
-