Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

gdal_alg.h File Reference

#include "gdal.h"

Go to the source code of this file.

Typedefs

typedef int (* GDALTransformerFunc )( void *pTransformerArg, int bDstToSrc, int nPointCount, double *x, double *y, double *z, int *panSuccess )

Functions

CPL_C_START int CPL_DLL GDALComputeMedianCutPCT ( GDALRasterBandH hRed, GDALRasterBandH hGreen, GDALRasterBandH hBlue, int (*pfnIncludePixel)(int,int,void*), int nColors, GDALColorTableH hColorTable, GDALProgressFunc pfnProgress, void * pProgressArg )
int CPL_DLL GDALDitherRGB2PCT ( GDALRasterBandH hRed, GDALRasterBandH hGreen, GDALRasterBandH hBlue, GDALRasterBandH hTarget, GDALColorTableH hColorTable, GDALProgressFunc pfnProgress, void * pProgressArg )
void CPL_DLL* GDALCreateGenImgProjTransformer ( GDALDatasetH hSrcDS, const char *pszSrcWKT, GDALDatasetH hDstDS, const char *pszDstWKT, int bGCPUseOK, double dfGCPErrorThreshold, int nOrder )
void CPL_DLL GDALDestroyGenImgProjTransformer ( void * )
int CPL_DLL GDALGenImgProjTransform ( void *pTransformArg, int bDstToSrc, int nPointCount, double *x, double *y, double *z, int *panSuccess )
void CPL_DLL* GDALCreateReprojectionTransformer ( const char *pszSrcWKT, const char *pszDstWKT )
void CPL_DLL GDALDestroyReprojectionTransformer ( void * )
int CPL_DLL GDALReprojectionTransform ( void *pTransformArg, int bDstToSrc, int nPointCount, double *x, double *y, double *z, int *panSuccess )
void CPL_DLL* GDALCreateGCPTransformer ( int nGCPCount, const GDAL_GCP *pasGCPList, int nReqOrder, int bReversed )
void CPL_DLL GDALDestroyGCPTransformer ( void *pTransformArg )
int CPL_DLL GDALGCPTransform ( void *pTransformArg, int bDstToSrc, int nPointCount, double *x, double *y, double *z, int *panSuccess )
void CPL_DLL* GDALCreateApproxTransformer ( GDALTransformerFunc pfnRawTransformer, void *pRawTransformerArg, double dfMaxError )
void CPL_DLL GDALDestroyApproxTransformer ( void *pApproxArg )
int CPL_DLL GDALApproxTransform ( void *pTransformArg, int bDstToSrc, int nPointCount, double *x, double *y, double *z, int *panSuccess )
int CPL_DLL GDALSimpleImageWarp ( GDALDatasetH hSrcDS, GDALDatasetH hDstDS, int nBandCount, int *panBandList, GDALTransformerFunc pfnTransform, void *pTransformArg, GDALProgressFunc pfnProgress, void *pProgressArg, char **papszWarpOptions )
CPLErr CPL_DLL GDALSuggestedWarpOutput ( GDALDatasetH hSrcDS, GDALTransformerFunc pfnTransformer, void *pTransformArg, double *padfGeoTransformOut, int *pnPixels, int *pnLines )


Detailed Description

Public (C callable) GDAL algorithm entry points, and definitions.


Function Documentation

void * GDALCreateGCPTransformer ( int nGCPCount,
const GDAL_GCP * pasGCPList,
int nReqOrder,
int bReversed )
 

Create GCP based polynomial transformer.

Computes least squares fit polynomials from a provided set of GCPs, and stores the coefficients for later transformation of points between pixel/line and georeferenced coordinates.

The return value should be used as a TransformArg in combination with the transformation function GDALGCPTransform which fits the GDALTransformerFunc signature. The returned transform argument should be deallocated with GDALDestroyGCPTransformer when no longer needed.

This function may fail (returning NULL) if the provided set of GCPs are inadequate for the requested order, the determinate is zero or they are otherwise "ill conditioned".

Note that 2nd order requires at least 6 GCPs, and 3rd order requires at least 10 gcps. If nReqOrder is 0 the highest order possible with the provided gcp count will be used.

Parameters:
nGCPCount   the number of GCPs in pasGCPList.
pasGCPList   an array of GCPs to be used as input.
nReqOrder   the requested polynomial order. It should be 1, 2 or 3.

Returns:
the transform argument or NULL if creation fails.

void GDALDestroyGCPTransformer ( void * pTransformArg )
 

Destroy GCP transformer.

This function is used to destroy information about a GCP based polynomial transformation created with GDALCreateGCPTransformer().

Parameters:
pTransformArg   the transform arg previously returned by GDALCreateGCPTransformer().

int GDALGCPTransform ( void * pTransformArg,
int bDstToSrc,
int nPointCount,
double * x,
double * y,
double * z,
int * panSuccess )
 

Transforms point based on GCP derived polynomial model.

This function matches the GDALTransformerFunc signature, and can be used to transform one or more points from pixel/line coordinates to georeferenced coordinates (SrcToDst) or vice versa (DstToSrc).

Parameters:
pTransformArg   return value from GDALCreateGCPTransformer().
bDstToSrc   TRUE if transformation is from the destination (georeferenced) coordinates to pixel/line or FALSE when transforming from pixel/line to georeferenced coordinates.
nPointCount   the number of values in the x, y and z arrays.
x   array containing the X values to be transformed.
y   array containing the Y values to be transformed.
z   array containing the Z values to be transformed.
panSuccess   array in which a flag indicating success (TRUE) or failure (FALSE) of the transformation are placed.

Returns:
TRUE.


Generated at Sat Dec 21 14:02:02 2002 for GDAL by doxygen1.2.3-20001105 written by Dimitri van Heesch, © 1997-2000