public class RasterUtilities extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
RasterUtilities.RasterInfo
Utility class that contains information about a raster.
|
Modifier and Type | Method and Description |
---|---|
static void |
closeReaders()
Close all readers opened by getReader() and getCoverage().
|
static boolean |
convertFileFormat(java.io.File inputFile,
java.io.File outputFile,
java.lang.Integer noData)
Convert raster file formats using gdal_translate.
|
static org.opengis.coverage.grid.GridCoverage |
getCoverage(java.io.File file,
org.opengis.referencing.crs.CoordinateReferenceSystem defaultCRS)
Get a coverage for a raster file.
|
static java.lang.Integer[] |
getGridSize(RasterToken raster)
Get the grid size of a raster.
|
static RasterUtilities.RasterInfo |
getInfo(java.io.File file)
Get a RasterInfo object for a raster file.
|
static org.geotools.coverage.grid.io.AbstractGridCoverage2DReader |
getReader(java.io.File file,
org.opengis.referencing.crs.CoordinateReferenceSystem defaultCRS)
Get a reader for a raster file.
|
static java.io.File |
reproject(java.io.File rasterFile,
org.opengis.referencing.crs.CoordinateReferenceSystem destCRS)
Reproject a raster file.
|
static void |
reprojectToResolveGCP(java.io.File inputFile,
java.io.File outputFile)
Reproject a raster using gdalwarp to resolve ground control points.
|
public static org.opengis.coverage.grid.GridCoverage getCoverage(java.io.File file, org.opengis.referencing.crs.CoordinateReferenceSystem defaultCRS) throws java.lang.IllegalArgumentException, java.io.IOException
java.lang.IllegalArgumentException
java.io.IOException
public static java.lang.Integer[] getGridSize(RasterToken raster) throws IllegalActionException
IllegalActionException
public static org.geotools.coverage.grid.io.AbstractGridCoverage2DReader getReader(java.io.File file, org.opengis.referencing.crs.CoordinateReferenceSystem defaultCRS)
public static void closeReaders()
public static boolean convertFileFormat(java.io.File inputFile, java.io.File outputFile, java.lang.Integer noData)
public static RasterUtilities.RasterInfo getInfo(java.io.File file) throws IllegalActionException
IllegalActionException
public static java.io.File reproject(java.io.File rasterFile, org.opengis.referencing.crs.CoordinateReferenceSystem destCRS) throws IllegalActionException
rasterFile
- the raster file.destCRS
- the CRS to reproject to.IllegalActionException
public static void reprojectToResolveGCP(java.io.File inputFile, java.io.File outputFile) throws IllegalActionException
IllegalActionException