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;
112
116void CPL_DLL GDALDestroyTransformer(void *pTransformerArg);
117int CPL_DLL GDALUseTransformer(void *pTransformerArg, int bDstToSrc,
118 int nPointCount, double *x, double *y, double *z,
119 int *panSuccess);
120void *GDALCreateSimilarTransformer(void *psTransformerArg, double dfSrcRatioX,
121 double dfSrcRatioY);
124/* High level transformer for going from image coordinates on one file
125 to image coordinates on another, potentially doing reprojection,
126 utilizing GCPs or using the geotransform. */
127
128void CPL_DLL *
129GDALCreateGenImgProjTransformer(GDALDatasetH hSrcDS, const char *pszSrcWKT,
130 GDALDatasetH hDstDS, const char *pszDstWKT,
131 int bGCPUseOK, double dfGCPErrorThreshold,
132 int nOrder);
134 GDALDatasetH hDstDS,
135 char **papszOptions);
137 const char *pszSrcWKT, const double *padfSrcGeoTransform,
138 const char *pszDstWKT, const double *padfDstGeoTransform);
139
141 OGRSpatialReferenceH hSrcSRS, const double *padfSrcGeoTransform,
142 OGRSpatialReferenceH hDstSRS, const double *padfDstGeoTransform,
143 const char *const *papszOptions);
144
146 const double *);
147void CPL_DLL GDALDestroyGenImgProjTransformer(void *);
148int CPL_DLL GDALGenImgProjTransform(void *pTransformArg, int bDstToSrc,
149 int nPointCount, double *x, double *y,
150 double *z, int *panSuccess);
151
152void GDALSetTransformerDstGeoTransform(void *, const double *);
153void GDALGetTransformerDstGeoTransform(void *, double *);
154
155/* Geo to geo reprojection transformer. */
156void CPL_DLL *GDALCreateReprojectionTransformer(const char *pszSrcWKT,
157 const char *pszDstWKT);
158void CPL_DLL *
160 OGRSpatialReferenceH hDstSRS,
161 const char *const *papszOptions);
162void CPL_DLL GDALDestroyReprojectionTransformer(void *);
163int CPL_DLL GDALReprojectionTransform(void *pTransformArg, int bDstToSrc,
164 int nPointCount, double *x, double *y,
165 double *z, int *panSuccess);
166
167/* GCP based transformer ... forward is to georef coordinates */
168void CPL_DLL *GDALCreateGCPTransformer(int nGCPCount,
169 const GDAL_GCP *pasGCPList,
170 int nReqOrder, int bReversed);
171
172/* GCP based transformer with refinement of the GCPs ... forward is to georef
173 * coordinates */
174void CPL_DLL *GDALCreateGCPRefineTransformer(int nGCPCount,
175 const GDAL_GCP *pasGCPList,
176 int nReqOrder, int bReversed,
177 double tolerance, int minimumGcps);
178
179void CPL_DLL GDALDestroyGCPTransformer(void *pTransformArg);
180int CPL_DLL GDALGCPTransform(void *pTransformArg, int bDstToSrc,
181 int nPointCount, double *x, double *y, double *z,
182 int *panSuccess);
183
184/* Thin Plate Spine transformer ... forward is to georef coordinates */
185
186void CPL_DLL *GDALCreateTPSTransformer(int nGCPCount,
187 const GDAL_GCP *pasGCPList,
188 int bReversed);
189void CPL_DLL GDALDestroyTPSTransformer(void *pTransformArg);
190int CPL_DLL GDALTPSTransform(void *pTransformArg, int bDstToSrc,
191 int nPointCount, double *x, double *y, double *z,
192 int *panSuccess);
193
195#ifdef GDAL_COMPILATION
196#define RPCInfoV1ToMD RPCInfoToMD
197#else
198#define RPCInfoToMD RPCInfoV2ToMD
199#endif
200char CPL_DLL **RPCInfoV1ToMD(GDALRPCInfoV1 *psRPCInfo);
201char CPL_DLL **RPCInfoV2ToMD(GDALRPCInfoV2 *psRPCInfo);
204/* RPC based transformer ... src is pixel/line/elev, dst is long/lat/elev */
205
207#ifdef GDAL_COMPILATION
208#define GDALCreateRPCTransformerV1 GDALCreateRPCTransformer
209#else
210#define GDALCreateRPCTransformer GDALCreateRPCTransformerV2
211#endif
212
213void CPL_DLL *GDALCreateRPCTransformerV1(GDALRPCInfoV1 *psRPC, int bReversed,
214 double dfPixErrThreshold,
215 char **papszOptions);
218void CPL_DLL *GDALCreateRPCTransformerV2(const GDALRPCInfoV2 *psRPC,
219 int bReversed,
220 double dfPixErrThreshold,
221 char **papszOptions);
222
223void CPL_DLL GDALDestroyRPCTransformer(void *pTransformArg);
224int CPL_DLL GDALRPCTransform(void *pTransformArg, int bDstToSrc,
225 int nPointCount, double *x, double *y, double *z,
226 int *panSuccess);
227
228/* Geolocation transformer */
229
230void CPL_DLL *GDALCreateGeoLocTransformer(GDALDatasetH hBaseDS,
231 char **papszGeolocationInfo,
232 int bReversed);
233void CPL_DLL GDALDestroyGeoLocTransformer(void *pTransformArg);
234int CPL_DLL GDALGeoLocTransform(void *pTransformArg, int bDstToSrc,
235 int nPointCount, double *x, double *y,
236 double *z, int *panSuccess);
237
238/* Approximate transformer */
239void CPL_DLL *GDALCreateApproxTransformer(GDALTransformerFunc pfnRawTransformer,
240 void *pRawTransformerArg,
241 double dfMaxError);
242void CPL_DLL GDALApproxTransformerOwnsSubtransformer(void *pCBData,
243 int bOwnFlag);
244void CPL_DLL GDALDestroyApproxTransformer(void *pApproxArg);
245int CPL_DLL GDALApproxTransform(void *pTransformArg, int bDstToSrc,
246 int nPointCount, double *x, double *y,
247 double *z, int *panSuccess);
248
249int CPL_DLL CPL_STDCALL GDALSimpleImageWarp(
250 GDALDatasetH hSrcDS, GDALDatasetH hDstDS, int nBandCount, int *panBandList,
251 GDALTransformerFunc pfnTransform, void *pTransformArg,
252 GDALProgressFunc pfnProgress, void *pProgressArg, char **papszWarpOptions);
253
254CPLErr CPL_DLL CPL_STDCALL
256 void *pTransformArg, double *padfGeoTransformOut,
257 int *pnPixels, int *pnLines);
258
260#define GDAL_SWO_ROUND_UP_SIZE 0x1
262#define GDAL_SWO_FORCE_SQUARE_PIXEL 0x2
263
264CPLErr CPL_DLL CPL_STDCALL GDALSuggestedWarpOutput2(
265 GDALDatasetH hSrcDS, GDALTransformerFunc pfnTransformer,
266 void *pTransformArg, double *padfGeoTransformOut, int *pnPixels,
267 int *pnLines, double *padfExtent, int nOptions);
268
270CPLXMLNode CPL_DLL *GDALSerializeTransformer(GDALTransformerFunc pfnFunc,
271 void *pTransformArg);
272CPLErr CPL_DLL GDALDeserializeTransformer(CPLXMLNode *psTree,
273 GDALTransformerFunc *ppfnFunc,
274 void **ppTransformArg);
278 GDALRasterBandH hXBand, GDALRasterBandH hYBand, GDALRasterBandH hZBand,
279 GDALTransformerFunc pfnTransformer, void *pTransformArg,
280 GDALProgressFunc pfnProgress, void *pProgressArg, char **papszOptions);
281
282/* -------------------------------------------------------------------- */
283/* Contour Line Generation */
284/* -------------------------------------------------------------------- */
285
287typedef CPLErr (*GDALContourWriter)(double dfLevel, int nPoints, double *padfX,
288 double *padfY, void *);
289
292
294GDAL_CG_Create(int nWidth, int nHeight, int bNoDataSet, double dfNoDataValue,
295 double dfContourInterval, double dfContourBase,
296 GDALContourWriter pfnWriter, void *pCBData);
298 double *padfScanline);
299void CPL_DLL GDAL_CG_Destroy(GDALContourGeneratorH hCG);
300
302typedef struct
303{
304 void *hLayer;
305
306 double adfGeoTransform[6];
307
308 int nElevField;
309 int nElevFieldMin;
310 int nElevFieldMax;
311 int nIDField;
312 int nNextID;
313} OGRContourWriterInfo;
314
315CPLErr CPL_DLL OGRContourWriter(double, int, double *, double *, void *pInfo);
319 GDALRasterBandH hBand, double dfContourInterval, double dfContourBase,
320 int nFixedLevelCount, double *padfFixedLevels, int bUseNoData,
321 double dfNoDataValue, void *hLayer, int iIDField, int iElevField,
322 GDALProgressFunc pfnProgress, void *pProgressArg);
323
324CPLErr CPL_DLL GDALContourGenerateEx(GDALRasterBandH hBand, void *hLayer,
325 CSLConstList options,
326 GDALProgressFunc pfnProgress,
327 void *pProgressArg);
328
329/* -------------------------------------------------------------------- */
330/* Viewshed Generation */
331/* -------------------------------------------------------------------- */
332
334typedef enum
335{
336 GVM_Diagonal = 1,
337 GVM_Edge = 2,
338 GVM_Max = 3,
339 GVM_Min = 4
341
343typedef enum
344{
345 GVOT_NORMAL = 1,
346 GVOT_MIN_TARGET_HEIGHT_FROM_DEM = 2,
347 GVOT_MIN_TARGET_HEIGHT_FROM_GROUND = 3
349
351 GDALRasterBandH hBand, const char *pszDriverName,
352 const char *pszTargetRasterName, CSLConstList papszCreationOptions,
353 double dfObserverX, double dfObserverY, double dfObserverHeight,
354 double dfTargetHeight, double dfVisibleVal, double dfInvisibleVal,
355 double dfOutOfRangeVal, double dfNoDataVal, double dfCurvCoeff,
356 GDALViewshedMode eMode, double dfMaxDistance, GDALProgressFunc pfnProgress,
357 void *pProgressArg, GDALViewshedOutputType heightMode,
358 CSLConstList papszExtraOptions);
359
360bool CPL_DLL GDALIsLineOfSightVisible(
361 const GDALRasterBandH, const int xA, const int yA, const double zA,
362 const int xB, const int yB, const double zB, int *pnxTerrainIntersection,
363 int *pnyTerrainIntersection, CSLConstList papszOptions);
364
365/************************************************************************/
366/* Rasterizer API - geometries burned into GDAL raster. */
367/************************************************************************/
368
370 GDALDatasetH hDS, int nBandCount, const int *panBandList, int nGeomCount,
371 const OGRGeometryH *pahGeometries, GDALTransformerFunc pfnTransformer,
372 void *pTransformArg, const double *padfGeomBurnValues,
373 CSLConstList papszOptions, GDALProgressFunc pfnProgress,
374 void *pProgressArg);
375
377 GDALDatasetH hDS, int nBandCount, const int *panBandList, int nGeomCount,
378 const OGRGeometryH *pahGeometries, GDALTransformerFunc pfnTransformer,
379 void *pTransformArg, const int64_t *panGeomBurnValues,
380 CSLConstList papszOptions, GDALProgressFunc pfnProgress,
381 void *pProgressArg);
382
384 GDALDatasetH hDS, int nBandCount, int *panBandList, int nLayerCount,
385 OGRLayerH *pahLayers, GDALTransformerFunc pfnTransformer,
386 void *pTransformArg, double *padfLayerBurnValues, char **papszOptions,
387 GDALProgressFunc pfnProgress, void *pProgressArg);
388
390 void *pData, int nBufXSize, int nBufYSize, GDALDataType eBufType,
391 int nPixelSpace, int nLineSpace, int nLayerCount, OGRLayerH *pahLayers,
392 const char *pszDstProjection, double *padfDstGeoTransform,
393 GDALTransformerFunc pfnTransformer, void *pTransformArg, double dfBurnValue,
394 char **papszOptions, GDALProgressFunc pfnProgress, void *pProgressArg);
395
396/************************************************************************/
397/* Gridding interface. */
398/************************************************************************/
399
401typedef enum
419
421typedef struct
422{
427 double dfPower;
435 double dfRadius1;
437 double dfRadius2;
442 double dfAngle;
457
460typedef struct
461{
466 double dfPower;
468 double dfRadius;
471
497
499typedef struct
500{
505 double dfRadius1;
507 double dfRadius2;
512 double dfAngle;
538
540typedef struct
541{
546 double dfRadius1;
548 double dfRadius2;
553 double dfAngle;
557
559typedef struct
560{
565 double dfRadius1;
567 double dfRadius2;
572 double dfAngle;
593
595typedef struct
596{
605 double dfRadius;
609
610CPLErr CPL_DLL GDALGridCreate(GDALGridAlgorithm, const void *, GUInt32,
611 const double *, const double *, const double *,
612 double, double, double, double, GUInt32, GUInt32,
613 GDALDataType, void *, GDALProgressFunc, void *);
614
617
618GDALGridContext CPL_DLL *
619GDALGridContextCreate(GDALGridAlgorithm eAlgorithm, const void *poOptions,
620 GUInt32 nPoints, const double *padfX, const double *padfY,
621 const double *padfZ, int bCallerWillKeepPointArraysAlive);
622
623void CPL_DLL GDALGridContextFree(GDALGridContext *psContext);
624
625CPLErr CPL_DLL GDALGridContextProcess(GDALGridContext *psContext, double dfXMin,
626 double dfXMax, double dfYMin,
627 double dfYMax, GUInt32 nXSize,
628 GUInt32 nYSize, GDALDataType eType,
629 void *pData, GDALProgressFunc pfnProgress,
630 void *pProgressArg);
631
633 GDALDatasetH hSecondImage,
634 char **papszOptions,
635 int *pnGCPCount);
636
637/************************************************************************/
638/* Delaunay triangulation interface. */
639/************************************************************************/
640
642typedef struct
643{
644 int anVertexIdx[3];
645 int anNeighborIdx[3];
647 /* anNeighborIdx[k] is the triangle to the opposite side */
648 /* of the opposite segment of anVertexIdx[k] */
650
658typedef struct
659{
660 double dfMul1X;
661 double dfMul1Y;
662 double dfMul2X;
663 double dfMul2Y;
664 double dfCstX;
665 double dfCstY;
667
669typedef struct
670{
676
677int CPL_DLL GDALHasTriangulation(void);
678
680 const double *padfX,
681 const double *padfY);
683 GDALTriangulation *psDT, const double *padfX, const double *padfY);
685 const GDALTriangulation *psDT, int nFacetIdx, double dfX, double dfY,
686 double *pdfL1, double *pdfL2, double *pdfL3);
688 double dfX, double dfY,
689 int *panOutputFacetIdx);
691 int nFacetIdx, double dfX,
692 double dfY,
693 int *panOutputFacetIdx);
694void CPL_DLL GDALTriangulationFree(GDALTriangulation *psDT);
695
697#ifndef CPL_WARN_DEPRECATED_GDALOpenVerticalShiftGrid
698#define CPL_WARN_DEPRECATED_GDALOpenVerticalShiftGrid CPL_WARN_DEPRECATED
699#endif
702GDALDatasetH CPL_DLL GDALOpenVerticalShiftGrid(const char *pszProj4Geoidgrids,
703 int *pbError)
705 CPL_WARN_DEPRECATED_GDALOpenVerticalShiftGrid(
706 "GDALOpenVerticalShiftGrid() will be removed in GDAL 4.0")
708 ;
709
711#ifndef CPL_WARN_DEPRECATED_GDALApplyVerticalShiftGrid
712#define CPL_WARN_DEPRECATED_GDALApplyVerticalShiftGrid CPL_WARN_DEPRECATED
713#endif
717 GDALDatasetH hGridDataset,
718 int bInverse,
719 double dfSrcUnitToMeter,
720 double dfDstUnitToMeter,
721 const char *const *papszOptions)
723 CPL_WARN_DEPRECATED_GDALApplyVerticalShiftGrid(
724 "GDALApplyVerticalShiftGrid() will be removed in GDAL 4.0")
726 ;
727
729
730#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:299
#define CPL_C_START
Macro to start a block of C symbols.
Definition: cpl_port.h:295
unsigned int GUInt32
Unsigned int32 type.
Definition: cpl_port.h:177
char ** CSLConstList
Type of a constant null-terminated list of nul terminated strings.
Definition: cpl_port.h:1183
unsigned char GByte
Unsigned byte type.
Definition: cpl_port.h:185
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:291
void * GDALRasterBandH
Opaque type used for the C bindings of the C++ GDALRasterBand class.
Definition: gdal.h:294
void * GDALColorTableH
Opaque type used for the C bindings of the C++ GDALColorTable class.
Definition: gdal.h:300
CPLErr GDALContourGenerateEx(GDALRasterBandH hBand, void *hLayer, CSLConstList options, GDALProgressFunc pfnProgress, void *pProgressArg)
Create vector contours from raster DEM.
Definition: contour.cpp:551
void * GDALCreateGeoLocTransformer(GDALDatasetH hBaseDS, char **papszGeolocationInfo, int bReversed)
Create GeoLocation transformer.
Definition: gdalgeoloc.cpp:2045
struct GDALGridContext GDALGridContext
Grid context opaque type.
Definition: gdal_alg.h:616
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:410
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:967
int GDALGenImgProjTransform(void *pTransformArg, int bDstToSrc, int nPointCount, double *x, double *y, double *z, int *panSuccess)
Perform general image reprojection transformation.
Definition: gdaltransformer.cpp:2846
GDALTriangulation * GDALTriangulationCreateDelaunay(int nPoints, const double *padfX, const double *padfY)
Computes a Delaunay triangulation of the passed points.
Definition: delaunay.c:123
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:781
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:349
void * GDALCreateReprojectionTransformer(const char *pszSrcWKT, const char *pszDstWKT)
Create reprojection transformer.
Definition: gdaltransformer.cpp:3313
void * GDALCreateReprojectionTransformerEx(OGRSpatialReferenceH hSrcSRS, OGRSpatialReferenceH hDstSRS, const char *const *papszOptions)
Create reprojection transformer.
Definition: gdaltransformer.cpp:3382
void GDALSetGenImgProjTransformerDstGeoTransform(void *, const double *)
Set GenImgProj output geotransform.
Definition: gdaltransformer.cpp:2777
void GDALDestroyGeoLocTransformer(void *pTransformArg)
Destroy GeoLocation transformer.
Definition: gdalgeoloc.cpp:2058
void GDALGridContextFree(GDALGridContext *psContext)
Free a context used created by GDALGridContextCreate()
Definition: gdalgrid.cpp:3366
void GDALTriangulationFree(GDALTriangulation *psDT)
Free a triangulation.
Definition: delaunay.c:285
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:1413
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:3655
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:944
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:152
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:393
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:195
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:356
bool GDALIsLineOfSightVisible(const GDALRasterBandH, const int xA, const int yA, const double zA, const int xB, const int yB, const double zB, int *pnxTerrainIntersection, int *pnyTerrainIntersection, CSLConstList papszOptions)
Check Line of Sight between two points.
Definition: los.cpp:195
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:502
GDALViewshedMode
Viewshed Modes.
Definition: gdal_alg.h:335
void GDALDestroyGCPTransformer(void *pTransformArg)
Destroy GCP transformer.
Definition: gdal_crs.cpp:373
GDALGridAlgorithm
Gridding Algorithms.
Definition: gdal_alg.h:402
@ GGA_MetricMinimum
Definition: gdal_alg.h:406
@ GGA_InverseDistanceToAPowerNearestNeighbor
Definition: gdal_alg.h:417
@ GGA_InverseDistanceToAPower
Definition: gdal_alg.h:403
@ GGA_MetricAverageDistancePts
Definition: gdal_alg.h:412
@ GGA_MetricMaximum
Definition: gdal_alg.h:407
@ GGA_NearestNeighbor
Definition: gdal_alg.h:405
@ GGA_MetricAverageDistance
Definition: gdal_alg.h:410
@ GGA_MovingAverage
Definition: gdal_alg.h:404
@ GGA_MetricCount
Definition: gdal_alg.h:409
@ GGA_MetricRange
Definition: gdal_alg.h:408
@ GGA_Linear
Definition: gdal_alg.h:414
void GDALDestroyGenImgProjTransformer(void *)
GenImgProjTransformer deallocator.
Definition: gdaltransformer.cpp:2808
int GDALRPCTransform(void *pTransformArg, int bDstToSrc, int nPointCount, double *x, double *y, double *z, int *panSuccess)
RPC transform.
Definition: gdal_rpc.cpp:2040
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:145
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:438
GDALDatasetH GDALOpenVerticalShiftGrid(const char *pszProj4Geoidgrids, int *pbError)
Load proj.4 geoidgrids as GDAL dataset.
Definition: gdalapplyverticalshiftgrid.cpp:578
void GDAL_CG_Destroy(GDALContourGeneratorH hCG)
Destroy contour generator.
Definition: contour.cpp:813
void GDALApproxTransformerOwnsSubtransformer(void *pCBData, int bOwnFlag)
Set bOwnSubtransformer flag.
Definition: gdaltransformer.cpp:3874
int GDALApproxTransform(void *pTransformArg, int bDstToSrc, int nPointCount, double *x, double *y, double *z, int *panSuccess)
Perform approximate transformation.
Definition: gdaltransformer.cpp:4189
void * GDALCreateGenImgProjTransformer4(OGRSpatialReferenceH hSrcSRS, const double *padfSrcGeoTransform, OGRSpatialReferenceH hDstSRS, const double *padfDstGeoTransform, const char *const *papszOptions)
Create image to image transformer.
Definition: gdaltransformer.cpp:2669
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:578
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:3420
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:2763
CPLErr GDALSuggestedWarpOutput(GDALDatasetH hSrcDS, GDALTransformerFunc pfnTransformer, void *pTransformArg, double *padfGeoTransformOut, int *pnPixels, int *pnLines)
Suggest output file size.
Definition: gdaltransformer.cpp:188
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:110
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:65
void GDALGetTransformerDstGeoTransform(void *, double *)
Get ApproxTransformer or GenImgProj output geotransform.
Definition: gdaltransformer.cpp:4829
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:212
CPLErr GDAL_CG_FeedLine(GDALContourGeneratorH hCG, double *padfScanline)
Feed a line to the contour generator.
Definition: contour.cpp:800
int GDALTriangulationComputeBarycentricCoefficients(GDALTriangulation *psDT, const double *padfX, const double *padfY)
Computes barycentric coefficients for each triangles of the triangulation.
Definition: delaunay.c:311
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:412
void * GDALCreateRPCTransformerV2(const GDALRPCInfoV2 *psRPC, int bReversed, double dfPixErrThreshold, char **papszOptions)
Create an RPC based transformer.
Definition: gdal_rpc.cpp:813
GDALViewshedOutputType
Viewshed output types.
Definition: gdal_alg.h:344
void GDALDestroyApproxTransformer(void *pApproxArg)
Cleanup approximate transformer.
Definition: gdaltransformer.cpp:3895
void * GDALCreateGenImgProjTransformer3(const char *pszSrcWKT, const double *padfSrcGeoTransform, const char *pszDstWKT, const double *padfDstGeoTransform)
Create image to image transformer.
Definition: gdaltransformer.cpp:2620
CPLErr GDALSuggestedWarpOutput2(GDALDatasetH hSrcDS, GDALTransformerFunc pfnTransformer, void *pTransformArg, double *padfGeoTransformOut, int *pnPixels, int *pnLines, double *padfExtent, int nOptions)
Suggest output file size.
Definition: gdaltransformer.cpp:363
int GDALHasTriangulation(void)
Returns if GDAL is built with Delaunay triangulation support.
Definition: delaunay.c:100
CPLErr(* GDALContourWriter)(double dfLevel, int nPoints, double *padfX, double *padfY, void *)
Contour writer callback type.
Definition: gdal_alg.h:287
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:1829
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:346
int GDALChecksumImage(GDALRasterBandH hBand, int nXOff, int nYOff, int nXSize, int nYSize)
Compute checksum for image region.
Definition: gdalchecksum.cpp:64
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:4804
void * GDALContourGeneratorH
Contour generator opaque type.
Definition: gdal_alg.h:291
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:323
void GDALDestroyRPCTransformer(void *pTransformArg)
Destroy RPC tranformer.
Definition: gdal_rpc.cpp:1095
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:1452
void * GDALCreateGenImgProjTransformer2(GDALDatasetH hSrcDS, GDALDatasetH hDstDS, char **papszOptions)
Create image to image transformer.
Definition: gdaltransformer.cpp:1917
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:230
void GDALDestroyReprojectionTransformer(void *)
Destroy reprojection transformation.
Definition: gdaltransformer.cpp:3478
void * GDALCreateGCPTransformer(int nGCPCount, const GDAL_GCP *pasGCPList, int nReqOrder, int bReversed)
Create GCP based polynomial transformer.
Definition: gdal_crs.cpp:338
int GDALReprojectionTransform(void *pTransformArg, int bDstToSrc, int nPointCount, double *x, double *y, double *z, int *panSuccess)
Perform reprojection transformation.
Definition: gdaltransformer.cpp:3511
void * GDALCreateApproxTransformer(GDALTransformerFunc pfnRawTransformer, void *pRawTransformerArg, double dfMaxError)
Create an approximating transformer.
Definition: gdaltransformer.cpp:3836
int GDALGeoLocTransform(void *pTransformArg, int bDstToSrc, int nPointCount, double *x, double *y, double *z, int *panSuccess)
Use GeoLocation transformer.
Definition: gdalgeoloc.cpp:2091
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:533
void * GDALCreateTPSTransformer(int nGCPCount, const GDAL_GCP *pasGCPList, int bReversed)
Create Thin Plate Spline transformer from GCPs.
Definition: gdal_tps.cpp:139
void GDALDestroyTPSTransformer(void *pTransformArg)
Destroy TPS transformer.
Definition: gdal_tps.cpp:304
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:688
Document node structure.
Definition: cpl_minixml.h:71
Data metrics method control options.
Definition: gdal_alg.h:560
double dfRadius2
Definition: gdal_alg.h:567
double dfAngle
Definition: gdal_alg.h:572
double dfNoDataValue
Definition: gdal_alg.h:580
double dfRadius1
Definition: gdal_alg.h:565
size_t nSizeOfStructure
Definition: gdal_alg.h:563
GUInt32 nMinPointsPerQuadrant
Definition: gdal_alg.h:591
GUInt32 nMinPoints
Definition: gdal_alg.h:578
GUInt32 nMaxPointsPerQuadrant
Definition: gdal_alg.h:585
Inverse distance to a power, with nearest neighbour search, control options.
Definition: gdal_alg.h:461
GUInt32 nMinPoints
Definition: gdal_alg.h:482
double dfNoDataValue
Definition: gdal_alg.h:484
GUInt32 nMaxPoints
Definition: gdal_alg.h:476
double dfSmoothing
Definition: gdal_alg.h:470
size_t nSizeOfStructure
Definition: gdal_alg.h:464
GUInt32 nMinPointsPerQuadrant
Definition: gdal_alg.h:495
GUInt32 nMaxPointsPerQuadrant
Definition: gdal_alg.h:489
Inverse distance to a power method control options.
Definition: gdal_alg.h:422
GUInt32 nMinPoints
Definition: gdal_alg.h:453
double dfPower
Definition: gdal_alg.h:427
double dfRadius2
Definition: gdal_alg.h:437
double dfNoDataValue
Definition: gdal_alg.h:455
double dfSmoothing
Definition: gdal_alg.h:429
double dfAngle
Definition: gdal_alg.h:442
double dfRadius1
Definition: gdal_alg.h:435
GUInt32 nMaxPoints
Definition: gdal_alg.h:447
size_t nSizeOfStructure
Definition: gdal_alg.h:425
double dfAnisotropyRatio
Definition: gdal_alg.h:431
double dfAnisotropyAngle
Definition: gdal_alg.h:433
Linear method control options.
Definition: gdal_alg.h:596
size_t nSizeOfStructure
Definition: gdal_alg.h:599
double dfNoDataValue
Definition: gdal_alg.h:607
double dfRadius
Definition: gdal_alg.h:605
Moving average method control options.
Definition: gdal_alg.h:500
GUInt32 nMaxPoints
Definition: gdal_alg.h:517
double dfRadius1
Definition: gdal_alg.h:505
double dfNoDataValue
Definition: gdal_alg.h:525
double dfAngle
Definition: gdal_alg.h:512
GUInt32 nMinPoints
Definition: gdal_alg.h:523
double dfRadius2
Definition: gdal_alg.h:507
GUInt32 nMinPointsPerQuadrant
Definition: gdal_alg.h:536
size_t nSizeOfStructure
Definition: gdal_alg.h:503
GUInt32 nMaxPointsPerQuadrant
Definition: gdal_alg.h:530
Nearest neighbor method control options.
Definition: gdal_alg.h:541
double dfNoDataValue
Definition: gdal_alg.h:555
size_t nSizeOfStructure
Definition: gdal_alg.h:544
double dfRadius2
Definition: gdal_alg.h:548
double dfAngle
Definition: gdal_alg.h:553
double dfRadius1
Definition: gdal_alg.h:546
Structure to store Rational Polynomial Coefficients / Rigorous Projection Model.
Definition: gdal.h:1917
Triangle barycentric coefficients.
Definition: gdal_alg.h:659
double dfCstY
dfCstY
Definition: gdal_alg.h:665
double dfCstX
dfCstX
Definition: gdal_alg.h:664
double dfMul2Y
dfMul2Y
Definition: gdal_alg.h:663
double dfMul1Y
dfMul1Y
Definition: gdal_alg.h:661
double dfMul2X
dfMul2X
Definition: gdal_alg.h:662
double dfMul1X
dfMul1X
Definition: gdal_alg.h:660
Triangle fact.
Definition: gdal_alg.h:643
Triangulation structure.
Definition: gdal_alg.h:670
GDALTriBarycentricCoefficients * pasFacetCoefficients
arra of nFacets barycentric coefficients
Definition: gdal_alg.h:674
int nFacets
number of facets
Definition: gdal_alg.h:671
GDALTriFacet * pasFacets
array of nFacets facets
Definition: gdal_alg.h:672
Ground Control Point.
Definition: gdal.h:1077