gdal_utils.h File Reference

#include "cpl_port.h"
#include "gdal.h"

Go to the source code of this file.

Typedefs

typedef typedefCPL_C_START
struct GDALInfoOptions 
GDALInfoOptions
typedef struct
GDALInfoOptionsForBinary 
GDALInfoOptionsForBinary
typedef struct GDALTranslateOptions GDALTranslateOptions
typedef struct
GDALTranslateOptionsForBinary 
GDALTranslateOptionsForBinary
typedef struct GDALWarpAppOptions GDALWarpAppOptions
typedef struct
GDALWarpAppOptionsForBinary 
GDALWarpAppOptionsForBinary
typedef struct
GDALVectorTranslateOptions 
GDALVectorTranslateOptions
typedef struct
GDALVectorTranslateOptionsForBinary 
GDALVectorTranslateOptionsForBinary
typedef struct
GDALDEMProcessingOptions 
GDALDEMProcessingOptions
typedef struct
GDALDEMProcessingOptionsForBinary 
GDALDEMProcessingOptionsForBinary
typedef struct GDALNearblackOptions GDALNearblackOptions
typedef struct
GDALNearblackOptionsForBinary 
GDALNearblackOptionsForBinary
typedef struct GDALGridOptions GDALGridOptions
typedef struct
GDALGridOptionsForBinary 
GDALGridOptionsForBinary
typedef struct GDALRasterizeOptions GDALRasterizeOptions
typedef struct
GDALRasterizeOptionsForBinary 
GDALRasterizeOptionsForBinary
typedef struct GDALBuildVRTOptions GDALBuildVRTOptions
typedef struct
GDALBuildVRTOptionsForBinary 
GDALBuildVRTOptionsForBinary

Functions

GDALInfoOptions CPL_DLL * GDALInfoOptionsNew (char **papszArgv, GDALInfoOptionsForBinary *psOptionsForBinary)
void CPL_DLL GDALInfoOptionsFree (GDALInfoOptions *psOptions)
char CPL_DLL * GDALInfo (GDALDatasetH hDataset, const GDALInfoOptions *psOptions)
GDALTranslateOptions CPL_DLL * GDALTranslateOptionsNew (char **papszArgv, GDALTranslateOptionsForBinary *psOptionsForBinary)
void CPL_DLL GDALTranslateOptionsFree (GDALTranslateOptions *psOptions)
void CPL_DLL GDALTranslateOptionsSetProgress (GDALTranslateOptions *psOptions, GDALProgressFunc pfnProgress, void *pProgressData)
GDALDatasetH CPL_DLL GDALTranslate (const char *pszDestFilename, GDALDatasetH hSrcDataset, const GDALTranslateOptions *psOptions, int *pbUsageError)
GDALWarpAppOptions CPL_DLL * GDALWarpAppOptionsNew (char **papszArgv, GDALWarpAppOptionsForBinary *psOptionsForBinary)
void CPL_DLL GDALWarpAppOptionsFree (GDALWarpAppOptions *psOptions)
void CPL_DLL GDALWarpAppOptionsSetProgress (GDALWarpAppOptions *psOptions, GDALProgressFunc pfnProgress, void *pProgressData)
void CPL_DLL GDALWarpAppOptionsSetWarpOption (GDALWarpAppOptions *psOptions, const char *pszKey, const char *pszValue)
GDALDatasetH CPL_DLL GDALWarp (const char *pszDest, GDALDatasetH hDstDS, int nSrcCount, GDALDatasetH *pahSrcDS, const GDALWarpAppOptions *psOptions, int *pbUsageError)
GDALVectorTranslateOptions
CPL_DLL * 
GDALVectorTranslateOptionsNew (char **papszArgv, GDALVectorTranslateOptionsForBinary *psOptionsForBinary)
void CPL_DLL GDALVectorTranslateOptionsFree (GDALVectorTranslateOptions *psOptions)
void CPL_DLL GDALVectorTranslateOptionsSetProgress (GDALVectorTranslateOptions *psOptions, GDALProgressFunc pfnProgress, void *pProgressData)
GDALDatasetH CPL_DLL GDALVectorTranslate (const char *pszDest, GDALDatasetH hDstDS, int nSrcCount, GDALDatasetH *pahSrcDS, const GDALVectorTranslateOptions *psOptions, int *pbUsageError)
GDALDEMProcessingOptions CPL_DLL * GDALDEMProcessingOptionsNew (char **papszArgv, GDALDEMProcessingOptionsForBinary *psOptionsForBinary)
void CPL_DLL GDALDEMProcessingOptionsFree (GDALDEMProcessingOptions *psOptions)
void CPL_DLL GDALDEMProcessingOptionsSetProgress (GDALDEMProcessingOptions *psOptions, GDALProgressFunc pfnProgress, void *pProgressData)
GDALDatasetH CPL_DLL GDALDEMProcessing (const char *pszDestFilename, GDALDatasetH hSrcDataset, const char *pszProcessing, const char *pszColorFilename, const GDALDEMProcessingOptions *psOptions, int *pbUsageError)
GDALNearblackOptions CPL_DLL * GDALNearblackOptionsNew (char **papszArgv, GDALNearblackOptionsForBinary *psOptionsForBinary)
void CPL_DLL GDALNearblackOptionsFree (GDALNearblackOptions *psOptions)
void CPL_DLL GDALNearblackOptionsSetProgress (GDALNearblackOptions *psOptions, GDALProgressFunc pfnProgress, void *pProgressData)
GDALDatasetH CPL_DLL GDALNearblack (const char *pszDest, GDALDatasetH hDstDS, GDALDatasetH hSrcDS, const GDALNearblackOptions *psOptions, int *pbUsageError)
GDALGridOptions CPL_DLL * GDALGridOptionsNew (char **papszArgv, GDALGridOptionsForBinary *psOptionsForBinary)
void CPL_DLL GDALGridOptionsFree (GDALGridOptions *psOptions)
void CPL_DLL GDALGridOptionsSetProgress (GDALGridOptions *psOptions, GDALProgressFunc pfnProgress, void *pProgressData)
GDALDatasetH CPL_DLL GDALGrid (const char *pszDest, GDALDatasetH hSrcDS, const GDALGridOptions *psOptions, int *pbUsageError)
GDALRasterizeOptions CPL_DLL * GDALRasterizeOptionsNew (char **papszArgv, GDALRasterizeOptionsForBinary *psOptionsForBinary)
void CPL_DLL GDALRasterizeOptionsFree (GDALRasterizeOptions *psOptions)
void CPL_DLL GDALRasterizeOptionsSetProgress (GDALRasterizeOptions *psOptions, GDALProgressFunc pfnProgress, void *pProgressData)
GDALDatasetH CPL_DLL GDALRasterize (const char *pszDest, GDALDatasetH hDstDS, GDALDatasetH hSrcDS, const GDALRasterizeOptions *psOptions, int *pbUsageError)
GDALBuildVRTOptions CPL_DLL * GDALBuildVRTOptionsNew (char **papszArgv, GDALBuildVRTOptionsForBinary *psOptionsForBinary)
void CPL_DLL GDALBuildVRTOptionsFree (GDALBuildVRTOptions *psOptions)
void CPL_DLL GDALBuildVRTOptionsSetProgress (GDALBuildVRTOptions *psOptions, GDALProgressFunc pfnProgress, void *pProgressData)
GDALDatasetH CPL_DLL GDALBuildVRT (const char *pszDest, int nSrcCount, GDALDatasetH *pahSrcDS, const char *const *papszSrcDSNames, const GDALBuildVRTOptions *psOptions, int *pbUsageError)

Detailed Description

Public (C callable) GDAL Utilities entry points.

Since:
GDAL 2.1

Typedef Documentation

Options for GDALBuildVRT(). Opaque type

Options for GDALDEMProcessing(). Opaque type

Options for GDALGrid(). Opaque type

typedef typedefCPL_C_START struct GDALInfoOptions GDALInfoOptions

Options for GDALInfo(). Opaque type

Options for GDALNearblack(). Opaque type

Options for GDALRasterize(). Opaque type

Options for GDALTranslate(). Opaque type

Options for GDALVectorTranslate(). Opaque type

Options for GDALWarp(). Opaque type


Function Documentation

GDALDatasetH CPL_DLL GDALBuildVRT ( const char *  pszDest,
int  nSrcCount,
GDALDatasetH *  pahSrcDS,
const char *const *  papszSrcDSNames,
const GDALBuildVRTOptions *  psOptionsIn,
int *  pbUsageError 
)

Build a VRT from a list of datasets.

This is the equivalent of the gdalbuildvrt utility.

GDALBuildVRTOptions* must be allocated and freed with GDALBuildVRTOptionsNew() and GDALBuildVRTOptionsFree() respectively. pahSrcDS and papszSrcDSNames cannot be used at the same time.

Parameters:
pszDest the destination dataset path.
nSrcCount the number of input datasets.
pahSrcDS the list of input datasets (or NULL, exclusive with papszSrcDSNames)
papszSrcDSNames the list of input dataset names (or NULL, exclusive with pahSrcDS)
psOptionsIn the options struct returned by GDALBuildVRTOptionsNew() or NULL.
pbUsageError the pointer to int variable to determine any usage error has occurred.
Returns:
the output dataset (new dataset that must be closed using GDALClose()) or NULL in case of error.
Since:
GDAL 2.1
void CPL_DLL GDALBuildVRTOptionsFree ( GDALBuildVRTOptions *  psOptions  ) 

Frees the GDALBuildVRTOptions struct.

Parameters:
psOptions the options struct for GDALBuildVRT().
Since:
GDAL 2.1
GDALBuildVRTOptions CPL_DLL* GDALBuildVRTOptionsNew ( char **  papszArgv,
GDALBuildVRTOptionsForBinary *  psOptionsForBinary 
)

Allocates a GDALBuildVRTOptions struct.

Parameters:
papszArgv NULL terminated list of options (potentially including filename and open options too), or NULL. The accepted options are the ones of the gdalbuildvrt utility.
psOptionsForBinary (output) may be NULL (and should generally be NULL), otherwise (gdal_translate_bin.cpp use case) must be allocated with GDALBuildVRTOptionsForBinaryNew() prior to this function. Will be filled with potentially present filename, open options,...
Returns:
pointer to the allocated GDALBuildVRTOptions struct. Must be freed with GDALBuildVRTOptionsFree().
Since:
GDAL 2.1
void CPL_DLL GDALBuildVRTOptionsSetProgress ( GDALBuildVRTOptions *  psOptions,
GDALProgressFunc  pfnProgress,
void *  pProgressData 
)

Set a progress function.

Parameters:
psOptions the options struct for GDALBuildVRT().
pfnProgress the progress callback.
pProgressData the user data for the progress callback.
Since:
GDAL 2.1
GDALDatasetH CPL_DLL GDALDEMProcessing ( const char *  pszDest,
GDALDatasetH  hSrcDataset,
const char *  pszProcessing,
const char *  pszColorFilename,
const GDALDEMProcessingOptions *  psOptionsIn,
int *  pbUsageError 
)

Apply a DEM processing.

This is the equivalent of the gdaldem utility.

GDALDEMProcessingOptions* must be allocated and freed with GDALDEMProcessingOptionsNew() and GDALDEMProcessingOptionsFree() respectively.

Parameters:
pszDest the destination dataset path.
hSrcDataset the source dataset handle.
pszProcessing the processing to apply (one of "hillshade", "slope", "aspect", "color-relief", "TRI", "TPI", "Roughness")
pszColorFilename color file (mandatory for "color-relief" processing, should be NULL otherwise)
psOptionsIn the options struct returned by GDALDEMProcessingOptionsNew() or NULL.
pbUsageError the pointer to int variable to determine any usage error has occurred or NULL.
Returns:
the output dataset (new dataset that must be closed using GDALClose()) or NULL in case of error.
Since:
GDAL 2.1
void CPL_DLL GDALDEMProcessingOptionsFree ( GDALDEMProcessingOptions *  psOptions  ) 

Frees the GDALDEMProcessingOptions struct.

Parameters:
psOptions the options struct for GDALDEMProcessing().
Since:
GDAL 2.1
GDALDEMProcessingOptions CPL_DLL* GDALDEMProcessingOptionsNew ( char **  papszArgv,
GDALDEMProcessingOptionsForBinary *  psOptionsForBinary 
)

Allocates a GDALDEMProcessingOptions struct.

Parameters:
papszArgv NULL terminated list of options (potentially including filename and open options too), or NULL. The accepted options are the ones of the gdal_translate utility.
psOptionsForBinary (output) may be NULL (and should generally be NULL), otherwise (gdal_translate_bin.cpp use case) must be allocated with GDALDEMProcessingOptionsForBinaryNew() prior to this function. Will be filled with potentially present filename, open options,...
Returns:
pointer to the allocated GDALDEMProcessingOptions struct. Must be freed with GDALDEMProcessingOptionsFree().
Since:
GDAL 2.1
void CPL_DLL GDALDEMProcessingOptionsSetProgress ( GDALDEMProcessingOptions *  psOptions,
GDALProgressFunc  pfnProgress,
void *  pProgressData 
)

Set a progress function.

Parameters:
psOptions the options struct for GDALDEMProcessing().
pfnProgress the progress callback.
pProgressData the user data for the progress callback.
Since:
GDAL 2.1
GDALDatasetH CPL_DLL GDALGrid ( const char *  pszDest,
GDALDatasetH  hSrcDataset,
const GDALGridOptions *  psOptionsIn,
int *  pbUsageError 
)

Create raster from the scattered data.

This is the equivalent of the gdal_grid utility.

GDALGridOptions* must be allocated and freed with GDALGridOptionsNew() and GDALGridOptionsFree() respectively.

Parameters:
pszDest the destination dataset path.
hSrcDataset the source dataset handle.
psOptionsIn the options struct returned by GDALGridOptionsNew() or NULL.
pbUsageError the pointer to int variable to determine any usage error has occurred or NULL.
Returns:
the output dataset (new dataset that must be closed using GDALClose()) or NULL in case of error.
Since:
GDAL 2.1
void CPL_DLL GDALGridOptionsFree ( GDALGridOptions *  psOptions  ) 

Frees the GDALGridOptions struct.

Parameters:
psOptions the options struct for GDALGrid().
Since:
GDAL 2.1
GDALGridOptions CPL_DLL* GDALGridOptionsNew ( char **  papszArgv,
GDALGridOptionsForBinary *  psOptionsForBinary 
)

Allocates a GDALGridOptions struct.

Parameters:
papszArgv NULL terminated list of options (potentially including filename and open options too), or NULL. The accepted options are the ones of the gdal_translate utility.
psOptionsForBinary (output) may be NULL (and should generally be NULL), otherwise (gdal_translate_bin.cpp use case) must be allocated with GDALGridOptionsForBinaryNew() prior to this function. Will be filled with potentially present filename, open options,...
Returns:
pointer to the allocated GDALGridOptions struct. Must be freed with GDALGridOptionsFree().
Since:
GDAL 2.1
void CPL_DLL GDALGridOptionsSetProgress ( GDALGridOptions *  psOptions,
GDALProgressFunc  pfnProgress,
void *  pProgressData 
)

Set a progress function.

Parameters:
psOptions the options struct for GDALGrid().
pfnProgress the progress callback.
pProgressData the user data for the progress callback.
Since:
GDAL 2.1
char CPL_DLL* GDALInfo ( GDALDatasetH  hDataset,
const GDALInfoOptions *  psOptions 
)

Lists various information about a GDAL supported raster dataset.

This is the equivalent of the gdalinfo utility.

GDALInfoOptions* must be allocated and freed with GDALInfoOptionsNew() and GDALInfoOptionsFree() respectively.

Parameters:
hDataset the dataset handle.
psOptions the options structure returned by GDALInfoOptionsNew() or NULL.
Returns:
string corresponding to the information about the raster dataset (must be freed with CPLFree()), or NULL in case of error.
Since:
GDAL 2.1
void CPL_DLL GDALInfoOptionsFree ( GDALInfoOptions *  psOptions  ) 

Frees the GDALInfoOptions struct.

Parameters:
psOptions the options struct for GDALInfo().
Since:
GDAL 2.1
GDALInfoOptions CPL_DLL* GDALInfoOptionsNew ( char **  papszArgv,
GDALInfoOptionsForBinary *  psOptionsForBinary 
)

Allocates a GDALInfoOptions struct.

Parameters:
papszArgv NULL terminated list of options (potentially including filename and open options too), or NULL. The accepted options are the ones of the gdalinfo utility.
psOptionsForBinary (output) may be NULL (and should generally be NULL), otherwise (gdalinfo_bin.cpp use case) must be allocated with GDALInfoOptionsForBinaryNew() prior to this function. Will be filled with potentially present filename, open options, subdataset number...
Returns:
pointer to the allocated GDALInfoOptions struct. Must be freed with GDALInfoOptionsFree().
Since:
GDAL 2.1
GDALDatasetH CPL_DLL GDALNearblack ( const char *  pszDest,
GDALDatasetH  hDstDS,
GDALDatasetH  hSrcDataset,
const GDALNearblackOptions *  psOptionsIn,
int *  pbUsageError 
)

Convert nearly black/white borders to exact value.

This is the equivalent of the nearblack utility.

GDALNearblackOptions* must be allocated and freed with GDALNearblackOptionsNew() and GDALNearblackOptionsFree() respectively. pszDest and hDstDS cannot be used at the same time.

In-place update (i.e. hDstDS == hSrcDataset) is possible for formats that support it, and if the dataset is opened in update mode.

Parameters:
pszDest the destination dataset path or NULL.
hDstDS the destination dataset or NULL. Might be equal to hSrcDataset.
hSrcDataset the source dataset handle.
psOptionsIn the options struct returned by GDALNearblackOptionsNew() or NULL.
pbUsageError the pointer to int variable to determine any usage error has occurred or NULL.
Returns:
the output dataset (new dataset that must be closed using GDALClose(), or hDstDS is not NULL) or NULL in case of error.
Since:
GDAL 2.1
void CPL_DLL GDALNearblackOptionsFree ( GDALNearblackOptions *  psOptions  ) 

Frees the GDALNearblackOptions struct.

Parameters:
psOptions the options struct for GDALNearblack().
Since:
GDAL 2.1
GDALNearblackOptions CPL_DLL* GDALNearblackOptionsNew ( char **  papszArgv,
GDALNearblackOptionsForBinary *  psOptionsForBinary 
)

Allocates a GDALNearblackOptions struct.

Parameters:
papszArgv NULL terminated list of options (potentially including filename and open options too), or NULL. The accepted options are the ones of the nearblack utility.
psOptionsForBinary (output) may be NULL (and should generally be NULL), otherwise (gdal_translate_bin.cpp use case) must be allocated with GDALNearblackOptionsForBinaryNew() prior to this function. Will be filled with potentially present filename, open options,...
Returns:
pointer to the allocated GDALNearblackOptions struct. Must be freed with GDALNearblackOptionsFree().
Since:
GDAL 2.1
void CPL_DLL GDALNearblackOptionsSetProgress ( GDALNearblackOptions *  psOptions,
GDALProgressFunc  pfnProgress,
void *  pProgressData 
)

Set a progress function.

Parameters:
psOptions the options struct for GDALNearblack().
pfnProgress the progress callback.
pProgressData the user data for the progress callback.
Since:
GDAL 2.1
GDALDatasetH CPL_DLL GDALRasterize ( const char *  pszDest,
GDALDatasetH  hDstDS,
GDALDatasetH  hSrcDataset,
const GDALRasterizeOptions *  psOptionsIn,
int *  pbUsageError 
)

Burns vector geometries into a raster

This is the equivalent of the gdal_rasterize utility.

GDALRasterizeOptions* must be allocated and freed with GDALRasterizeOptionsNew() and GDALRasterizeOptionsFree() respectively. pszDest and hDstDS cannot be used at the same time.

Parameters:
pszDest the destination dataset path or NULL.
hDstDS the destination dataset or NULL.
hSrcDataset the source dataset handle.
psOptionsIn the options struct returned by GDALRasterizeOptionsNew() or NULL.
pbUsageError the pointer to int variable to determine any usage error has occurred or NULL.
Returns:
the output dataset (new dataset that must be closed using GDALClose(), or hDstDS is not NULL) or NULL in case of error.
Since:
GDAL 2.1
void CPL_DLL GDALRasterizeOptionsFree ( GDALRasterizeOptions *  psOptions  ) 

Frees the GDALRasterizeOptions struct.

Parameters:
psOptions the options struct for GDALRasterize().
Since:
GDAL 2.1
GDALRasterizeOptions CPL_DLL* GDALRasterizeOptionsNew ( char **  papszArgv,
GDALRasterizeOptionsForBinary *  psOptionsForBinary 
)

Allocates a GDALRasterizeOptions struct.

Parameters:
papszArgv NULL terminated list of options (potentially including filename and open options too), or NULL. The accepted options are the ones of the gdal_rasterize utility.
psOptionsForBinary (output) may be NULL (and should generally be NULL), otherwise (gdal_translate_bin.cpp use case) must be allocated with GDALRasterizeOptionsForBinaryNew() prior to this function. Will be filled with potentially present filename, open options,...
Returns:
pointer to the allocated GDALRasterizeOptions struct. Must be freed with GDALRasterizeOptionsFree().
Since:
GDAL 2.1
void CPL_DLL GDALRasterizeOptionsSetProgress ( GDALRasterizeOptions *  psOptions,
GDALProgressFunc  pfnProgress,
void *  pProgressData 
)

Set a progress function.

Parameters:
psOptions the options struct for GDALRasterize().
pfnProgress the progress callback.
pProgressData the user data for the progress callback.
Since:
GDAL 2.1
GDALDatasetH CPL_DLL GDALTranslate ( const char *  pszDest,
GDALDatasetH  hSrcDataset,
const GDALTranslateOptions *  psOptionsIn,
int *  pbUsageError 
)

Converts raster data between different formats.

This is the equivalent of the gdal_translate utility.

GDALTranslateOptions* must be allocated and freed with GDALTranslateOptionsNew() and GDALTranslateOptionsFree() respectively.

Parameters:
pszDest the destination dataset path.
hSrcDataset the source dataset handle.
psOptionsIn the options struct returned by GDALTranslateOptionsNew() or NULL.
pbUsageError the pointer to int variable to determine any usage error has occurred or NULL.
Returns:
the output dataset (new dataset that must be closed using GDALClose()) or NULL in case of error.
Since:
GDAL 2.1
void CPL_DLL GDALTranslateOptionsFree ( GDALTranslateOptions *  psOptions  ) 

Frees the GDALTranslateOptions struct.

Parameters:
psOptions the options struct for GDALTranslate().
Since:
GDAL 2.1
GDALTranslateOptions CPL_DLL* GDALTranslateOptionsNew ( char **  papszArgv,
GDALTranslateOptionsForBinary *  psOptionsForBinary 
)

Allocates a GDALTranslateOptions struct.

Parameters:
papszArgv NULL terminated list of options (potentially including filename and open options too), or NULL. The accepted options are the ones of the gdal_translate utility.
psOptionsForBinary (output) may be NULL (and should generally be NULL), otherwise (gdal_translate_bin.cpp use case) must be allocated with GDALTranslateOptionsForBinaryNew() prior to this function. Will be filled with potentially present filename, open options,...
Returns:
pointer to the allocated GDALTranslateOptions struct. Must be freed with GDALTranslateOptionsFree().
Since:
GDAL 2.1
void CPL_DLL GDALTranslateOptionsSetProgress ( GDALTranslateOptions *  psOptions,
GDALProgressFunc  pfnProgress,
void *  pProgressData 
)

Set a progress function.

Parameters:
psOptions the options struct for GDALTranslate().
pfnProgress the progress callback.
pProgressData the user data for the progress callback.
Since:
GDAL 2.1
GDALDatasetH CPL_DLL GDALVectorTranslate ( const char *  pszDest,
GDALDatasetH  hDstDS,
int  nSrcCount,
GDALDatasetH *  pahSrcDS,
const GDALVectorTranslateOptions *  psOptionsIn,
int *  pbUsageError 
)

Converts vector data between file formats.

This is the equivalent of the ogr2ogr utility.

GDALVectorTranslateOptions* must be allocated and freed with GDALVectorTranslateOptionsNew() and GDALVectorTranslateOptionsFree() respectively. pszDest and hDstDS cannot be used at the same time.

Parameters:
pszDest the destination dataset path or NULL.
hDstDS the destination dataset or NULL.
nSrcCount the number of input datasets (only 1 supported currently)
pahSrcDS the list of input datasets.
psOptionsIn the options struct returned by GDALVectorTranslateOptionsNew() or NULL.
pbUsageError the pointer to int variable to determine any usage error has occurred
Returns:
the output dataset (new dataset that must be closed using GDALClose(), or hDstDS is not NULL) or NULL in case of error.
Since:
GDAL 2.1
void CPL_DLL GDALVectorTranslateOptionsFree ( GDALVectorTranslateOptions *  psOptions  ) 

Frees the GDALVectorTranslateOptions struct.

Parameters:
psOptions the options struct for GDALVectorTranslate().
Since:
GDAL 2.1
GDALVectorTranslateOptions CPL_DLL* GDALVectorTranslateOptionsNew ( char **  papszArgv,
GDALVectorTranslateOptionsForBinary *  psOptionsForBinary 
)

allocates a GDALVectorTranslateOptions struct.

Parameters:
papszArgv NULL terminated list of options (potentially including filename and open options too), or NULL. The accepted options are the ones of the ogr2ogr utility.
psOptionsForBinary (output) may be NULL (and should generally be NULL), otherwise (gdal_translate_bin.cpp use case) must be allocated with GDALVectorTranslateOptionsForBinaryNew() prior to this function. Will be filled with potentially present filename, open options,...
Returns:
pointer to the allocated GDALVectorTranslateOptions struct. Must be freed with GDALVectorTranslateOptionsFree().
Since:
GDAL 2.1
void CPL_DLL GDALVectorTranslateOptionsSetProgress ( GDALVectorTranslateOptions *  psOptions,
GDALProgressFunc  pfnProgress,
void *  pProgressData 
)

Set a progress function.

Parameters:
psOptions the options struct for GDALVectorTranslate().
pfnProgress the progress callback.
pProgressData the user data for the progress callback.
Since:
GDAL 2.1
GDALDatasetH CPL_DLL GDALWarp ( const char *  pszDest,
GDALDatasetH  hDstDS,
int  nSrcCount,
GDALDatasetH *  pahSrcDS,
const GDALWarpAppOptions *  psOptionsIn,
int *  pbUsageError 
)

Image reprojection and warping function.

This is the equivalent of the gdalwarp utility.

GDALWarpAppOptions* must be allocated and freed with GDALWarpAppOptionsNew() and GDALWarpAppOptionsFree() respectively. pszDest and hDstDS cannot be used at the same time.

Parameters:
pszDest the destination dataset path or NULL.
hDstDS the destination dataset or NULL.
nSrcCount the number of input datasets.
pahSrcDS the list of input datasets.
psOptionsIn the options struct returned by GDALWarpAppOptionsNew() or NULL.
pbUsageError the pointer to int variable to determine any usage error has occurred.
Returns:
the output dataset (new dataset that must be closed using GDALClose(), or hDstDS is not NULL) or NULL in case of error.
Since:
GDAL 2.1
void CPL_DLL GDALWarpAppOptionsFree ( GDALWarpAppOptions *  psOptions  ) 

Frees the GDALWarpAppOptions struct.

Parameters:
psOptions the options struct for GDALWarp().
Since:
GDAL 2.1
GDALWarpAppOptions CPL_DLL* GDALWarpAppOptionsNew ( char **  papszArgv,
GDALWarpAppOptionsForBinary *  psOptionsForBinary 
)

Allocates a GDALWarpAppOptions struct.

Parameters:
papszArgv NULL terminated list of options (potentially including filename and open options too), or NULL. The accepted options are the ones of the gdalwarp utility.
psOptionsForBinary (output) may be NULL (and should generally be NULL), otherwise (gdal_translate_bin.cpp use case) must be allocated with GDALWarpAppOptionsForBinaryNew() prior to this function. Will be filled with potentially present filename, open options,...
Returns:
pointer to the allocated GDALWarpAppOptions struct. Must be freed with GDALWarpAppOptionsFree().
Since:
GDAL 2.1
void CPL_DLL GDALWarpAppOptionsSetProgress ( GDALWarpAppOptions *  psOptions,
GDALProgressFunc  pfnProgress,
void *  pProgressData 
)

Set a progress function.

Parameters:
psOptions the options struct for GDALWarpApp().
pfnProgress the progress callback.
pProgressData the user data for the progress callback.
Since:
GDAL 2.1
void CPL_DLL GDALWarpAppOptionsSetWarpOption ( GDALWarpAppOptions *  psOptions,
const char *  pszKey,
const char *  pszValue 
)

Set a warp option

Parameters:
psOptions the options struct for GDALWarpApp().
pszKey key.
pszValue value.
Since:
GDAL 2.1
 All Classes Files Functions Variables Typedefs

Generated on 16 Nov 2017 by  doxygen 1.6.1