public class GDALWarp
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
GCI_AlphaBand |
static int |
GCI_BlackBand |
static int |
GCI_BlueBand |
static int |
GCI_CyanBand |
static int |
GCI_GrayIndex |
static int |
GCI_GreenBand |
static int |
GCI_HueBand |
static int |
GCI_LightnessBand |
static int |
GCI_MagentaBand |
static int |
GCI_Max |
static int |
GCI_PaletteIndex |
static int |
GCI_RedBand |
static int |
GCI_SaturationBand |
static int |
GCI_Undefined |
static int |
GCI_YCbCr_CbBand |
static int |
GCI_YCbCr_CrBand |
static int |
GCI_YCbCr_YBand |
static int |
GCI_YellowBand |
static int |
GDT_Byte |
static int |
GDT_CFloat32 |
static int |
GDT_CFloat64 |
static int |
GDT_CInt16 |
static int |
GDT_CInt32 |
static int |
GDT_Float32 |
static int |
GDT_Float64 |
static int |
GDT_Int16 |
static int |
GDT_Int32 |
static int |
GDT_TypeCount |
static int |
GDT_UInt16 |
static int |
GDT_UInt32 |
static int |
GDT_Unknown |
static int |
SOURCE |
static int |
WARPED |
| Constructor and Description |
|---|
GDALWarp() |
| Modifier and Type | Method and Description |
|---|---|
static int |
_get_version_info(java.lang.String key,
byte[] value) |
static void |
deinit()
The deinitialization function for the library.
|
static int |
get_band_count(long token,
int dataset,
int attempts,
int[] band_count)
Get the number of bands.
|
static int |
get_band_data_type(long token,
int dataset,
int attempts,
int band,
int[] data_type)
Get the data type of a given band.
|
static int |
get_band_min_max(long token,
int dataset,
int attempts,
int band,
boolean approx_okay,
double[] minmax,
int[] success)
Get the minimum and maximum values found in the band.
|
static int |
get_band_nodata(long token,
int dataset,
int attempts,
int band,
double[] nodata,
int[] success)
Get the NODATA value for a band.
|
static int |
get_block_size(long token,
int dataset,
int attempts,
int band_number,
int[] width,
int[] height)
Get the block size of the given band.
|
static int |
get_color_interpretation(long token,
int dataset,
int attempts,
int band_number,
int[] color_interp)
Get the color interpretation of the given band.
|
static int |
get_crs_proj4(long token,
int dataset,
int attempts,
byte[] crs)
Get the CRS in PROJ.4 format.
|
static int |
get_crs_wkt(long token,
int dataset,
int attempts,
byte[] crs)
Get the CRS in WKT format.
|
static int |
get_data(long token,
int dataset,
int attemps,
int[] src_window,
int[] dst_window,
int band_number,
int type,
byte[] data)
Get pixel data.
|
static int |
get_histogram(long token,
int dataset,
int attempts,
int band_number,
double min,
double max,
long[] histogram_container,
boolean include_out_of_range,
boolean approx_ok)
Get the histogram for a given band
|
static int |
get_metadata_domain_list(long token,
int dataset,
int attempts,
int band_number,
byte[][] domain_list)
Get the list of metadata domain lists.
|
static int |
get_metadata_item(long token,
int dataset,
int attempts,
int band_number,
java.lang.String key,
java.lang.String domain,
byte[] value)
Get a particular metadata value associated with a key.
|
static int |
get_metadata(long token,
int dataset,
int attempts,
int band_number,
java.lang.String domain,
byte[][] list)
Get the metadata found in a particular metadata domain.
|
static int |
get_offset(long token,
int dataset,
int attempts,
int band_number,
double[] offset,
int[] success)
Get the offset of the given band.
|
static int |
get_overview_widths_heights(long token,
int dataset,
int attempts,
int band_number,
int[] widths,
int[] heights)
Get the widths and heights of all overviews.
|
static int |
get_scale(long token,
int dataset,
int attempts,
int band_number,
double[] scale,
int[] success)
Get the scale of the given band.
|
static long |
get_token(java.lang.String uri,
java.lang.String[] options)
Return an unused token for the given uri, options pair.
|
static int |
get_transform(long token,
int dataset,
int attempts,
double[] transform)
Get the the transform.
|
static java.lang.String |
get_version_info(java.lang.String key)
Get GDAL version information.
|
static int |
get_width_height(long token,
int dataset,
int attempts,
int[] width_height)
Get the width and height.
|
static void |
init(int size) |
static int |
noop(long token,
int dataset,
int attempts)
Get the color interpretation of the given band.
|
static void |
set_config_option(java.lang.String key,
java.lang.String value)
Set a GDAL configuration key, value pair.
|
public static final int GDT_Unknown
public static final int GDT_Byte
public static final int GDT_UInt16
public static final int GDT_Int16
public static final int GDT_UInt32
public static final int GDT_Int32
public static final int GDT_Float32
public static final int GDT_Float64
public static final int GDT_CInt16
public static final int GDT_CInt32
public static final int GDT_CFloat32
public static final int GDT_CFloat64
public static final int GDT_TypeCount
public static final int GCI_Undefined
public static final int GCI_GrayIndex
public static final int GCI_PaletteIndex
public static final int GCI_RedBand
public static final int GCI_GreenBand
public static final int GCI_BlueBand
public static final int GCI_AlphaBand
public static final int GCI_HueBand
public static final int GCI_SaturationBand
public static final int GCI_LightnessBand
public static final int GCI_CyanBand
public static final int GCI_MagentaBand
public static final int GCI_YellowBand
public static final int GCI_BlackBand
public static final int GCI_YCbCr_YBand
public static final int GCI_YCbCr_CbBand
public static final int GCI_YCbCr_CrBand
public static final int GCI_Max
public static final int SOURCE
public static final int WARPED
public static void init(int size)
throws java.lang.Exception
java.lang.Exceptionpublic static java.lang.String get_version_info(java.lang.String key)
throws java.lang.Exception
key - The key of the desired information (please see
https://gdal.org/api/raster_c_api.html?highlight=rasterio#_CPPv415GDALVersionInfoPKc)java.lang.Exceptionpublic static void deinit()
public static int _get_version_info(java.lang.String key,
byte[] value)
public static void set_config_option(java.lang.String key,
java.lang.String value)
key - The key to setvalue - The vale to associate with the keypublic static long get_token(java.lang.String uri,
java.lang.String[] options)
uri - A string containing the URIoptions - An array of strings contains the warp optionspublic static int get_block_size(long token,
int dataset,
int attempts,
int band_number,
int[] width,
int[] height)
token - A token associated with some uri, options pairdataset - 0 (or GDALWarp::SOURCE) for the source dataset, 1 (or
GDALWarp::WARPED) for the warped datasetattempts - The number of attempts to make before giving upband_number - The band in questionwidth - The return-location of the block widthheight - The return-location of the block heightpublic static int get_histogram(long token,
int dataset,
int attempts,
int band_number,
double min,
double max,
long[] histogram_container,
boolean include_out_of_range,
boolean approx_ok)
token - A token associated with some uri, options pairdataset - 0 (or GDALWarp::SOURCE) for the source dataset, 1
(or GDALWarp::WARPED) for the warped datasetattempts - The number of attempts to make before giving upband_number - The band in questionmin - The minimum bin for the histogrammax - The maximum bin for the histogramhistogram_container - The array to hold the result of the histogram
calculationinclude_out_of_range - Whether to map out of range values into the
first/last bucketsapprox_ok - Whether to accept an approximate histogram. With
COGs, will cause the use of overviewspublic static int get_offset(long token,
int dataset,
int attempts,
int band_number,
double[] offset,
int[] success)
token - A token associated with some uri, options pairdataset - 0 (or GDALWarp::SOURCE) for the source dataset, 1 (or
GDALWarp::WARPED) for the warped datasetattempts - The number of attempts to make before giving upband_number - The band in questionoffset - The return-location of the offsetsuccess - The return-location of the success flagpublic static int get_scale(long token,
int dataset,
int attempts,
int band_number,
double[] scale,
int[] success)
token - A token associated with some uri, options pairdataset - 0 (or GDALWarp::SOURCE) for the source dataset, 1 (or
GDALWarp::WARPED) for the warped datasetattempts - The number of attempts to make before giving upband_number - The band in questionscale - The return-location of the scalesuccess - The return-location of the success flagpublic static int noop(long token,
int dataset,
int attempts)
token - A token associated with some uri, options pairdataset - 0 (or GDALWarp::SOURCE) for the source dataset, 1 (or
GDALWarp::WARPED) for the warped datasetattempts - The number of attempts to make before giving uppublic static int get_color_interpretation(long token,
int dataset,
int attempts,
int band_number,
int[] color_interp)
token - A token associated with some uri, options pairdataset - 0 (or GDALWarp::SOURCE) for the source dataset, 1 (or
GDALWarp::WARPED) for the warped datasetattempts - The number of attempts to make before giving upband_number - The band in questioncolor_interp - The return-slot for the integer-coded color
interpretationpublic static int get_metadata_domain_list(long token,
int dataset,
int attempts,
int band_number,
byte[][] domain_list)
token - A token associated with some uri, options pairdataset - 0 (or GDALWarp::SOURCE) for the source dataset, 1 (or
GDALWarp::WARPED) for the warped datasetattempts - The number of attempts to make before giving upband_number - The band to query (zero for the file itself)domain_list - The return-location for the list of stringspublic static int get_metadata(long token,
int dataset,
int attempts,
int band_number,
java.lang.String domain,
byte[][] list)
token - A token associated with some uri, options pairdataset - 0 (or GDALWarp::SOURCE) for the source dataset, 1 (or
GDALWarp::WARPED) for the warped datasetattempts - The number of attempts to make before giving upband_number - The band to query (zero for the file itself)domain - The metadata domain to querylist - The return-location for the list of stringspublic static int get_metadata_item(long token,
int dataset,
int attempts,
int band_number,
java.lang.String key,
java.lang.String domain,
byte[] value)
token - A token associated with some uri, options pairdataset - 0 (or GDALWarp::SOURCE) for the source dataset, 1 (or
GDALWarp::WARPED) for the warped datasetattempts - The number of attempts to make before giving upband_number - The band to query (zero for the file itself)key - The key of the key, value metadata pairdomain - The metadata domain to queryvalue - The return-location for the value of the key, value pairpublic static int get_overview_widths_heights(long token,
int dataset,
int attempts,
int band_number,
int[] widths,
int[] heights)
token - A token associated with some uri, options pairdataset - 0 (or GDALWarp::SOURCE) for the source dataset, 1 (or
GDALWarp::WARPED) for the warped datasetattempts - The number of attempts to make before giving upband_number - The band of interestwidths - An array of integers to receive the widths of the various
overviewsheights - An array of integers to receive the heights of the various
overviewsmax_length - The maximum number of widths and heights to return
(nominally the smaller of the lengths of the two arrays)public static int get_crs_proj4(long token,
int dataset,
int attempts,
byte[] crs)
token - A token associated with some uri, options pairdataset - 0 (or GDALWarp::SOURCE) for the source dataset, 1 (or
GDALWarp::WARPED) for the warped datasetattempts - The number of attempts to make before giving upcrs - The character array in-which to return the PROJ.4 stringmax_size - The size of the pre-allocated return bufferpublic static int get_crs_wkt(long token,
int dataset,
int attempts,
byte[] crs)
token - A token associated with some uri, options pairdataset - 0 (or GDALWarp::SOURCE) for the source dataset, 1 (or
GDALWarp::WARPED) for the warped datasetattempts - The number of attempts to make before giving upcrs - The character array in-which to return the PROJ.4 stringmax_size - The size of the pre-allocated return bufferpublic static int get_band_nodata(long token,
int dataset,
int attempts,
int band,
double[] nodata,
int[] success)
token - A token associated with some uri, options pairdataset - 0 (or GDALWarp::SOURCE) for the source dataset, 1 (or
GDALWarp::WARPED) for the warped datasetattempts - The number of attempts to make before giving upband_number - The band of interestnodata - The return-location of the NODATA valuesuccess - The return-location of the success flag (answer whether or
not there is a NODATA value)public static int get_band_min_max(long token,
int dataset,
int attempts,
int band,
boolean approx_okay,
double[] minmax,
int[] success)
token - A token associated with some uri, options pairdataset - 0 (or GDALWarp::SOURCE) for the source dataset, 1 (or
GDALWarp::WARPED) for the warped datasetattempts - The number of attempts to make before giving upband_number - The band_number of interestapprox_okay - Is it okay to approximate the value if it is not stored in
the metadata, or must it be calculated exactly? An integer
treated as a booleanminmax - The return-location of the minimum and maximumsuccess - The return-location of the success flag (answer whether or
not there is a NODATA value)public static int get_band_data_type(long token,
int dataset,
int attempts,
int band,
int[] data_type)
token - A token associated with some uri, options pairdataset - 0 (or GDALWarp::SOURCE) for the source dataset, 1 (or
GDALWarp::WARPED) for the warped datasetattempts - The number of attempts to make before giving upband_number - The band of interestdata_type - The return-location of the band_number type (of integral
type GDALDataType)public static int get_band_count(long token,
int dataset,
int attempts,
int[] band_count)
token - A token associated with some uri, options pairdataset - 0 (or GDALWarp::SOURCE) for the source dataset, 1 (or
GDALWarp::WARPED) for the warped datasetattempts - The number of attempts to make before giving upband_count - The return-location of the band countpublic static int get_width_height(long token,
int dataset,
int attempts,
int[] width_height)
token - A token associated with some uri, options pairdataset - 0 (or GDALWarp::SOURCE) for the source dataset, 1 (or
GDALWarp::WARPED) for the warped datasetattempts - The number of attempts to make before giving upwidth - The return-location of the widthheight - The return-location of the heightpublic static int get_data(long token,
int dataset,
int attemps,
int[] src_window,
int[] dst_window,
int band_number,
int type,
byte[] data)
token - A token associated with some uri, options pairdataset - 0 (or GDALWarp::SOURCE) for the source dataset, 1 (or
GDALWarp::WARPED) for the warped datasetattempts - The number of attempts to make before giving upsrc_window - Please see
https://gdal.org/api/raster_c_api.html?highlight=rasterio#_CPPv419GDALDatasetRasterIO12GDALDatasetH10GDALRWFlagiiiiPvii12GDALDataTypeiPiiiidst_window - Please see
https://gdal.org/api/raster_c_api.html?highlight=rasterio#_CPPv419GDALDatasetRasterIO12GDALDatasetH10GDALRWFlagiiiiPvii12GDALDataTypeiPiiiiband_number - The band_number number of interesttype - The desired type of returned pixels (the argument is of
integral type GDALDataType)data - The return-location of the read read datapublic static int get_transform(long token,
int dataset,
int attempts,
double[] transform)
token - A token associated with some uri, options pairdataset - 0 (or GDALWarp::SOURCE) for the source dataset, 1 (or
GDALWarp::WARPED) for the warped datasetattempts - The number of attempts to make before giving uptransform - The return location for the six double-precision floating
point number that will be returned