My Project
Public Attributes | List of all members
GDALTranslateOptions Struct Reference

Public Attributes

char * pszFormat
 
bool bQuiet
 
GDALProgressFunc pfnProgress
 
void * pProgressData
 
GDALDataType eOutputType
 
MaskMode eMaskMode
 
int nBandCount
 
int * panBandList
 
int nOXSizePixel
 
int nOYSizePixel
 
double dfOXSizePct
 
double dfOYSizePct
 
char ** papszCreateOptions
 
double adfSrcWin [4]
 
bool bStrict
 
bool bUnscale
 
bool bSetScale
 
double dfScale
 
bool bSetOffset
 
double dfOffset
 
int nScaleRepeat
 
GDALTranslateScaleParamspasScaleParams
 
bool bHasUsedExplicitScaleBand
 
int nExponentRepeat
 
double * padfExponent
 
bool bHasUsedExplicitExponentBand
 
char ** papszMetadataOptions
 
char * pszOutputSRS
 
int nGCPCount
 
GDAL_GCP * pasGCPs
 
double adfULLR [4]
 
bool bSetNoData
 
bool bUnsetNoData
 
double dfNoDataReal
 
int nRGBExpand
 
int nMaskBand
 
bool bStats
 
bool bApproxStats
 
bool bErrorOnPartiallyOutside
 
bool bErrorOnCompletelyOutside
 
bool bNoRAT
 
char * pszResampling
 
double dfXRes
 
double dfYRes
 
double dfULX
 
double dfULY
 
double dfLRX
 
double dfLRY
 
char * pszProjSRS
 
int nLimitOutSize
 
int nColorInterpSize
 
int * panColorInterp
 

Detailed Description

Options for use with GDALTranslate(). GDALTranslateOptions* must be allocated and freed with GDALTranslateOptionsNew() and GDALTranslateOptionsFree() respectively.

Member Data Documentation

◆ adfSrcWin

double GDALTranslateOptions::adfSrcWin[4]

subwindow from the source image for copying based on pixel/line location

◆ adfULLR

double GDALTranslateOptions::adfULLR[4]

assign/override the georeferenced bounds of the output file. This assigns georeferenced bounds to the output file, ignoring what would have been derived from the source file. So this does not cause reprojection to the specified SRS.

◆ bErrorOnCompletelyOutside

bool GDALTranslateOptions::bErrorOnCompletelyOutside

Same as bErrorOnPartiallyOutside, except that the criterion for erroring out is when the request falls completely outside the source raster extent.

◆ bErrorOnPartiallyOutside

bool GDALTranslateOptions::bErrorOnPartiallyOutside

If this option is set, GDALTranslateOptions::adfSrcWin or (GDALTranslateOptions::dfULX, GDALTranslateOptions::dfULY, GDALTranslateOptions::dfLRX, GDALTranslateOptions::dfLRY) values that falls partially outside the source raster extent will be considered as an error. The default behaviour is to accept such requests.

◆ bHasUsedExplicitScaleBand

bool GDALTranslateOptions::bHasUsedExplicitScaleBand

It is set to TRUE, when scale parameters are specific to each band

◆ bNoRAT

bool GDALTranslateOptions::bNoRAT

does not copy source RAT into destination dataset (when TRUE)

◆ bQuiet

bool GDALTranslateOptions::bQuiet

allow or suppress progress monitor and other non-error output

◆ bSetNoData

bool GDALTranslateOptions::bSetNoData

set a nodata value specified in GDALTranslateOptions::dfNoDataReal to the output bands

◆ bStats

bool GDALTranslateOptions::bStats

force recomputation of statistics

◆ bStrict

bool GDALTranslateOptions::bStrict

don't be forgiving of mismatches and lost data when translating to the output format

◆ bUnscale

bool GDALTranslateOptions::bUnscale

apply the scale/offset metadata for the bands to convert scaled values to unscaled values. It is also often necessary to reset the output datatype with GDALTranslateOptions::eOutputType

◆ bUnsetNoData

bool GDALTranslateOptions::bUnsetNoData

avoid setting a nodata value to the output file if one exists for the source file

◆ dfNoDataReal

double GDALTranslateOptions::dfNoDataReal

Assign a specified nodata value to output bands ( GDALTranslateOptions::bSetNoData option should be set). Note that if the input dataset has a nodata value, this does not cause pixel values that are equal to that nodata value to be changed to the value specified.

◆ dfOXSizePct

double GDALTranslateOptions::dfOXSizePct

size of the output file. GDALTranslateOptions::dfOXSizePct and GDALTranslateOptions::dfOYSizePct are fraction of the input image size. The value 100 means 100%. If one of the two values is set to 0, its value will be determined from the other one, while maintaining the aspect ratio of the source dataset

◆ dfULX

double GDALTranslateOptions::dfULX

subwindow from the source image for copying (like GDALTranslateOptions::adfSrcWin) but with the corners given in georeferenced coordinates (by default expressed in the SRS of the dataset. Can be changed with pszProjSRS)

◆ dfXRes

double GDALTranslateOptions::dfXRes

target resolution. The values must be expressed in georeferenced units. Both must be positive values. This is exclusive with GDALTranslateOptions::nOXSizePixel (or GDALTranslateOptions::dfOXSizePct), GDALTranslateOptions::nOYSizePixel (or GDALTranslateOptions::dfOYSizePct) and GDALTranslateOptions::adfULLR

◆ eOutputType

GDALDataType GDALTranslateOptions::eOutputType

for the output bands to be of the indicated data type

◆ nBandCount

int GDALTranslateOptions::nBandCount

number of input bands to write to the output file, or to reorder bands

◆ nExponentRepeat

int GDALTranslateOptions::nExponentRepeat

the size of the list padfExponent

◆ nGCPCount

int GDALTranslateOptions::nGCPCount

number of GCPS to be added to the output dataset

◆ nOXSizePixel

int GDALTranslateOptions::nOXSizePixel

size of the output file. GDALTranslateOptions::nOXSizePixel is in pixels and GDALTranslateOptions::nOYSizePixel is in lines. If one of the two values is set to 0, its value will be determined from the other one, while maintaining the aspect ratio of the source dataset

◆ nRGBExpand

int GDALTranslateOptions::nRGBExpand

to expose a dataset with 1 band with a color table as a dataset with 3 (RGB) or 4 (RGBA) bands. Useful for output drivers such as JPEG, JPEG2000, MrSID, ECW that don't support color indexed datasets. The 1 value enables to expand a dataset with a color table that only contains gray levels to a gray indexed dataset.

◆ nScaleRepeat

int GDALTranslateOptions::nScaleRepeat

the size of pasScaleParams

◆ padfExponent

double* GDALTranslateOptions::padfExponent

to apply non-linear scaling with a power function. It is the list of exponents of the power function (must be positive). This option must be used with GDALTranslateOptions::pasScaleParams. If GDALTranslateOptions::nExponentRepeat is 1, it is applied to all bands of the output image.

◆ panBandList

int* GDALTranslateOptions::panBandList

list of input bands to write to the output file, or to reorder bands. The value 1 corresponds to the 1st band.

◆ papszCreateOptions

char** GDALTranslateOptions::papszCreateOptions

list of creation options to the output format driver

◆ papszMetadataOptions

char** GDALTranslateOptions::papszMetadataOptions

list of metadata key and value to set on the output dataset if possible. GDALTranslateOptionsSetMetadataOptions() and GDALTranslateOptionsAddMetadataOptions() should be used

◆ pasGCPs

GDAL_GCP* GDALTranslateOptions::pasGCPs

list of GCPs to be added to the output dataset

◆ pasScaleParams

GDALTranslateScaleParams* GDALTranslateOptions::pasScaleParams

the list of scale parameters for each band.

◆ pfnProgress

GDALProgressFunc GDALTranslateOptions::pfnProgress

the progress function to use

◆ pProgressData

void* GDALTranslateOptions::pProgressData

pointer to the progress data variable

◆ pszFormat

char* GDALTranslateOptions::pszFormat

output format. Use the short format name.

◆ pszOutputSRS

char* GDALTranslateOptions::pszOutputSRS

override the projection for the output file. The SRS may be any of the usual GDAL/OGR forms, complete WKT, PROJ.4, EPSG:n or a file containing the WKT.

◆ pszProjSRS

char* GDALTranslateOptions::pszProjSRS

SRS in which to interpret the coordinates given with GDALTranslateOptions::dfULX, GDALTranslateOptions::dfULY, GDALTranslateOptions::dfLRX, GDALTranslateOptions::dfLRY. The SRS may be any of the usual GDAL/OGR forms, complete WKT, PROJ.4, EPSG:n or a file containing the WKT. Note that this does not cause reprojection of the dataset to the specified SRS.

◆ pszResampling

char* GDALTranslateOptions::pszResampling

resampling algorithm nearest (default), bilinear, cubic, cubicspline, lanczos, average, mode


The documentation for this struct was generated from the following file: