public class Gdal extends Object
| Constructor and Description |
|---|
Gdal() |
| Modifier and Type | Method and Description |
|---|---|
static Dataset |
closeDataSet(Dataset dataSet) |
static BufferedImage |
getBufferedImage(Dataset dataset) |
static BufferedImage |
getBufferedImage(Dataset dataset,
int overviewIndex)
Convert the overview raster from
Dataset to a
BufferedImage . |
static BufferedImage |
getBufferedImage(Dataset dataset,
int overviewIndex,
int sourceOffsetX,
int sourceOffsetY,
int sourceWidth,
int sourceHeight)
Convert the overview raster from
Dataset to a
BufferedImage . |
static BufferedImage |
getBufferedImage(Dataset dataset,
int overviewIndex,
int sourceOffsetX,
int sourceOffsetY,
int sourceWidth,
int sourceHeight,
int targetWidth,
int targetHeight)
Convert the overview raster from
Dataset to a
BufferedImage . |
static BufferedImage |
getBufferedImage(File file) |
static BufferedImage |
getBufferedImage(String fileName) |
static CoordinateSystem |
getCoordinateSystem(SpatialReference spatialReference) |
static Dataset |
getDataset(File file) |
static Dataset |
getDataset(File file,
int mode) |
static Dataset |
getDataset(String fileName) |
static Dataset |
getDataset(String name,
int mode) |
static SpatialReference |
getSpatialReference(CoordinateSystem coordinateSystem) |
static SpatialReference |
getSpatialReference(int srid) |
static String |
getSpatialReferenceWkt(int srid) |
static String |
getVersion() |
static void |
init() |
static boolean |
isAvailable() |
static boolean |
isDriverAvailable(String driverName)
Returns
true if a driver for the specific format is
available. |
static long |
loadSettings(Dataset dataset,
org.springframework.core.io.Resource resource) |
static void |
setProjectionFromPrjFile(Dataset dataset,
org.springframework.core.io.Resource resource) |
static void |
setSpatialReference(Dataset dataset,
CoordinateSystem coordinateSystem) |
public static BufferedImage getBufferedImage(Dataset dataset)
public static BufferedImage getBufferedImage(Dataset dataset, int overviewIndex)
Convert the overview raster from Dataset to a
BufferedImage . The result image will be the dimensions of the
overview raster.
dataset - The image dataset.overviewIndex - The index of the overview raster data. Use -1 for the whole
image.public static BufferedImage getBufferedImage(Dataset dataset, int overviewIndex, int sourceOffsetX, int sourceOffsetY, int sourceWidth, int sourceHeight)
Convert the overview raster from Dataset to a
BufferedImage . The raster will be clipped to the
sourceOffsetX,sourceOffsetY -> sourceWidth, sourceHeight rectangle. The
clip rectangle will be adjusted to fit inside the bounds of the source
image. The result image will be the dimensions of sourceWidth,
sourceHeight.
dataset - The image dataset.overviewIndex - The index of the overview raster data. Use -1 for the whole
image.sourceOffsetX - The x location of the clip rectangle.sourceOffsetY - The y location of the clip rectangle.sourceWidth - The width of the clip rectangle. Use -1 to auto calculate.sourceHeight - The height of the clip rectangle. Use -1 to auto calculate.public static BufferedImage getBufferedImage(Dataset dataset, int overviewIndex, int sourceOffsetX, int sourceOffsetY, int sourceWidth, int sourceHeight, int targetWidth, int targetHeight)
Convert the overview raster from Dataset to a
BufferedImage . The raster will be clipped to the
sourceOffsetX,sourceOffsetY -> sourceWidth, sourceHeight rectangle. The
clip rectangle will be adjusted to fit inside the bounds of the source
image. The result image will scaled to the the dimensions of targetWidth,
targetHeight.
dataset - The image dataset.overviewIndex - The index of the overview raster data. Use -1 for the whole
image.sourceOffsetX - The x location of the clip rectangle.sourceOffsetY - The y location of the clip rectangle.sourceWidth - The width of the clip rectangle. Use -1 to auto calculate.sourceHeight - The height of the clip rectangle. Use -1 to auto calculate.targetWidth - The width of the result image. Use -1 to auto calculate.targetHeight - The height of the result image. Use -1 to auto calculate.public static BufferedImage getBufferedImage(File file)
public static BufferedImage getBufferedImage(String fileName)
public static CoordinateSystem getCoordinateSystem(SpatialReference spatialReference)
public static SpatialReference getSpatialReference(CoordinateSystem coordinateSystem)
public static SpatialReference getSpatialReference(int srid)
public static String getSpatialReferenceWkt(int srid)
public static String getVersion()
public static void init()
public static boolean isAvailable()
public static boolean isDriverAvailable(String driverName)
true if a driver for the specific format is
available. false otherwise.true if a driver for the specific format is
available. false otherwise.public static long loadSettings(Dataset dataset, org.springframework.core.io.Resource resource)
public static void setProjectionFromPrjFile(Dataset dataset, org.springframework.core.io.Resource resource)
public static void setSpatialReference(Dataset dataset, CoordinateSystem coordinateSystem)
Copyright © 2015 Revolution Systems Inc.. All rights reserved.