GDAL

- Main Page
- Related Pages
- Classes
- Files
- Download
- Issue Tracker

- File List
- File Members

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 mines-paris dot org>
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 #endif
45
46 CPL_C_START
47
48 int CPL_DLL CPL_STDCALL GDALComputeMedianCutPCT( GDALRasterBandH hRed,
49 GDALRasterBandH hGreen,
50 GDALRasterBandH hBlue,
51 int (*pfnIncludePixel)(int,int,void*),
52 int nColors,
53 GDALColorTableH hColorTable,
54 GDALProgressFunc pfnProgress,
55 void * pProgressArg );
56
57 int CPL_DLL CPL_STDCALL GDALDitherRGB2PCT( GDALRasterBandH hRed,
58 GDALRasterBandH hGreen,
59 GDALRasterBandH hBlue,
60 GDALRasterBandH hTarget,
61 GDALColorTableH hColorTable,
62 GDALProgressFunc pfnProgress,
63 void * pProgressArg );
64
65 int CPL_DLL CPL_STDCALL GDALChecksumImage( GDALRasterBandH hBand,
66 int nXOff, int nYOff, int nXSize, int nYSize );
67
68 CPLErr CPL_DLL CPL_STDCALL
69 GDALComputeProximity( GDALRasterBandH hSrcBand,
70 GDALRasterBandH hProximityBand,
71 char **papszOptions,
72 GDALProgressFunc pfnProgress,
73 void * pProgressArg );
74
75 CPLErr CPL_DLL CPL_STDCALL
76 GDALFillNodata( GDALRasterBandH hTargetBand,
77 GDALRasterBandH hMaskBand,
78 double dfMaxSearchDist,
79 int bDeprecatedOption,
80 int nSmoothingIterations,
81 char **papszOptions,
82 GDALProgressFunc pfnProgress,
83 void * pProgressArg );
84
85 CPLErr CPL_DLL CPL_STDCALL
86 GDALPolygonize( GDALRasterBandH hSrcBand,
87 GDALRasterBandH hMaskBand,
88 OGRLayerH hOutLayer, int iPixValField,
89 char **papszOptions,
90 GDALProgressFunc pfnProgress,
91 void * pProgressArg );
92
93 CPLErr CPL_DLL CPL_STDCALL
94 GDALFPolygonize( GDALRasterBandH hSrcBand,
95 GDALRasterBandH hMaskBand,
96 OGRLayerH hOutLayer, int iPixValField,
97 char **papszOptions,
98 GDALProgressFunc pfnProgress,
99 void * pProgressArg );
100
101 CPLErr CPL_DLL CPL_STDCALL
102 GDALSieveFilter( GDALRasterBandH hSrcBand, GDALRasterBandH hMaskBand,
103 GDALRasterBandH hDstBand,
104 int nSizeThreshold, int nConnectedness,
105 char **papszOptions,
106 GDALProgressFunc pfnProgress,
107 void * pProgressArg );
108
109 /*
110 * Warp Related.
111 */
112
113 typedef int
114 (*GDALTransformerFunc)( void *pTransformerArg,
115 int bDstToSrc, int nPointCount,
116 double *x, double *y, double *z, int *panSuccess );
117
119 #define GDAL_GTI2_SIGNATURE "GTI2"
120
121 typedef struct {
122 GByte abySignature[4];
123 const char *pszClassName;
124 GDALTransformerFunc pfnTransform;
125 void (*pfnCleanup)( void * pTransformerArg );
126 CPLXMLNode *(*pfnSerialize)( void * pTransformerArg );
127 void* (*pfnCreateSimilar)( void* pTransformerArg, double dfSrcRatioX, double dfSrcRatioY );
128 } GDALTransformerInfo;
132 void CPL_DLL GDALDestroyTransformer( void *pTransformerArg );
133 int CPL_DLL GDALUseTransformer( void *pTransformerArg,
134 int bDstToSrc, int nPointCount,
135 double *x, double *y, double *z,
136 int *panSuccess );
137 void* GDALCreateSimilarTransformer( void* psTransformerArg, double dfSrcRatioX, double dfSrcRatioY );
140 /* High level transformer for going from image coordinates on one file
141 to image coordinates on another, potentially doing reprojection,
142 utilizing GCPs or using the geotransform. */
143
144 void CPL_DLL *
145 GDALCreateGenImgProjTransformer( GDALDatasetH hSrcDS, const char *pszSrcWKT,
146 GDALDatasetH hDstDS, const char *pszDstWKT,
147 int bGCPUseOK, double dfGCPErrorThreshold,
148 int nOrder );
149 void CPL_DLL *
150 GDALCreateGenImgProjTransformer2( GDALDatasetH hSrcDS, GDALDatasetH hDstDS,
151 char **papszOptions );
152 void CPL_DLL *
153 GDALCreateGenImgProjTransformer3( const char *pszSrcWKT,
154 const double *padfSrcGeoTransform,
155 const char *pszDstWKT,
156 const double *padfDstGeoTransform );
157 void CPL_DLL GDALSetGenImgProjTransformerDstGeoTransform( void *,
158 const double * );
159 void CPL_DLL GDALDestroyGenImgProjTransformer( void * );
160 int CPL_DLL GDALGenImgProjTransform(
161 void *pTransformArg, int bDstToSrc, int nPointCount,
162 double *x, double *y, double *z, int *panSuccess );
163
164 void GDALSetTransformerDstGeoTransform( void *, const double * );
165 void GDALGetTransformerDstGeoTransform( void*, double* );
166
167 /* Geo to geo reprojection transformer. */
168 void CPL_DLL *
169 GDALCreateReprojectionTransformer( const char *pszSrcWKT,
170 const char *pszDstWKT );
171 void CPL_DLL GDALDestroyReprojectionTransformer( void * );
172 int CPL_DLL GDALReprojectionTransform(
173 void *pTransformArg, int bDstToSrc, int nPointCount,
174 double *x, double *y, double *z, int *panSuccess );
175
176 /* GCP based transformer ... forward is to georef coordinates */
177 void CPL_DLL *
178 GDALCreateGCPTransformer( int nGCPCount, const GDAL_GCP *pasGCPList,
179 int nReqOrder, int bReversed );
180
181 /* GCP based transformer with refinement of the GCPs ... forward is to georef coordinates */
182 void CPL_DLL *
183 GDALCreateGCPRefineTransformer( int nGCPCount, const GDAL_GCP *pasGCPList,
184 int nReqOrder, int bReversed, double tolerance, int minimumGcps);
185
186 void CPL_DLL GDALDestroyGCPTransformer( void *pTransformArg );
187 int CPL_DLL GDALGCPTransform(
188 void *pTransformArg, int bDstToSrc, int nPointCount,
189 double *x, double *y, double *z, int *panSuccess );
190
191 /* Thin Plate Spine transformer ... forward is to georef coordinates */
192
193 void CPL_DLL *
194 GDALCreateTPSTransformer( int nGCPCount, const GDAL_GCP *pasGCPList,
195 int bReversed );
196 void CPL_DLL GDALDestroyTPSTransformer( void *pTransformArg );
197 int CPL_DLL GDALTPSTransform(
198 void *pTransformArg, int bDstToSrc, int nPointCount,
199 double *x, double *y, double *z, int *panSuccess );
200
202 char CPL_DLL ** RPCInfoToMD( GDALRPCInfo *psRPCInfo );
205 /* RPC based transformer ... src is pixel/line/elev, dst is long/lat/elev */
206
207 void CPL_DLL *
208 GDALCreateRPCTransformer( GDALRPCInfo *psRPC, int bReversed,
209 double dfPixErrThreshold,
210 char **papszOptions );
211 void CPL_DLL GDALDestroyRPCTransformer( void *pTransformArg );
212 int CPL_DLL GDALRPCTransform(
213 void *pTransformArg, int bDstToSrc, int nPointCount,
214 double *x, double *y, double *z, int *panSuccess );
215
216 /* Geolocation transformer */
217
218 void CPL_DLL *
219 GDALCreateGeoLocTransformer( GDALDatasetH hBaseDS,
220 char **papszGeolocationInfo,
221 int bReversed );
222 void CPL_DLL GDALDestroyGeoLocTransformer( void *pTransformArg );
223 int CPL_DLL GDALGeoLocTransform(
224 void *pTransformArg, int bDstToSrc, int nPointCount,
225 double *x, double *y, double *z, int *panSuccess );
226
227 /* Approximate transformer */
228 void CPL_DLL *
229 GDALCreateApproxTransformer( GDALTransformerFunc pfnRawTransformer,
230 void *pRawTransformerArg, double dfMaxError );
231 void CPL_DLL GDALApproxTransformerOwnsSubtransformer( void *pCBData,
232 int bOwnFlag );
233 void CPL_DLL GDALDestroyApproxTransformer( void *pApproxArg );
234 int CPL_DLL GDALApproxTransform(
235 void *pTransformArg, int bDstToSrc, int nPointCount,
236 double *x, double *y, double *z, int *panSuccess );
237
238 int CPL_DLL CPL_STDCALL
239 GDALSimpleImageWarp( GDALDatasetH hSrcDS,
240 GDALDatasetH hDstDS,
241 int nBandCount, int *panBandList,
242 GDALTransformerFunc pfnTransform,
243 void *pTransformArg,
244 GDALProgressFunc pfnProgress,
245 void *pProgressArg,
246 char **papszWarpOptions );
247
248 CPLErr CPL_DLL CPL_STDCALL
249 GDALSuggestedWarpOutput( GDALDatasetH hSrcDS,
250 GDALTransformerFunc pfnTransformer,
251 void *pTransformArg,
252 double *padfGeoTransformOut,
253 int *pnPixels, int *pnLines );
254 CPLErr CPL_DLL CPL_STDCALL
255 GDALSuggestedWarpOutput2( GDALDatasetH hSrcDS,
256 GDALTransformerFunc pfnTransformer,
257 void *pTransformArg,
258 double *padfGeoTransformOut,
259 int *pnPixels, int *pnLines,
260 double *padfExtents,
261 int nOptions );
262
264 CPLXMLNode CPL_DLL *
265 GDALSerializeTransformer( GDALTransformerFunc pfnFunc, void *pTransformArg );
266 CPLErr CPL_DLL GDALDeserializeTransformer( CPLXMLNode *psTree,
267 GDALTransformerFunc *ppfnFunc,
268 void **ppTransformArg );
271 CPLErr CPL_DLL
272 GDALTransformGeolocations( GDALRasterBandH hXBand,
273 GDALRasterBandH hYBand,
274 GDALRasterBandH hZBand,
275 GDALTransformerFunc pfnTransformer,
276 void *pTransformArg,
277 GDALProgressFunc pfnProgress,
278 void *pProgressArg,
279 char **papszOptions );
280
281 /* -------------------------------------------------------------------- */
282 /* Contour Line Generation */
283 /* -------------------------------------------------------------------- */
284
286 typedef CPLErr (*GDALContourWriter)( double dfLevel, int nPoints,
287 double *padfX, double *padfY, void * );
288
290 typedef void *GDALContourGeneratorH;
291
292 GDALContourGeneratorH CPL_DLL
293 GDAL_CG_Create( int nWidth, int nHeight,
294 int bNoDataSet, double dfNoDataValue,
295 double dfContourInterval, double dfContourBase,
296 GDALContourWriter pfnWriter, void *pCBData );
297 CPLErr CPL_DLL GDAL_CG_FeedLine( GDALContourGeneratorH hCG,
298 double *padfScanline );
299 void CPL_DLL GDAL_CG_Destroy( GDALContourGeneratorH hCG );
300
302 typedef 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
315 CPLErr CPL_DLL
316 OGRContourWriter( double, int, double *, double *, void *pInfo );
319 CPLErr CPL_DLL
320 GDALContourGenerate( GDALRasterBandH hBand,
321 double dfContourInterval, double dfContourBase,
322 int nFixedLevelCount, double *padfFixedLevels,
323 int bUseNoData, double dfNoDataValue,
324 void *hLayer, int iIDField, int iElevField,
325 GDALProgressFunc pfnProgress, void *pProgressArg );
326
327 CPLErr CPL_DLL
328 GDALContourGenerateEx( GDALRasterBandH hBand, void *hLayer,
329 CSLConstList options,
330 GDALProgressFunc pfnProgress, void *pProgressArg );
331
332 /************************************************************************/
333 /* Rasterizer API - geometries burned into GDAL raster. */
334 /************************************************************************/
335
336 CPLErr CPL_DLL
337 GDALRasterizeGeometries( GDALDatasetH hDS,
338 int nBandCount, int *panBandList,
339 int nGeomCount, OGRGeometryH *pahGeometries,
340 GDALTransformerFunc pfnTransformer,
341 void *pTransformArg,
342 double *padfGeomBurnValue,
343 char **papszOptions,
344 GDALProgressFunc pfnProgress,
345 void * pProgressArg );
346 CPLErr CPL_DLL
347 GDALRasterizeLayers( GDALDatasetH hDS,
348 int nBandCount, int *panBandList,
349 int nLayerCount, OGRLayerH *pahLayers,
350 GDALTransformerFunc pfnTransformer,
351 void *pTransformArg,
352 double *padfLayerBurnValues,
353 char **papszOptions,
354 GDALProgressFunc pfnProgress,
355 void *pProgressArg );
356
357 CPLErr CPL_DLL
358 GDALRasterizeLayersBuf( void *pData, int nBufXSize, int nBufYSize,
359 GDALDataType eBufType, int nPixelSpace, int nLineSpace,
360 int nLayerCount, OGRLayerH *pahLayers,
361 const char *pszDstProjection,
362 double *padfDstGeoTransform,
363 GDALTransformerFunc pfnTransformer,
364 void *pTransformArg, double dfBurnValue,
365 char **papszOptions, GDALProgressFunc pfnProgress,
366 void *pProgressArg );
367
368 /************************************************************************/
369 /* Gridding interface. */
370 /************************************************************************/
371
373 typedef enum { GGA_InverseDistanceToAPower = 1, GGA_MovingAverage = 2, GGA_NearestNeighbor = 3, GGA_MetricMinimum = 4, GGA_MetricMaximum = 5, GGA_MetricRange = 6, GGA_MetricCount = 7, GGA_MetricAverageDistance = 8,
383 GGA_MetricAverageDistancePts = 9,
385 GGA_Linear = 10,
387 GGA_InverseDistanceToAPowerNearestNeighbor = 11
388 } GDALGridAlgorithm;
389
391 typedef struct
392 {
394 double dfPower;
396 double dfSmoothing;
398 double dfAnisotropyRatio;
400 double dfAnisotropyAngle;
402 double dfRadius1;
404 double dfRadius2;
409 double dfAngle;
416 GUInt32 nMaxPoints;
422 GUInt32 nMinPoints;
424 double dfNoDataValue;
425 } GDALGridInverseDistanceToAPowerOptions;
426
428 typedef struct
429 {
431 double dfPower;
433 double dfRadius;
435 double dfSmoothing;
436
443 GUInt32 nMaxPoints;
449 GUInt32 nMinPoints;
451 double dfNoDataValue;
452 } GDALGridInverseDistanceToAPowerNearestNeighborOptions;
453
455 typedef struct
456 {
458 double dfRadius1;
460 double dfRadius2;
465 double dfAngle;
471 GUInt32 nMinPoints;
473 double dfNoDataValue;
474 } GDALGridMovingAverageOptions;
475
477 typedef struct
478 {
480 double dfRadius1;
482 double dfRadius2;
487 double dfAngle;
489 double dfNoDataValue;
490 } GDALGridNearestNeighborOptions;
491
493 typedef struct
494 {
496 double dfRadius1;
498 double dfRadius2;
503 double dfAngle;
509 GUInt32 nMinPoints;
511 double dfNoDataValue;
512 } GDALGridDataMetricsOptions;
513
515 typedef struct
516 {
522 double dfRadius;
524 double dfNoDataValue;
525 } GDALGridLinearOptions;
526
527 CPLErr CPL_DLL
528 GDALGridCreate( GDALGridAlgorithm, const void *, GUInt32,
529 const double *, const double *, const double *,
530 double, double, double, double,
531 GUInt32, GUInt32, GDALDataType, void *,
532 GDALProgressFunc, void *);
533
535 typedef struct GDALGridContext GDALGridContext;
536
537 GDALGridContext CPL_DLL*
538 GDALGridContextCreate( GDALGridAlgorithm eAlgorithm, const void *poOptions,
539 GUInt32 nPoints,
540 const double *padfX, const double *padfY, const double *padfZ,
541 int bCallerWillKeepPointArraysAlive );
542
543 void CPL_DLL GDALGridContextFree(GDALGridContext* psContext);
544
545 CPLErr CPL_DLL GDALGridContextProcess(GDALGridContext* psContext,
546 double dfXMin, double dfXMax, double dfYMin, double dfYMax,
547 GUInt32 nXSize, GUInt32 nYSize, GDALDataType eType, void *pData,
548 GDALProgressFunc pfnProgress, void *pProgressArg );
549
550 GDAL_GCP CPL_DLL *
551 GDALComputeMatchingPoints( GDALDatasetH hFirstImage,
552 GDALDatasetH hSecondImage,
553 char **papszOptions,
554 int *pnGCPCount );
555
556 /************************************************************************/
557 /* Delaunay triangulation interface. */
558 /************************************************************************/
559
561 typedef struct
562 {
563 int anVertexIdx[3];
564 int anNeighborIdx[3];
565 /* anNeighborIdx[k] is the triangle to the opposite side */
566 /* of the opposite segment of anVertexIdx[k] */
567 } GDALTriFacet;
568
576 typedef struct
577 {
578 double dfMul1X;
579 double dfMul1Y;
580 double dfMul2X;
581 double dfMul2Y;
582 double dfCstX;
583 double dfCstY;
584 } GDALTriBarycentricCoefficients;
585
587 typedef struct
588 {
589 int nFacets;
590 GDALTriFacet *pasFacets;
591 GDALTriBarycentricCoefficients *pasFacetCoefficients;
592 } GDALTriangulation;
593
594 int CPL_DLL GDALHasTriangulation(void);
595
596 GDALTriangulation CPL_DLL *GDALTriangulationCreateDelaunay(int nPoints,
597 const double* padfX,
598 const double* padfY);
599 int CPL_DLL GDALTriangulationComputeBarycentricCoefficients(
600 GDALTriangulation* psDT,
601 const double* padfX,
602 const double* padfY);
603 int CPL_DLL GDALTriangulationComputeBarycentricCoordinates(
604 const GDALTriangulation* psDT,
605 int nFacetIdx,
606 double dfX,
607 double dfY,
608 double* pdfL1,
609 double* pdfL2,
610 double* pdfL3);
611 int CPL_DLL GDALTriangulationFindFacetBruteForce( const GDALTriangulation* psDT,
612 double dfX,
613 double dfY,
614 int* panOutputFacetIdx );
615 int CPL_DLL GDALTriangulationFindFacetDirected( const GDALTriangulation* psDT,
616 int nFacetIdx,
617 double dfX,
618 double dfY,
619 int* panOutputFacetIdx );
620 void CPL_DLL GDALTriangulationFree(GDALTriangulation* psDT);
621
623 // GDAL internal use only
624 void GDALTriangulationTerminate(void);
627 GDALDatasetH CPL_DLL GDALOpenVerticalShiftGrid(
628 const char* pszProj4Geoidgrids,
629 int* pbError );
630
631 GDALDatasetH CPL_DLL GDALApplyVerticalShiftGrid( GDALDatasetH hSrcDataset,
632 GDALDatasetH hGridDataset,
633 int bInverse,
634 double dfSrcUnitToMeter,
635 double dfDstUnitToMeter,
636 const char* const* papszOptions );
637
638 CPL_C_END
639
640 #endif /* ndef GDAL_ALG_H_INCLUDED */
GDALGridDataMetricsOptions::dfAngle
double dfAngle
Definition: gdal_alg.h:503
GDALGridInverseDistanceToAPowerNearestNeighborOptions::dfRadius
double dfRadius
Definition: gdal_alg.h:433
OGRLayerH
void * OGRLayerH
Opaque type for a layer (OGRLayer)
Definition: ogr_api.h:508
GGA_MetricCount
Definition: gdal_alg.h:380
GDALSuggestedWarpOutput
CPLErr GDALSuggestedWarpOutput(GDALDatasetH hSrcDS, GDALTransformerFunc pfnTransformer, void *pTransformArg, double *padfGeoTransformOut, int *pnPixels, int *pnLines)
Suggest output file size.
Definition: gdaltransformer.cpp:177
GDALGenImgProjTransform
int GDALGenImgProjTransform(void *pTransformArg, int bDstToSrc, int nPointCount, double *x, double *y, double *z, int *panSuccess)
Perform general image reprojection transformation.
Definition: gdaltransformer.cpp:1966
GDALDestroyReprojectionTransformer
void GDALDestroyReprojectionTransformer(void *)
Destroy reprojection transformation.
Definition: gdaltransformer.cpp:2450
GDALDataType
GDALDataType
Definition: gdal.h:60
CPLXMLNode
Document node structure.
Definition: cpl_minixml.h:66
GDALGridInverseDistanceToAPowerNearestNeighborOptions::dfNoDataValue
double dfNoDataValue
Definition: gdal_alg.h:451
cpl_minixml.h
Definitions for CPL mini XML Parser/Serializer.
GDALGeoLocTransform
int GDALGeoLocTransform(void *pTransformArg, int bDstToSrc, int nPointCount, double *x, double *y, double *z, int *panSuccess)
Use GeoLocation transformer.
Definition: gdalgeoloc.cpp:850
GDALRasterizeGeometries
CPLErr GDALRasterizeGeometries(GDALDatasetH hDS, int nBandCount, int *panBandList, int nGeomCount, OGRGeometryH *pahGeometries, GDALTransformerFunc pfnTransformer, void *pTransformArg, double *padfGeomBurnValue, char **papszOptions, GDALProgressFunc pfnProgress, void *pProgressArg)
Burn geometries into raster.
Definition: gdalrasterize.cpp:630
GDALGridDataMetricsOptions
Data metrics method control options.
Definition: gdal_alg.h:493
GDALSuggestedWarpOutput2
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:354
GDALGridContextCreate
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:1733
CPL_C_START
#define CPL_C_START
Macro to start a block of C symbols.
Definition: cpl_port.h:337
GDALGridCreate
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:2422
GDALGridMovingAverageOptions::nMinPoints
GUInt32 nMinPoints
Definition: gdal_alg.h:471
GDALTriBarycentricCoefficients::dfCstY
double dfCstY
dfCstY
Definition: gdal_alg.h:583
GDALDestroyApproxTransformer
void GDALDestroyApproxTransformer(void *pApproxArg)
Cleanup approximate transformer.
Definition: gdaltransformer.cpp:2788
GGA_InverseDistanceToAPower
Definition: gdal_alg.h:374
GDALGridNearestNeighborOptions::dfNoDataValue
double dfNoDataValue
Definition: gdal_alg.h:489
GDALRasterizeLayersBuf
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:1448
GDALContourWriter
CPLErr(* GDALContourWriter)(double dfLevel, int nPoints, double *padfX, double *padfY, void *)
Contour writer callback type.
Definition: gdal_alg.h:286
GDALTransformGeolocations
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:68
GDALGridInverseDistanceToAPowerNearestNeighborOptions
Inverse distance to a power, with nearest neighbour search, control options.
Definition: gdal_alg.h:428
GDALGridNearestNeighborOptions::dfRadius1
double dfRadius1
Definition: gdal_alg.h:480
GDALDitherRGB2PCT
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:141
GUInt32
unsigned int GUInt32
Unsigned int32 type.
Definition: cpl_port.h:207
GDALGridAlgorithm
GDALGridAlgorithm
Gridding Algorithms.
Definition: gdal_alg.h:373
GDALFPolygonize
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:904
GDALTriBarycentricCoefficients::dfCstX
double dfCstX
dfCstX
Definition: gdal_alg.h:582
GDALGridDataMetricsOptions::nMinPoints
GUInt32 nMinPoints
Definition: gdal_alg.h:509
GGA_MetricRange
Definition: gdal_alg.h:379
GDALDatasetH
void * GDALDatasetH
Opaque type used for the C bindings of the C++ GDALDataset class.
Definition: gdal.h:255
GDALGridInverseDistanceToAPowerOptions::dfAngle
double dfAngle
Definition: gdal_alg.h:409
GDALSetTransformerDstGeoTransform
void GDALSetTransformerDstGeoTransform(void *, const double *)
Set ApproxTransformer or GenImgProj output geotransform.
Definition: gdaltransformer.cpp:3726
GByte
unsigned char GByte
Unsigned byte type.
Definition: cpl_port.h:215
GDALTriBarycentricCoefficients::dfMul2Y
double dfMul2Y
dfMul2Y
Definition: gdal_alg.h:581
GDALRPCInfo
Structure to store Rational Polynomial Coefficients / Rigorous Projection Model.
Definition: gdal.h:1012
GDALGridInverseDistanceToAPowerOptions::dfNoDataValue
double dfNoDataValue
Definition: gdal_alg.h:424
GDALDestroyRPCTransformer
void GDALDestroyRPCTransformer(void *pTransformArg)
Destroy RPC tranformer.
Definition: gdal_rpc.cpp:1008
GDALComputeProximity
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
GDALRasterBandH
void * GDALRasterBandH
Opaque type used for the C bindings of the C++ GDALRasterBand class.
Definition: gdal.h:258
GDALTriangulation::pasFacetCoefficients
GDALTriBarycentricCoefficients * pasFacetCoefficients
arra of nFacets barycentric coefficients
Definition: gdal_alg.h:591
GDALGridInverseDistanceToAPowerOptions::nMinPoints
GUInt32 nMinPoints
Definition: gdal_alg.h:422
GDALRasterizeLayers
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:1052
GDALGridMovingAverageOptions::dfRadius2
double dfRadius2
Definition: gdal_alg.h:460
GDALGridMovingAverageOptions
Moving average method control options.
Definition: gdal_alg.h:455
GDALGridInverseDistanceToAPowerOptions::dfRadius1
double dfRadius1
Definition: gdal_alg.h:402
GDALGridInverseDistanceToAPowerOptions::dfAnisotropyRatio
double dfAnisotropyRatio
Definition: gdal_alg.h:398
GDALTriangulation::pasFacets
GDALTriFacet * pasFacets
array of nFacets facets
Definition: gdal_alg.h:590
GDAL_CG_FeedLine
CPLErr GDAL_CG_FeedLine(GDALContourGeneratorH hCG, double *padfScanline)
Feed a line to the contour generator.
Definition: contour.cpp:725
GDALGridDataMetricsOptions::dfRadius1
double dfRadius1
Definition: gdal_alg.h:496
GDALTriBarycentricCoefficients
Triangle barycentric coefficients.
Definition: gdal_alg.h:576
GDALContourGenerateEx
CPLErr GDALContourGenerateEx(GDALRasterBandH hBand, void *hLayer, CSLConstList options, GDALProgressFunc pfnProgress, void *pProgressArg)
Create vector contours from raster DEM.
Definition: contour.cpp:523
GDALDestroyGenImgProjTransformer
void GDALDestroyGenImgProjTransformer(void *)
GenImgProjTransformer deallocator.
Definition: gdaltransformer.cpp:1928
GDALHasTriangulation
int GDALHasTriangulation(void)
Returns if GDAL is built with Delaunay triangulation support.
Definition: delaunay.c:95
GDALCreateGCPTransformer
void * GDALCreateGCPTransformer(int nGCPCount, const GDAL_GCP *pasGCPList, int nReqOrder, int bReversed)
Create GCP based polynomial transformer.
Definition: gdal_crs.c:334
GDALGetTransformerDstGeoTransform
void GDALGetTransformerDstGeoTransform(void *, double *)
Get ApproxTransformer or GenImgProj output geotransform.
Definition: gdaltransformer.cpp:3750
GDALSetGenImgProjTransformerDstGeoTransform
void GDALSetGenImgProjTransformerDstGeoTransform(void *, const double *)
Set GenImgProj output geotransform.
Definition: gdaltransformer.cpp:1897
GDAL_CG_Create
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:703
GDALCreateGeoLocTransformer
void * GDALCreateGeoLocTransformer(GDALDatasetH hBaseDS, char **papszGeolocationInfo, int bReversed)
Create GeoLocation transformer.
Definition: gdalgeoloc.cpp:649
GDALDestroyGeoLocTransformer
void GDALDestroyGeoLocTransformer(void *pTransformArg)
Destroy GeoLocation transformer.
Definition: gdalgeoloc.cpp:819
GDALGridNearestNeighborOptions
Nearest neighbor method control options.
Definition: gdal_alg.h:477
GDALDestroyGCPTransformer
void GDALDestroyGCPTransformer(void *pTransformArg)
Destroy GCP transformer.
Definition: gdal_crs.c:371
GGA_MetricAverageDistancePts
Definition: gdal_alg.h:383
GDALComputeMatchingPoints
GDAL_GCP * GDALComputeMatchingPoints(GDALDatasetH hFirstImage, GDALDatasetH hSecondImage, char **papszOptions, int *pnGCPCount)
GDALComputeMatchingPoints.
Definition: gdalmatching.cpp:188
gdal.h
Public (C callable) GDAL entry points.
GDALGridLinearOptions::dfRadius
double dfRadius
Definition: gdal_alg.h:522
GDALGridNearestNeighborOptions::dfRadius2
double dfRadius2
Definition: gdal_alg.h:482
GDALGridLinearOptions
Linear method control options.
Definition: gdal_alg.h:515
GDALSieveFilter
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:200
GGA_MetricMinimum
Definition: gdal_alg.h:377
CSLConstList
char ** CSLConstList
Type of a constant null-terminated list of nul terminated strings.
Definition: cpl_port.h:1186
GDALTriangulationComputeBarycentricCoefficients
int GDALTriangulationComputeBarycentricCoefficients(GDALTriangulation *psDT, const double *padfX, const double *padfY)
Computes barycentric coefficients for each triangles of the triangulation.
Definition: delaunay.c:301
GGA_MetricAverageDistance
Definition: gdal_alg.h:381
GDALGridInverseDistanceToAPowerNearestNeighborOptions::dfPower
double dfPower
Definition: gdal_alg.h:431
GDALGridLinearOptions::dfNoDataValue
double dfNoDataValue
Definition: gdal_alg.h:524
GDALCreateRPCTransformer
void * GDALCreateRPCTransformer(GDALRPCInfo *psRPC, int bReversed, double dfPixErrThreshold, char **papszOptions)
Create an RPC based transformer.
Definition: gdal_rpc.cpp:762
GDALTriangulationCreateDelaunay
GDALTriangulation * GDALTriangulationCreateDelaunay(int nPoints, const double *padfX, const double *padfY)
Computes a Delaunay triangulation of the passed points.
Definition: delaunay.c:118
GDALGridInverseDistanceToAPowerOptions::dfAnisotropyAngle
double dfAnisotropyAngle
Definition: gdal_alg.h:400
GDALContourGeneratorH
void * GDALContourGeneratorH
Contour generator opaque type.
Definition: gdal_alg.h:290
GDALReprojectionTransform
int GDALReprojectionTransform(void *pTransformArg, int bDstToSrc, int nPointCount, double *x, double *y, double *z, int *panSuccess)
Perform reprojection transformation.
Definition: gdaltransformer.cpp:2481
GDALGridMovingAverageOptions::dfRadius1
double dfRadius1
Definition: gdal_alg.h:458
GGA_MovingAverage
Definition: gdal_alg.h:375
GDALTriangulationComputeBarycentricCoordinates
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:378
GDALTriBarycentricCoefficients::dfMul2X
double dfMul2X
dfMul2X
Definition: gdal_alg.h:580
GDALGridNearestNeighborOptions::dfAngle
double dfAngle
Definition: gdal_alg.h:487
GGA_InverseDistanceToAPowerNearestNeighbor
Definition: gdal_alg.h:387
GDALGCPTransform
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.c:415
GDALCreateApproxTransformer
void * GDALCreateApproxTransformer(GDALTransformerFunc pfnRawTransformer, void *pRawTransformerArg, double dfMaxError)
Create an approximating transformer.
Definition: gdaltransformer.cpp:2724
GDALContourGenerate
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:310
GDALGridContextFree
void GDALGridContextFree(GDALGridContext *psContext)
Free a context used created by GDALGridContextCreate()
Definition: gdalgrid.cpp:2129
GDALSimpleImageWarp
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
GDALTransformerFunc
int(* GDALTransformerFunc)(void *pTransformerArg, int bDstToSrc, int nPointCount, double *x, double *y, double *z, int *panSuccess)
Definition: gdal_alg.h:114
GDALRPCTransform
int GDALRPCTransform(void *pTransformArg, int bDstToSrc, int nPointCount, double *x, double *y, double *z, int *panSuccess)
RPC transform.
Definition: gdal_rpc.cpp:1915
GDALGridMovingAverageOptions::dfNoDataValue
double dfNoDataValue
Definition: gdal_alg.h:473
OGRGeometryH
void * OGRGeometryH
Opaque type for a geometry.
Definition: ogr_api.h:60
GDALGridInverseDistanceToAPowerOptions::dfRadius2
double dfRadius2
Definition: gdal_alg.h:404
GDALTriangulation::nFacets
int nFacets
number of facets
Definition: gdal_alg.h:589
GGA_MetricMaximum
Definition: gdal_alg.h:378
GDALCreateGenImgProjTransformer2
void * GDALCreateGenImgProjTransformer2(GDALDatasetH hSrcDS, GDALDatasetH hDstDS, char **papszOptions)
Create image to image transformer.
Definition: gdaltransformer.cpp:1301
GDALTriangulationFindFacetBruteForce
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:426
GDALApplyVerticalShiftGrid
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:379
GDALGridDataMetricsOptions::dfRadius2
double dfRadius2
Definition: gdal_alg.h:498
GDALTPSTransform
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:358
ogr_api.h
C API and defines for OGRFeature, OGRGeometry, and OGRDataSource related classes. ...
GDALApproxTransform
int GDALApproxTransform(void *pTransformArg, int bDstToSrc, int nPointCount, double *x, double *y, double *z, int *panSuccess)
Perform approximate transformation.
Definition: gdaltransformer.cpp:3106
CPL_C_END
#define CPL_C_END
Macro to end a block of C symbols.
Definition: cpl_port.h:339
GDALCreateGenImgProjTransformer
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:1070
GDALGridInverseDistanceToAPowerOptions
Inverse distance to a power method control options.
Definition: gdal_alg.h:391
GDALDestroyTPSTransformer
void GDALDestroyTPSTransformer(void *pTransformArg)
Destroy TPS transformer.
Definition: gdal_tps.cpp:313
GDALGridInverseDistanceToAPowerNearestNeighborOptions::dfSmoothing
double dfSmoothing
Definition: gdal_alg.h:435
GDALGridContextProcess
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:2183
GDALColorTableH
void * GDALColorTableH
Opaque type used for the C bindings of the C++ GDALColorTable class.
Definition: gdal.h:264
GDALCreateReprojectionTransformer
void * GDALCreateReprojectionTransformer(const char *pszSrcWKT, const char *pszDstWKT)
Create reprojection transformer.
Definition: gdaltransformer.cpp:2380
GDALPolygonize
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:826
GDALGridInverseDistanceToAPowerOptions::dfPower
double dfPower
Definition: gdal_alg.h:394
GDALTriFacet
Triangle fact.
Definition: gdal_alg.h:561
GDALGridInverseDistanceToAPowerOptions::nMaxPoints
GUInt32 nMaxPoints
Definition: gdal_alg.h:416
GGA_NearestNeighbor
Definition: gdal_alg.h:376
GDALOpenVerticalShiftGrid
GDALDatasetH GDALOpenVerticalShiftGrid(const char *pszProj4Geoidgrids, int *pbError)
Load proj.4 geoidgrids as GDAL dataset.
Definition: gdalapplyverticalshiftgrid.cpp:669
GDALCreateGenImgProjTransformer3
void * GDALCreateGenImgProjTransformer3(const char *pszSrcWKT, const double *padfSrcGeoTransform, const char *pszDstWKT, const double *padfDstGeoTransform)
Create image to image transformer.
Definition: gdaltransformer.cpp:1789
GDALFillNodata
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
GDALComputeMedianCutPCT
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:147
GDALGridDataMetricsOptions::dfNoDataValue
double dfNoDataValue
Definition: gdal_alg.h:511
GGA_Linear
Definition: gdal_alg.h:385
GDALTriBarycentricCoefficients::dfMul1Y
double dfMul1Y
dfMul1Y
Definition: gdal_alg.h:579
GDALGridContext
struct GDALGridContext GDALGridContext
Grid context opaque type.
Definition: gdal_alg.h:535
GDALGridMovingAverageOptions::dfAngle
double dfAngle
Definition: gdal_alg.h:465
GDALApproxTransformerOwnsSubtransformer
void GDALApproxTransformerOwnsSubtransformer(void *pCBData, int bOwnFlag)
Set bOwnSubtransformer flag.
Definition: gdaltransformer.cpp:2767
GDALCreateGCPRefineTransformer
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.c:344
GDALTriangulationFree
void GDALTriangulationFree(GDALTriangulation *psDT)
Free a triangulation.
Definition: delaunay.c:275
GDALTriangulationFindFacetDirected
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:521
GDALTriBarycentricCoefficients::dfMul1X
double dfMul1X
dfMul1X
Definition: gdal_alg.h:578
GDALGridInverseDistanceToAPowerNearestNeighborOptions::nMinPoints
GUInt32 nMinPoints
Definition: gdal_alg.h:449
GDAL_CG_Destroy
void GDAL_CG_Destroy(GDALContourGeneratorH hCG)
Destroy contour generator.
Definition: contour.cpp:737
GDAL_GCP
Ground Control Point.
Definition: gdal.h:560
CPLErr
CPLErr
Error category.
Definition: cpl_error.h:52
GDALGridInverseDistanceToAPowerOptions::dfSmoothing
double dfSmoothing
Definition: gdal_alg.h:396
GDALGridInverseDistanceToAPowerNearestNeighborOptions::nMaxPoints
GUInt32 nMaxPoints
Definition: gdal_alg.h:443
GDALCreateTPSTransformer
void * GDALCreateTPSTransformer(int nGCPCount, const GDAL_GCP *pasGCPList, int bReversed)
Create Thin Plate Spline transformer from GCPs.
Definition: gdal_tps.cpp:144
GDALChecksumImage
int GDALChecksumImage(GDALRasterBandH hBand, int nXOff, int nYOff, int nXSize, int nYSize)
Compute checksum for image region.
Definition: gdalchecksum.cpp:66
GDALTriangulation
Triangulation structure.
Definition: gdal_alg.h:587

Generated for GDAL by 1.8.8.