GDAL
gdal_alg.h
Go to the documentation of this file.
1/******************************************************************************
2 * $Id$
3 *
4 * Project: GDAL Image Processing Algorithms
5 * Purpose: Prototypes, and definitions for various GDAL based algorithms.
6 * Author: Frank Warmerdam, warmerdam@pobox.com
7 *
8 ******************************************************************************
9 * Copyright (c) 2001, Frank Warmerdam
10 * Copyright (c) 2008-2012, Even Rouault <even dot rouault at spatialys.com>
11 *
12 * Permission is hereby granted, free of charge, to any person obtaining a
13 * copy of this software and associated documentation files (the "Software"),
14 * to deal in the Software without restriction, including without limitation
15 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
16 * and/or sell copies of the Software, and to permit persons to whom the
17 * Software is furnished to do so, subject to the following conditions:
18 *
19 * The above copyright notice and this permission notice shall be included
20 * in all copies or substantial portions of the Software.
21 *
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
23 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
25 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
27 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
28 * DEALINGS IN THE SOFTWARE.
29 ****************************************************************************/
30
31#ifndef GDAL_ALG_H_INCLUDED
32#define GDAL_ALG_H_INCLUDED
33
40#ifndef DOXYGEN_SKIP
41#include "gdal.h"
42#include "cpl_minixml.h"
43#include "ogr_api.h"
44#include <stdint.h>
45#endif
46
48
49int CPL_DLL CPL_STDCALL GDALComputeMedianCutPCT(
51 int (*pfnIncludePixel)(int, int, void *), int nColors,
52 GDALColorTableH hColorTable, GDALProgressFunc pfnProgress,
53 void *pProgressArg);
54
55int CPL_DLL CPL_STDCALL GDALDitherRGB2PCT(
57 GDALRasterBandH hTarget, GDALColorTableH hColorTable,
58 GDALProgressFunc pfnProgress, void *pProgressArg);
59
60int CPL_DLL CPL_STDCALL GDALChecksumImage(GDALRasterBandH hBand, int nXOff,
61 int nYOff, int nXSize, int nYSize);
62
63CPLErr CPL_DLL CPL_STDCALL GDALComputeProximity(GDALRasterBandH hSrcBand,
64 GDALRasterBandH hProximityBand,
65 char **papszOptions,
66 GDALProgressFunc pfnProgress,
67 void *pProgressArg);
68
69CPLErr CPL_DLL CPL_STDCALL GDALFillNodata(
70 GDALRasterBandH hTargetBand, GDALRasterBandH hMaskBand,
71 double dfMaxSearchDist, int bDeprecatedOption, int nSmoothingIterations,
72 char **papszOptions, GDALProgressFunc pfnProgress, void *pProgressArg);
73
74CPLErr CPL_DLL CPL_STDCALL GDALPolygonize(GDALRasterBandH hSrcBand,
75 GDALRasterBandH hMaskBand,
76 OGRLayerH hOutLayer, int iPixValField,
77 char **papszOptions,
78 GDALProgressFunc pfnProgress,
79 void *pProgressArg);
80
81CPLErr CPL_DLL CPL_STDCALL
83 OGRLayerH hOutLayer, int iPixValField, char **papszOptions,
84 GDALProgressFunc pfnProgress, void *pProgressArg);
85
86CPLErr CPL_DLL CPL_STDCALL GDALSieveFilter(
87 GDALRasterBandH hSrcBand, GDALRasterBandH hMaskBand,
88 GDALRasterBandH hDstBand, int nSizeThreshold, int nConnectedness,
89 char **papszOptions, GDALProgressFunc pfnProgress, void *pProgressArg);
90
91/*
92 * Warp Related.
93 */
94
95typedef int (*GDALTransformerFunc)(void *pTransformerArg, int bDstToSrc,
96 int nPointCount, double *x, double *y,
97 double *z, int *panSuccess);
98
100#define GDAL_GTI2_SIGNATURE "GTI2"
101
102typedef struct
103{
104 GByte abySignature[4];
105 const char *pszClassName;
106 GDALTransformerFunc pfnTransform;
107 void (*pfnCleanup)(void *pTransformerArg);
108 CPLXMLNode *(*pfnSerialize)(void *pTransformerArg);
109 void *(*pfnCreateSimilar)(void *pTransformerArg, double dfSrcRatioX,
110 double dfSrcRatioY);
111} GDALTransformerInfo;
115void CPL_DLL GDALDestroyTransformer(void *pTransformerArg);
116int CPL_DLL GDALUseTransformer(void *pTransformerArg, int bDstToSrc,
117 int nPointCount, double *x, double *y, double *z,
118 int *panSuccess);
119void *GDALCreateSimilarTransformer(void *psTransformerArg, double dfSrcRatioX,
120 double dfSrcRatioY);
123/* High level transformer for going from image coordinates on one file
124 to image coordinates on another, potentially doing reprojection,
125 utilizing GCPs or using the geotransform. */
126
127void CPL_DLL *
128GDALCreateGenImgProjTransformer(GDALDatasetH hSrcDS, const char *pszSrcWKT,
129 GDALDatasetH hDstDS, const char *pszDstWKT,
130 int bGCPUseOK, double dfGCPErrorThreshold,
131 int nOrder);
133 GDALDatasetH hDstDS,
134 char **papszOptions);
136 const char *pszSrcWKT, const double *padfSrcGeoTransform,
137 const char *pszDstWKT, const double *padfDstGeoTransform);
138
140 OGRSpatialReferenceH hSrcSRS, const double *padfSrcGeoTransform,
141 OGRSpatialReferenceH hDstSRS, const double *padfDstGeoTransform,
142 const char *const *papszOptions);
143
145 const double *);
146void CPL_DLL GDALDestroyGenImgProjTransformer(void *);
147int CPL_DLL GDALGenImgProjTransform(void *pTransformArg, int bDstToSrc,
148 int nPointCount, double *x, double *y,
149 double *z, int *panSuccess);
150
151void GDALSetTransformerDstGeoTransform(void *, const double *);
152void GDALGetTransformerDstGeoTransform(void *, double *);
153
154/* Geo to geo reprojection transformer. */
155void CPL_DLL *GDALCreateReprojectionTransformer(const char *pszSrcWKT,
156 const char *pszDstWKT);
157void CPL_DLL *
159 OGRSpatialReferenceH hDstSRS,
160 const char *const *papszOptions);
161void CPL_DLL GDALDestroyReprojectionTransformer(void *);
162int CPL_DLL GDALReprojectionTransform(void *pTransformArg, int bDstToSrc,
163 int nPointCount, double *x, double *y,
164 double *z, int *panSuccess);
165
166/* GCP based transformer ... forward is to georef coordinates */
167void CPL_DLL *GDALCreateGCPTransformer(int nGCPCount,
168 const GDAL_GCP *pasGCPList,
169 int nReqOrder, int bReversed);
170
171/* GCP based transformer with refinement of the GCPs ... forward is to georef
172 * coordinates */
173void CPL_DLL *GDALCreateGCPRefineTransformer(int nGCPCount,
174 const GDAL_GCP *pasGCPList,
175 int nReqOrder, int bReversed,
176 double tolerance, int minimumGcps);
177
178void CPL_DLL GDALDestroyGCPTransformer(void *pTransformArg);
179int CPL_DLL GDALGCPTransform(void *pTransformArg, int bDstToSrc,
180 int nPointCount, double *x, double *y, double *z,
181 int *panSuccess);
182
183/* Thin Plate Spine transformer ... forward is to georef coordinates */
184
185void CPL_DLL *GDALCreateTPSTransformer(int nGCPCount,
186 const GDAL_GCP *pasGCPList,
187 int bReversed);
188void CPL_DLL GDALDestroyTPSTransformer(void *pTransformArg);
189int CPL_DLL GDALTPSTransform(void *pTransformArg, int bDstToSrc,
190 int nPointCount, double *x, double *y, double *z,
191 int *panSuccess);
192
194#ifdef GDAL_COMPILATION
195#define RPCInfoV1ToMD RPCInfoToMD
196#else
197#define RPCInfoToMD RPCInfoV2ToMD
198#endif
199char CPL_DLL **RPCInfoV1ToMD(GDALRPCInfoV1 *psRPCInfo);
200char CPL_DLL **RPCInfoV2ToMD(GDALRPCInfoV2 *psRPCInfo);
203/* RPC based transformer ... src is pixel/line/elev, dst is long/lat/elev */
204
206#ifdef GDAL_COMPILATION
207#define GDALCreateRPCTransformerV1 GDALCreateRPCTransformer
208#else
209#define GDALCreateRPCTransformer GDALCreateRPCTransformerV2
210#endif
211
212void CPL_DLL *GDALCreateRPCTransformerV1(GDALRPCInfoV1 *psRPC, int bReversed,
213 double dfPixErrThreshold,
214 char **papszOptions);
217void CPL_DLL *GDALCreateRPCTransformerV2(const GDALRPCInfoV2 *psRPC,
218 int bReversed,
219 double dfPixErrThreshold,
220 char **papszOptions);
221
222void CPL_DLL GDALDestroyRPCTransformer(void *pTransformArg);
223int CPL_DLL GDALRPCTransform(void *pTransformArg, int bDstToSrc,
224 int nPointCount, double *x, double *y, double *z,
225 int *panSuccess);
226
227/* Geolocation transformer */
228
229void CPL_DLL *GDALCreateGeoLocTransformer(GDALDatasetH hBaseDS,
230 char **papszGeolocationInfo,
231 int bReversed);
232void CPL_DLL GDALDestroyGeoLocTransformer(void *pTransformArg);
233int CPL_DLL GDALGeoLocTransform(void *pTransformArg, int bDstToSrc,
234 int nPointCount, double *x, double *y,
235 double *z, int *panSuccess);
236
237/* Approximate transformer */
238void CPL_DLL *GDALCreateApproxTransformer(GDALTransformerFunc pfnRawTransformer,
239 void *pRawTransformerArg,
240 double dfMaxError);
241void CPL_DLL GDALApproxTransformerOwnsSubtransformer(void *pCBData,
242 int bOwnFlag);
243void CPL_DLL GDALDestroyApproxTransformer(void *pApproxArg);
244int CPL_DLL GDALApproxTransform(void *pTransformArg, int bDstToSrc,
245 int nPointCount, double *x, double *y,
246 double *z, int *panSuccess);
247
248int CPL_DLL CPL_STDCALL GDALSimpleImageWarp(
249 GDALDatasetH hSrcDS, GDALDatasetH hDstDS, int nBandCount, int *panBandList,
250 GDALTransformerFunc pfnTransform, void *pTransformArg,
251 GDALProgressFunc pfnProgress, void *pProgressArg, char **papszWarpOptions);
252
253CPLErr CPL_DLL CPL_STDCALL
255 void *pTransformArg, double *padfGeoTransformOut,
256 int *pnPixels, int *pnLines);
257
259#define GDAL_SWO_ROUND_UP_SIZE 0x1
260
261CPLErr CPL_DLL CPL_STDCALL GDALSuggestedWarpOutput2(
262 GDALDatasetH hSrcDS, GDALTransformerFunc pfnTransformer,
263 void *pTransformArg, double *padfGeoTransformOut, int *pnPixels,
264 int *pnLines, double *padfExtents, int nOptions);
265
267CPLXMLNode CPL_DLL *GDALSerializeTransformer(GDALTransformerFunc pfnFunc,
268 void *pTransformArg);
269CPLErr CPL_DLL GDALDeserializeTransformer(CPLXMLNode *psTree,
270 GDALTransformerFunc *ppfnFunc,
271 void **ppTransformArg);
275 GDALRasterBandH hXBand, GDALRasterBandH hYBand, GDALRasterBandH hZBand,
276 GDALTransformerFunc pfnTransformer, void *pTransformArg,
277 GDALProgressFunc pfnProgress, void *pProgressArg, char **papszOptions);
278
279/* -------------------------------------------------------------------- */
280/* Contour Line Generation */
281/* -------------------------------------------------------------------- */
282
284typedef CPLErr (*GDALContourWriter)(double dfLevel, int nPoints, double *padfX,
285 double *padfY, void *);
286
289
291GDAL_CG_Create(int nWidth, int nHeight, int bNoDataSet, double dfNoDataValue,
292 double dfContourInterval, double dfContourBase,
293 GDALContourWriter pfnWriter, void *pCBData);
295 double *padfScanline);
296void CPL_DLL GDAL_CG_Destroy(GDALContourGeneratorH hCG);
297
299typedef struct
300{
301 void *hLayer;
302
303 double adfGeoTransform[6];
304
305 int nElevField;
306 int nElevFieldMin;
307 int nElevFieldMax;
308 int nIDField;
309 int nNextID;
310} OGRContourWriterInfo;
311
312CPLErr CPL_DLL OGRContourWriter(double, int, double *, double *, void *pInfo);
316 GDALRasterBandH hBand, double dfContourInterval, double dfContourBase,
317 int nFixedLevelCount, double *padfFixedLevels, int bUseNoData,
318 double dfNoDataValue, void *hLayer, int iIDField, int iElevField,
319 GDALProgressFunc pfnProgress, void *pProgressArg);
320
321CPLErr CPL_DLL GDALContourGenerateEx(GDALRasterBandH hBand, void *hLayer,
322 CSLConstList options,
323 GDALProgressFunc pfnProgress,
324 void *pProgressArg);
325
326/* -------------------------------------------------------------------- */
327/* Viewshed Generation */
328/* -------------------------------------------------------------------- */
329
331typedef enum
332{
333 GVM_Diagonal = 1,
334 GVM_Edge = 2,
335 GVM_Max = 3,
336 GVM_Min = 4
338
340typedef enum
341{
342 GVOT_NORMAL = 1,
343 GVOT_MIN_TARGET_HEIGHT_FROM_DEM = 2,
344 GVOT_MIN_TARGET_HEIGHT_FROM_GROUND = 3
346
348 GDALRasterBandH hBand, const char *pszDriverName,
349 const char *pszTargetRasterName, CSLConstList papszCreationOptions,
350 double dfObserverX, double dfObserverY, double dfObserverHeight,
351 double dfTargetHeight, double dfVisibleVal, double dfInvisibleVal,
352 double dfOutOfRangeVal, double dfNoDataVal, double dfCurvCoeff,
353 GDALViewshedMode eMode, double dfMaxDistance, GDALProgressFunc pfnProgress,
354 void *pProgressArg, GDALViewshedOutputType heightMode,
355 CSLConstList papszExtraOptions);
356
357/************************************************************************/
358/* Rasterizer API - geometries burned into GDAL raster. */
359/************************************************************************/
360
362 GDALDatasetH hDS, int nBandCount, const int *panBandList, int nGeomCount,
363 const OGRGeometryH *pahGeometries, GDALTransformerFunc pfnTransformer,
364 void *pTransformArg, const double *padfGeomBurnValues,
365 CSLConstList papszOptions, GDALProgressFunc pfnProgress,
366 void *pProgressArg);
367
369 GDALDatasetH hDS, int nBandCount, const int *panBandList, int nGeomCount,
370 const OGRGeometryH *pahGeometries, GDALTransformerFunc pfnTransformer,
371 void *pTransformArg, const int64_t *panGeomBurnValues,
372 CSLConstList papszOptions, GDALProgressFunc pfnProgress,
373 void *pProgressArg);
374
376 GDALDatasetH hDS, int nBandCount, int *panBandList, int nLayerCount,
377 OGRLayerH *pahLayers, GDALTransformerFunc pfnTransformer,
378 void *pTransformArg, double *padfLayerBurnValues, char **papszOptions,
379 GDALProgressFunc pfnProgress, void *pProgressArg);
380
382 void *pData, int nBufXSize, int nBufYSize, GDALDataType eBufType,
383 int nPixelSpace, int nLineSpace, int nLayerCount, OGRLayerH *pahLayers,
384 const char *pszDstProjection, double *padfDstGeoTransform,
385 GDALTransformerFunc pfnTransformer, void *pTransformArg, double dfBurnValue,
386 char **papszOptions, GDALProgressFunc pfnProgress, void *pProgressArg);
387
388/************************************************************************/
389/* Gridding interface. */
390/************************************************************************/
391
411
449
489
530
532typedef struct
533{
538 double dfRadius1;
540 double dfRadius2;
545 double dfAngle;
549
585
587typedef struct
588{
597 double dfRadius;
601
602CPLErr CPL_DLL GDALGridCreate(GDALGridAlgorithm, const void *, GUInt32,
603 const double *, const double *, const double *,
604 double, double, double, double, GUInt32, GUInt32,
605 GDALDataType, void *, GDALProgressFunc, void *);
606
609
610GDALGridContext CPL_DLL *
611GDALGridContextCreate(GDALGridAlgorithm eAlgorithm, const void *poOptions,
612 GUInt32 nPoints, const double *padfX, const double *padfY,
613 const double *padfZ, int bCallerWillKeepPointArraysAlive);
614
615void CPL_DLL GDALGridContextFree(GDALGridContext *psContext);
616
617CPLErr CPL_DLL GDALGridContextProcess(GDALGridContext *psContext, double dfXMin,
618 double dfXMax, double dfYMin,
619 double dfYMax, GUInt32 nXSize,
620 GUInt32 nYSize, GDALDataType eType,
621 void *pData, GDALProgressFunc pfnProgress,
622 void *pProgressArg);
623
625 GDALDatasetH hSecondImage,
626 char **papszOptions,
627 int *pnGCPCount);
628
629/************************************************************************/
630/* Delaunay triangulation interface. */
631/************************************************************************/
632
634typedef struct
635{
636 int anVertexIdx[3];
637 int anNeighborIdx[3];
639 /* anNeighborIdx[k] is the triangle to the opposite side */
640 /* of the opposite segment of anVertexIdx[k] */
642
650typedef struct
651{
652 double dfMul1X;
653 double dfMul1Y;
654 double dfMul2X;
655 double dfMul2Y;
656 double dfCstX;
657 double dfCstY;
659
668
669int CPL_DLL GDALHasTriangulation(void);
670
672 const double *padfX,
673 const double *padfY);
675 GDALTriangulation *psDT, const double *padfX, const double *padfY);
677 const GDALTriangulation *psDT, int nFacetIdx, double dfX, double dfY,
678 double *pdfL1, double *pdfL2, double *pdfL3);
680 double dfX, double dfY,
681 int *panOutputFacetIdx);
683 int nFacetIdx, double dfX,
684 double dfY,
685 int *panOutputFacetIdx);
686void CPL_DLL GDALTriangulationFree(GDALTriangulation *psDT);
687
689#ifndef CPL_WARN_DEPRECATED_GDALOpenVerticalShiftGrid
690#define CPL_WARN_DEPRECATED_GDALOpenVerticalShiftGrid CPL_WARN_DEPRECATED
691#endif
694GDALDatasetH CPL_DLL GDALOpenVerticalShiftGrid(const char *pszProj4Geoidgrids,
695 int *pbError)
697 CPL_WARN_DEPRECATED_GDALOpenVerticalShiftGrid(
698 "GDALOpenVerticalShiftGrid() will be removed in GDAL 4.0")
700 ;
701
703#ifndef CPL_WARN_DEPRECATED_GDALApplyVerticalShiftGrid
704#define CPL_WARN_DEPRECATED_GDALApplyVerticalShiftGrid CPL_WARN_DEPRECATED
705#endif
709 GDALDatasetH hGridDataset,
710 int bInverse,
711 double dfSrcUnitToMeter,
712 double dfDstUnitToMeter,
713 const char *const *papszOptions)
715 CPL_WARN_DEPRECATED_GDALApplyVerticalShiftGrid(
716 "GDALApplyVerticalShiftGrid() will be removed in GDAL 4.0")
718 ;
719
721
722#endif /* ndef GDAL_ALG_H_INCLUDED */
CPLErr
Error category.
Definition cpl_error.h:53
Definitions for CPL mini XML Parser/Serializer.
#define CPL_C_END
Macro to end a block of C symbols.
Definition cpl_port.h:317
#define CPL_C_START
Macro to start a block of C symbols.
Definition cpl_port.h:313
unsigned int GUInt32
Unsigned int32 type.
Definition cpl_port.h:197
char ** CSLConstList
Type of a constant null-terminated list of nul terminated strings.
Definition cpl_port.h:1190
unsigned char GByte
Unsigned byte type.
Definition cpl_port.h:205
Public (C callable) GDAL entry points.
GDALDataType
Definition gdal.h:64
void * GDALDatasetH
Opaque type used for the C bindings of the C++ GDALDataset class.
Definition gdal.h:290
void * GDALRasterBandH
Opaque type used for the C bindings of the C++ GDALRasterBand class.
Definition gdal.h:293
void * GDALColorTableH
Opaque type used for the C bindings of the C++ GDALColorTable class.
Definition gdal.h:299
CPLErr GDALContourGenerateEx(GDALRasterBandH hBand, void *hLayer, CSLConstList options, GDALProgressFunc pfnProgress, void *pProgressArg)
Create vector contours from raster DEM.
Definition contour.cpp:549
void * GDALCreateGeoLocTransformer(GDALDatasetH hBaseDS, char **papszGeolocationInfo, int bReversed)
Create GeoLocation transformer.
Definition gdalgeoloc.cpp:2029
struct GDALGridContext GDALGridContext
Grid context opaque type.
Definition gdal_alg.h:608
CPLErr GDALFillNodata(GDALRasterBandH hTargetBand, GDALRasterBandH hMaskBand, double dfMaxSearchDist, int bDeprecatedOption, int nSmoothingIterations, char **papszOptions, GDALProgressFunc pfnProgress, void *pProgressArg)
Fill selected raster regions by interpolation from the edges.
Definition rasterfill.cpp:409
CPLErr GDALRasterizeGeometriesInt64(GDALDatasetH hDS, int nBandCount, const int *panBandList, int nGeomCount, const OGRGeometryH *pahGeometries, GDALTransformerFunc pfnTransformer, void *pTransformArg, const int64_t *panGeomBurnValues, CSLConstList papszOptions, GDALProgressFunc pfnProgress, void *pProgressArg)
Burn geometries into raster.
Definition gdalrasterize.cpp:874
int GDALGenImgProjTransform(void *pTransformArg, int bDstToSrc, int nPointCount, double *x, double *y, double *z, int *panSuccess)
Perform general image reprojection transformation.
Definition gdaltransformer.cpp:2650
GDALTriangulation * GDALTriangulationCreateDelaunay(int nPoints, const double *padfX, const double *padfY)
Computes a Delaunay triangulation of the passed points.
Definition delaunay.c:116
GDALContourGeneratorH GDAL_CG_Create(int nWidth, int nHeight, int bNoDataSet, double dfNoDataValue, double dfContourInterval, double dfContourBase, GDALContourWriter pfnWriter, void *pCBData)
Create contour generator.
Definition contour.cpp:779
void * GDALCreateGCPRefineTransformer(int nGCPCount, const GDAL_GCP *pasGCPList, int nReqOrder, int bReversed, double tolerance, int minimumGcps)
Create GCP based polynomial transformer, with a tolerance threshold to discard GCPs that transform ba...
Definition gdal_crs.cpp:350
void * GDALCreateReprojectionTransformer(const char *pszSrcWKT, const char *pszDstWKT)
Create reprojection transformer.
Definition gdaltransformer.cpp:3117
void * GDALCreateReprojectionTransformerEx(OGRSpatialReferenceH hSrcSRS, OGRSpatialReferenceH hDstSRS, const char *const *papszOptions)
Create reprojection transformer.
Definition gdaltransformer.cpp:3186
void GDALSetGenImgProjTransformerDstGeoTransform(void *, const double *)
Set GenImgProj output geotransform.
Definition gdaltransformer.cpp:2581
void GDALDestroyGeoLocTransformer(void *pTransformArg)
Destroy GeoLocation transformer.
Definition gdalgeoloc.cpp:2042
void GDALGridContextFree(GDALGridContext *psContext)
Free a context used created by GDALGridContextCreate()
Definition gdalgrid.cpp:3367
void GDALTriangulationFree(GDALTriangulation *psDT)
Free a triangulation.
Definition delaunay.c:278
void * GDALCreateGenImgProjTransformer(GDALDatasetH hSrcDS, const char *pszSrcWKT, GDALDatasetH hDstDS, const char *pszDstWKT, int bGCPUseOK, double dfGCPErrorThreshold, int nOrder)
Create image to image transformer.
Definition gdaltransformer.cpp:1354
CPLErr GDALGridCreate(GDALGridAlgorithm, const void *, GUInt32, const double *, const double *, const double *, double, double, double, double, GUInt32, GUInt32, GDALDataType, void *, GDALProgressFunc, void *)
Create regular grid from the scattered data.
Definition gdalgrid.cpp:3656
CPLErr GDALRasterizeGeometries(GDALDatasetH hDS, int nBandCount, const int *panBandList, int nGeomCount, const OGRGeometryH *pahGeometries, GDALTransformerFunc pfnTransformer, void *pTransformArg, const double *padfGeomBurnValues, CSLConstList papszOptions, GDALProgressFunc pfnProgress, void *pProgressArg)
Burn geometries into raster.
Definition gdalrasterize.cpp:851
int GDALDitherRGB2PCT(GDALRasterBandH hRed, GDALRasterBandH hGreen, GDALRasterBandH hBlue, GDALRasterBandH hTarget, GDALColorTableH hColorTable, GDALProgressFunc pfnProgress, void *pProgressArg)
24bit to 8bit conversion with dithering.
Definition gdaldither.cpp:146
int GDALTriangulationComputeBarycentricCoordinates(const GDALTriangulation *psDT, int nFacetIdx, double dfX, double dfY, double *pdfL1, double *pdfL2, double *pdfL3)
Computes the barycentric coordinates of a point.
Definition delaunay.c:386
CPLErr GDALSieveFilter(GDALRasterBandH hSrcBand, GDALRasterBandH hMaskBand, GDALRasterBandH hDstBand, int nSizeThreshold, int nConnectedness, char **papszOptions, GDALProgressFunc pfnProgress, void *pProgressArg)
Removes small raster polygons.
Definition gdalsievefilter.cpp:196
GDALDatasetH GDALApplyVerticalShiftGrid(GDALDatasetH hSrcDataset, GDALDatasetH hGridDataset, int bInverse, double dfSrcUnitToMeter, double dfDstUnitToMeter, const char *const *papszOptions)
Apply a vertical shift grid to a source (DEM typically) dataset.
Definition gdalapplyverticalshiftgrid.cpp:358
CPLErr GDALPolygonize(GDALRasterBandH hSrcBand, GDALRasterBandH hMaskBand, OGRLayerH hOutLayer, int iPixValField, char **papszOptions, GDALProgressFunc pfnProgress, void *pProgressArg)
Create polygon coverage from raster data.
Definition polygonize.cpp:957
GDALViewshedMode
Viewshed Modes.
Definition gdal_alg.h:332
void GDALDestroyGCPTransformer(void *pTransformArg)
Destroy GCP transformer.
Definition gdal_crs.cpp:380
GDALGridAlgorithm
Gridding Algorithms.
Definition gdal_alg.h:394
@ GGA_MetricMinimum
Definition gdal_alg.h:398
@ GGA_InverseDistanceToAPowerNearestNeighbor
Definition gdal_alg.h:409
@ GGA_InverseDistanceToAPower
Definition gdal_alg.h:395
@ GGA_MetricAverageDistancePts
Definition gdal_alg.h:404
@ GGA_MetricMaximum
Definition gdal_alg.h:399
@ GGA_NearestNeighbor
Definition gdal_alg.h:397
@ GGA_MetricAverageDistance
Definition gdal_alg.h:402
@ GGA_MovingAverage
Definition gdal_alg.h:396
@ GGA_MetricCount
Definition gdal_alg.h:401
@ GGA_MetricRange
Definition gdal_alg.h:400
@ GGA_Linear
Definition gdal_alg.h:406
void GDALDestroyGenImgProjTransformer(void *)
GenImgProjTransformer deallocator.
Definition gdaltransformer.cpp:2612
int GDALRPCTransform(void *pTransformArg, int bDstToSrc, int nPointCount, double *x, double *y, double *z, int *panSuccess)
RPC transform.
Definition gdal_rpc.cpp:2042
int GDALComputeMedianCutPCT(GDALRasterBandH hRed, GDALRasterBandH hGreen, GDALRasterBandH hBlue, int(*pfnIncludePixel)(int, int, void *), int nColors, GDALColorTableH hColorTable, GDALProgressFunc pfnProgress, void *pProgressArg)
Compute optimal PCT for RGB image.
Definition gdalmediancut.cpp:143
int GDALTriangulationFindFacetBruteForce(const GDALTriangulation *psDT, double dfX, double dfY, int *panOutputFacetIdx)
Returns the index of the triangle that contains the point by iterating over all triangles.
Definition delaunay.c:431
GDALDatasetH GDALOpenVerticalShiftGrid(const char *pszProj4Geoidgrids, int *pbError)
Load proj.4 geoidgrids as GDAL dataset.
Definition gdalapplyverticalshiftgrid.cpp:580
void GDAL_CG_Destroy(GDALContourGeneratorH hCG)
Destroy contour generator.
Definition contour.cpp:811
void GDALApproxTransformerOwnsSubtransformer(void *pCBData, int bOwnFlag)
Set bOwnSubtransformer flag.
Definition gdaltransformer.cpp:3654
int GDALApproxTransform(void *pTransformArg, int bDstToSrc, int nPointCount, double *x, double *y, double *z, int *panSuccess)
Perform approximate transformation.
Definition gdaltransformer.cpp:3968
void * GDALCreateGenImgProjTransformer4(OGRSpatialReferenceH hSrcSRS, const double *padfSrcGeoTransform, OGRSpatialReferenceH hDstSRS, const double *padfDstGeoTransform, const char *const *papszOptions)
Create image to image transformer.
Definition gdaltransformer.cpp:2473
CPLErr GDALFPolygonize(GDALRasterBandH hSrcBand, GDALRasterBandH hMaskBand, OGRLayerH hOutLayer, int iPixValField, char **papszOptions, GDALProgressFunc pfnProgress, void *pProgressArg)
Create polygon coverage from raster data.
Definition polygonize.cpp:1030
CPLErr GDALGridContextProcess(GDALGridContext *psContext, double dfXMin, double dfXMax, double dfYMin, double dfYMax, GUInt32 nXSize, GUInt32 nYSize, GDALDataType eType, void *pData, GDALProgressFunc pfnProgress, void *pProgressArg)
Do the gridding of a window of a raster.
Definition gdalgrid.cpp:3421
GDALGridContext * GDALGridContextCreate(GDALGridAlgorithm eAlgorithm, const void *poOptions, GUInt32 nPoints, const double *padfX, const double *padfY, const double *padfZ, int bCallerWillKeepPointArraysAlive)
Creates a context to do regular gridding from the scattered data.
Definition gdalgrid.cpp:2764
CPLErr GDALSuggestedWarpOutput(GDALDatasetH hSrcDS, GDALTransformerFunc pfnTransformer, void *pTransformArg, double *padfGeoTransformOut, int *pnPixels, int *pnLines)
Suggest output file size.
Definition gdaltransformer.cpp:233
CPLErr GDALComputeProximity(GDALRasterBandH hSrcBand, GDALRasterBandH hProximityBand, char **papszOptions, GDALProgressFunc pfnProgress, void *pProgressArg)
Compute the proximity of all pixels in the image to a set of pixels in the source image.
Definition gdalproximity.cpp:112
CPLErr GDALTransformGeolocations(GDALRasterBandH hXBand, GDALRasterBandH hYBand, GDALRasterBandH hZBand, GDALTransformerFunc pfnTransformer, void *pTransformArg, GDALProgressFunc pfnProgress, void *pProgressArg, char **papszOptions)
Transform locations held in bands.
Definition gdaltransformgeolocs.cpp:67
void GDALGetTransformerDstGeoTransform(void *, double *)
Get ApproxTransformer or GenImgProj output geotransform.
Definition gdaltransformer.cpp:4607
CPLErr GDALSuggestedWarpOutput2(GDALDatasetH hSrcDS, GDALTransformerFunc pfnTransformer, void *pTransformArg, double *padfGeoTransformOut, int *pnPixels, int *pnLines, double *padfExtents, int nOptions)
Suggest output file size.
Definition gdaltransformer.cpp:407
GDAL_GCP * GDALComputeMatchingPoints(GDALDatasetH hFirstImage, GDALDatasetH hSecondImage, char **papszOptions, int *pnGCPCount)
GDALComputeMatchingPoints.
Definition gdalmatching.cpp:184
GDALDatasetH GDALViewshedGenerate(GDALRasterBandH hBand, const char *pszDriverName, const char *pszTargetRasterName, CSLConstList papszCreationOptions, double dfObserverX, double dfObserverY, double dfObserverHeight, double dfTargetHeight, double dfVisibleVal, double dfInvisibleVal, double dfOutOfRangeVal, double dfNoDataVal, double dfCurvCoeff, GDALViewshedMode eMode, double dfMaxDistance, GDALProgressFunc pfnProgress, void *pProgressArg, GDALViewshedOutputType heightMode, CSLConstList papszExtraOptions)
Create viewshed from raster DEM.
Definition viewshed.cpp:214
CPLErr GDAL_CG_FeedLine(GDALContourGeneratorH hCG, double *padfScanline)
Feed a line to the contour generator.
Definition contour.cpp:798
int GDALTriangulationComputeBarycentricCoefficients(GDALTriangulation *psDT, const double *padfX, const double *padfY)
Computes barycentric coefficients for each triangles of the triangulation.
Definition delaunay.c:304
int GDALGCPTransform(void *pTransformArg, int bDstToSrc, int nPointCount, double *x, double *y, double *z, int *panSuccess)
Transforms point based on GCP derived polynomial model.
Definition gdal_crs.cpp:422
void * GDALCreateRPCTransformerV2(const GDALRPCInfoV2 *psRPC, int bReversed, double dfPixErrThreshold, char **papszOptions)
Create an RPC based transformer.
Definition gdal_rpc.cpp:815
GDALViewshedOutputType
Viewshed output types.
Definition gdal_alg.h:341
void GDALDestroyApproxTransformer(void *pApproxArg)
Cleanup approximate transformer.
Definition gdaltransformer.cpp:3675
void * GDALCreateGenImgProjTransformer3(const char *pszSrcWKT, const double *padfSrcGeoTransform, const char *pszDstWKT, const double *padfDstGeoTransform)
Create image to image transformer.
Definition gdaltransformer.cpp:2424
int GDALHasTriangulation(void)
Returns if GDAL is built with Delaunay triangulation support.
Definition delaunay.c:93
CPLErr(* GDALContourWriter)(double dfLevel, int nPoints, double *padfX, double *padfY, void *)
Contour writer callback type.
Definition gdal_alg.h:284
CPLErr GDALRasterizeLayersBuf(void *pData, int nBufXSize, int nBufYSize, GDALDataType eBufType, int nPixelSpace, int nLineSpace, int nLayerCount, OGRLayerH *pahLayers, const char *pszDstProjection, double *padfDstGeoTransform, GDALTransformerFunc pfnTransformer, void *pTransformArg, double dfBurnValue, char **papszOptions, GDALProgressFunc pfnProgress, void *pProgressArg)
Burn geometries from the specified list of layer into raster.
Definition gdalrasterize.cpp:1736
int GDALTPSTransform(void *pTransformArg, int bDstToSrc, int nPointCount, double *x, double *y, double *z, int *panSuccess)
Transforms point based on GCP derived polynomial model.
Definition gdal_tps.cpp:352
int GDALChecksumImage(GDALRasterBandH hBand, int nXOff, int nYOff, int nXSize, int nYSize)
Compute checksum for image region.
Definition gdalchecksum.cpp:66
int(* GDALTransformerFunc)(void *pTransformerArg, int bDstToSrc, int nPointCount, double *x, double *y, double *z, int *panSuccess)
Definition gdal_alg.h:95
void GDALSetTransformerDstGeoTransform(void *, const double *)
Set ApproxTransformer or GenImgProj output geotransform.
Definition gdaltransformer.cpp:4582
void * GDALContourGeneratorH
Contour generator opaque type.
Definition gdal_alg.h:288
CPLErr GDALContourGenerate(GDALRasterBandH hBand, double dfContourInterval, double dfContourBase, int nFixedLevelCount, double *padfFixedLevels, int bUseNoData, double dfNoDataValue, void *hLayer, int iIDField, int iElevField, GDALProgressFunc pfnProgress, void *pProgressArg)
Create vector contours from raster DEM.
Definition contour.cpp:321
void GDALDestroyRPCTransformer(void *pTransformArg)
Destroy RPC tranformer.
Definition gdal_rpc.cpp:1097
CPLErr GDALRasterizeLayers(GDALDatasetH hDS, int nBandCount, int *panBandList, int nLayerCount, OGRLayerH *pahLayers, GDALTransformerFunc pfnTransformer, void *pTransformArg, double *padfLayerBurnValues, char **papszOptions, GDALProgressFunc pfnProgress, void *pProgressArg)
Burn geometries from the specified list of layers into raster.
Definition gdalrasterize.cpp:1359
void * GDALCreateGenImgProjTransformer2(GDALDatasetH hSrcDS, GDALDatasetH hDstDS, char **papszOptions)
Create image to image transformer.
Definition gdaltransformer.cpp:1756
int GDALSimpleImageWarp(GDALDatasetH hSrcDS, GDALDatasetH hDstDS, int nBandCount, int *panBandList, GDALTransformerFunc pfnTransform, void *pTransformArg, GDALProgressFunc pfnProgress, void *pProgressArg, char **papszWarpOptions)
Perform simple image warp.
Definition gdalsimplewarp.cpp:232
void GDALDestroyReprojectionTransformer(void *)
Destroy reprojection transformation.
Definition gdaltransformer.cpp:3282
void * GDALCreateGCPTransformer(int nGCPCount, const GDAL_GCP *pasGCPList, int nReqOrder, int bReversed)
Create GCP based polynomial transformer.
Definition gdal_crs.cpp:339
int GDALReprojectionTransform(void *pTransformArg, int bDstToSrc, int nPointCount, double *x, double *y, double *z, int *panSuccess)
Perform reprojection transformation.
Definition gdaltransformer.cpp:3315
void * GDALCreateApproxTransformer(GDALTransformerFunc pfnRawTransformer, void *pRawTransformerArg, double dfMaxError)
Create an approximating transformer.
Definition gdaltransformer.cpp:3616
int GDALGeoLocTransform(void *pTransformArg, int bDstToSrc, int nPointCount, double *x, double *y, double *z, int *panSuccess)
Use GeoLocation transformer.
Definition gdalgeoloc.cpp:2075
int GDALTriangulationFindFacetDirected(const GDALTriangulation *psDT, int nFacetIdx, double dfX, double dfY, int *panOutputFacetIdx)
Returns the index of the triangle that contains the point by walking in the triangulation.
Definition delaunay.c:526
void * GDALCreateTPSTransformer(int nGCPCount, const GDAL_GCP *pasGCPList, int bReversed)
Create Thin Plate Spline transformer from GCPs.
Definition gdal_tps.cpp:143
void GDALDestroyTPSTransformer(void *pTransformArg)
Destroy TPS transformer.
Definition gdal_tps.cpp:307
C API and defines for OGRFeature, OGRGeometry, and OGRDataSource related classes.
void * OGRGeometryH
Opaque type for a geometry.
Definition ogr_api.h:66
void * OGRSpatialReferenceH
Opaque type for a spatial reference system.
Definition ogr_api.h:81
void * OGRLayerH
Opaque type for a layer (OGRLayer)
Definition ogr_api.h:613
Document node structure.
Definition cpl_minixml.h:70
Data metrics method control options.
Definition gdal_alg.h:552
double dfRadius2
Definition gdal_alg.h:559
double dfAngle
Definition gdal_alg.h:564
double dfNoDataValue
Definition gdal_alg.h:572
double dfRadius1
Definition gdal_alg.h:557
size_t nSizeOfStructure
Definition gdal_alg.h:555
GUInt32 nMinPointsPerQuadrant
Definition gdal_alg.h:583
GUInt32 nMinPoints
Definition gdal_alg.h:570
GUInt32 nMaxPointsPerQuadrant
Definition gdal_alg.h:577
Inverse distance to a power, with nearest neighbour search, control options.
Definition gdal_alg.h:453
size_t nSizeOfStructure
Definition gdal_alg.h:456
GUInt32 nMinPointsPerQuadrant
Definition gdal_alg.h:487
GUInt32 nMaxPointsPerQuadrant
Definition gdal_alg.h:481
Inverse distance to a power method control options.
Definition gdal_alg.h:414
GUInt32 nMinPoints
Definition gdal_alg.h:445
double dfPower
Definition gdal_alg.h:419
double dfRadius2
Definition gdal_alg.h:429
double dfNoDataValue
Definition gdal_alg.h:447
double dfSmoothing
Definition gdal_alg.h:421
double dfAngle
Definition gdal_alg.h:434
double dfRadius1
Definition gdal_alg.h:427
GUInt32 nMaxPoints
Definition gdal_alg.h:439
size_t nSizeOfStructure
Definition gdal_alg.h:417
double dfAnisotropyRatio
Definition gdal_alg.h:423
double dfAnisotropyAngle
Definition gdal_alg.h:425
Linear method control options.
Definition gdal_alg.h:588
size_t nSizeOfStructure
Definition gdal_alg.h:591
double dfNoDataValue
Definition gdal_alg.h:599
double dfRadius
Definition gdal_alg.h:597
Moving average method control options.
Definition gdal_alg.h:492
GUInt32 nMaxPoints
Definition gdal_alg.h:509
double dfRadius1
Definition gdal_alg.h:497
double dfNoDataValue
Definition gdal_alg.h:517
double dfAngle
Definition gdal_alg.h:504
GUInt32 nMinPoints
Definition gdal_alg.h:515
double dfRadius2
Definition gdal_alg.h:499
GUInt32 nMinPointsPerQuadrant
Definition gdal_alg.h:528
size_t nSizeOfStructure
Definition gdal_alg.h:495
GUInt32 nMaxPointsPerQuadrant
Definition gdal_alg.h:522
Nearest neighbor method control options.
Definition gdal_alg.h:533
double dfNoDataValue
Definition gdal_alg.h:547
size_t nSizeOfStructure
Definition gdal_alg.h:536
double dfRadius2
Definition gdal_alg.h:540
double dfAngle
Definition gdal_alg.h:545
double dfRadius1
Definition gdal_alg.h:538
Structure to store Rational Polynomial Coefficients / Rigorous Projection Model.
Definition gdal.h:1569
Triangle barycentric coefficients.
Definition gdal_alg.h:651
double dfCstY
dfCstY
Definition gdal_alg.h:657
double dfCstX
dfCstX
Definition gdal_alg.h:656
double dfMul2Y
dfMul2Y
Definition gdal_alg.h:655
double dfMul1Y
dfMul1Y
Definition gdal_alg.h:653
double dfMul2X
dfMul2X
Definition gdal_alg.h:654
double dfMul1X
dfMul1X
Definition gdal_alg.h:652
Triangle fact.
Definition gdal_alg.h:635
Triangulation structure.
Definition gdal_alg.h:662
GDALTriBarycentricCoefficients * pasFacetCoefficients
arra of nFacets barycentric coefficients
Definition gdal_alg.h:666
int nFacets
number of facets
Definition gdal_alg.h:663
GDALTriFacet * pasFacets
array of nFacets facets
Definition gdal_alg.h:664
Ground Control Point.
Definition gdal.h:959