Package org.apache.sedona.common.raster
Class RasterOutputs
java.lang.Object
org.apache.sedona.common.raster.RasterOutputs
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]asArcGrid(org.geotools.coverage.grid.GridCoverage2D raster) static byte[]asArcGrid(org.geotools.coverage.grid.GridCoverage2D raster, int sourceBand) static StringasBase64(org.geotools.coverage.grid.GridCoverage2D raster) static StringasBase64(org.geotools.coverage.grid.GridCoverage2D raster, int maxWidth) static byte[]asGeoTiff(org.geotools.coverage.grid.GridCoverage2D raster) static byte[]asGeoTiff(org.geotools.coverage.grid.GridCoverage2D raster, String compressionType, double compressionQuality) static StringasMatrix(org.geotools.coverage.grid.GridCoverage2D raster) static StringasMatrix(org.geotools.coverage.grid.GridCoverage2D raster, int band) static StringasMatrix(org.geotools.coverage.grid.GridCoverage2D raster, int band, int postDecimalPrecision) static StringasMatrixPretty(org.geotools.coverage.grid.GridCoverage2D raster, int band, int precision) static byte[]asPNG(org.geotools.coverage.grid.GridCoverage2D raster) static byte[]asPNG(org.geotools.coverage.grid.GridCoverage2D raster, int maxWidth) static StringcreateHTMLString(org.geotools.coverage.grid.GridCoverage2D raster) static StringcreateHTMLString(org.geotools.coverage.grid.GridCoverage2D raster, int imageWidth) static booleanwriteToDiskFile(byte[] bytes, String filePath) Creates a GeoTiff file with the provided raster.
-
Constructor Details
-
RasterOutputs
public RasterOutputs()
-
-
Method Details
-
asGeoTiff
public static byte[] asGeoTiff(org.geotools.coverage.grid.GridCoverage2D raster, String compressionType, double compressionQuality) -
asGeoTiff
public static byte[] asGeoTiff(org.geotools.coverage.grid.GridCoverage2D raster) -
writeToDiskFile
Creates a GeoTiff file with the provided raster. Primarily used for testing.- Parameters:
bytes- The bytes to be stored on a disk filefilePath- The path where the .tiff should be stored.- Returns:
- true if file is created, otherwise throws IOException
-
asPNG
public static byte[] asPNG(org.geotools.coverage.grid.GridCoverage2D raster, int maxWidth) throws IOException - Throws:
IOException
-
asPNG
- Throws:
IOException
-
asArcGrid
public static byte[] asArcGrid(org.geotools.coverage.grid.GridCoverage2D raster, int sourceBand) -
asArcGrid
public static byte[] asArcGrid(org.geotools.coverage.grid.GridCoverage2D raster) -
asBase64
public static String asBase64(org.geotools.coverage.grid.GridCoverage2D raster, int maxWidth) throws IOException - Throws:
IOException
-
asBase64
- Throws:
IOException
-
asMatrixPretty
public static String asMatrixPretty(org.geotools.coverage.grid.GridCoverage2D raster, int band, int precision) -
asMatrix
public static String asMatrix(org.geotools.coverage.grid.GridCoverage2D raster, int band, int postDecimalPrecision) -
asMatrix
-
asMatrix
-
createHTMLString
public static String createHTMLString(org.geotools.coverage.grid.GridCoverage2D raster, int imageWidth) throws IOException - Throws:
IOException
-
createHTMLString
public static String createHTMLString(org.geotools.coverage.grid.GridCoverage2D raster) throws IOException - Throws:
IOException
-