Class RepastCoverageFactory


  • public class RepastCoverageFactory
    extends Object
    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 Detail

      • NO_DATA_CATEGORY_LABEL

        public static String 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 Detail

      • RepastCoverageFactory

        public RepastCoverageFactory()
    • Method Detail

      • 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 GeoTif
        forceLonLatAxisOrder - 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 GeoTif
        forceLonLatAxisOrder - 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 coverage
        width - the integer width of the grid
        height - the integer height of the grid
        envelope - the georeferenced envelope
        unit - the optional Unit of the data
        defaultValue - the optional default data value
        minValue - the optional minimum data used for grayscale color range
        maxValue - the optional maximum data used for grayscale color range
        noDataValue - 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 coverage
        width - the integer width of the grid
        height - the integer height of the grid
        envelope - the georeferenced envelope
        unit - the optional Unit of the data
        defaultValue - the optional default data value
        minValue - the optional minimum data used for grayscale color range
        maxValue - the optional maximum data used for grayscale color range
        noDataValue - 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 coverage
        width - the integer width of the grid
        height - the integer height of the grid
        envelope - the georeferenced envelope
        dataType - the DataBuffer type, e.g. DataBuffer.TYPE_FLOAT or TYPE_DOUBLE
        unit - the optional Unit of the data
        defaultValue - the optional default data value
        minValue - the optional minimum data used for grayscale color range
        maxValue - the optional maximum data used for grayscale color range
        noDataValue - 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)