32#ifndef GDAL_ALG_PRIV_H_INCLUDED
33#define GDAL_ALG_PRIV_H_INCLUDED
GBV_UserBurnValue = 0, GBV_Z = 1, GBV_M = 2
60 unsigned char *pabyChunkBuf;
71 const std::int64_t *int64_values;
72 const double *double_values;
74 GDALBurnValueSrc eBurnValueSource;
75 GDALRasterMergeAlg eMergeAlg;
89typedef void (*llScanlineFunc)(
void *, int, int, int, double);
90typedef void (*llPointFunc)(
void *, int, int, double);
92void GDALdllImagePoint(
int nRasterXSize,
int nRasterYSize,
int nPartCount,
93 const int *panPartSize,
const double *padfX,
94 const double *padfY,
const double *padfVariant,
95 llPointFunc pfnPointFunc,
void *pCBData);
97void GDALdllImageLine(
int nRasterXSize,
int nRasterYSize,
int nPartCount,
98 const int *panPartSize,
const double *padfX,
99 const double *padfY,
const double *padfVariant,
100 llPointFunc pfnPointFunc,
void *pCBData);
102void GDALdllImageLineAllTouched(
int nRasterXSize,
int nRasterYSize,
103 int nPartCount,
const int *panPartSize,
104 const double *padfX,
const double *padfY,
105 const double *padfVariant,
106 llPointFunc pfnPointFunc,
void *pCBData,
107 int bAvoidBurningSamePoints,
108 bool bIntersectOnly);
110void GDALdllImageFilledPolygon(
int nRasterXSize,
int nRasterYSize,
111 int nPartCount,
const int *panPartSize,
112 const double *padfX,
const double *padfY,
113 const double *padfVariant,
114 llScanlineFunc pfnScanlineFunc,
void *pCBData);
122#define GP_NODATA_MARKER -51502112
124template <
class DataType,
class EqualityTest>
class GDALRasterPolygonEnumeratorT
128 void MergePolygon(
int nSrcId,
int nDstId);
129 int NewPolygon(DataType nValue);
134 GInt32 *panPolyIdMap =
nullptr;
135 DataType *panPolyValue =
nullptr;
137 int nNextPolygonId = 0;
140 int nConnectedness = 0;
143 explicit GDALRasterPolygonEnumeratorT(
int nConnectedness = 4);
144 ~GDALRasterPolygonEnumeratorT();
146 void ProcessLine(DataType *panLastLineVal, DataType *panThisLineVal,
147 GInt32 *panLastLineId,
GInt32 *panThisLineId,
int nXSize);
149 void CompleteMerges();
154struct IntEqualityTest
156 bool operator()(std::int64_t a, std::int64_t b)
const
162typedef GDALRasterPolygonEnumeratorT<std::int64_t, IntEqualityTest>
163 GDALRasterPolygonEnumerator;
165typedef void *(*GDALTransformDeserializeFunc)(
CPLXMLNode *psTree);
167void CPL_DLL *GDALRegisterTransformDeserializer(
169 GDALTransformDeserializeFunc pfnDeserializeFunc);
170void CPL_DLL GDALUnregisterTransformDeserializer(
void *pData);
172void GDALCleanupTransformDeserializerMutex();
176void *GDALCreateTPSTransformerInt(
int nGCPCount,
const GDAL_GCP *pasGCPList,
177 int bReversed,
char **papszOptions);
179void CPL_DLL *GDALCloneTransformer(
void *pTransformerArg);
181void GDALRefreshGenImgProjTransformer(
void *hTransformArg);
182void GDALRefreshApproxTransformer(
void *hTransformArg);
184int GDALTransformLonLatToDestGenImgProjTransformer(
void *hTransformArg,
185 double *pdfX,
double *pdfY);
186int GDALTransformLonLatToDestApproxTransformer(
void *hTransformArg,
187 double *pdfX,
double *pdfY);
189bool GDALTransformIsTranslationOnPixelBoundaries(
193 void *pTransformerArg);
199 GDALTransformerInfo sTI;
202 double dfOversampleFactor;
208 double adfBackMapGeoTransform[6];
236 double dfPIXEL_OFFSET;
238 double dfLINE_OFFSET;
241 bool bOriginIsTopLeftCorner;
242 bool bGeographicSRSWithMinus180Plus180LongRange;
245 char **papszGeolocationInfo;
247} GDALGeoLocTransformInfo;
255int GDALComputeMedianCutPCTInternal(
258 int (*pfnIncludePixel)(
int,
int,
void *),
int nColors,
int nBits,
259 T *panHistogram,
GDALColorTableH hColorTable, GDALProgressFunc pfnProgress,
265 GInt16 *pasDynamicColorMap,
int bDither,
266 GDALProgressFunc pfnProgress,
void *pProgressArg);
268#define PRIME_FOR_65536 98317
273#define MEDIAN_CUT_AND_DITHER_BUFFER_SIZE_65536 \
274 (6 * sizeof(int) * PRIME_FOR_65536)
288GBool GDALFloatEquals(
float A,
float B);
290struct FloatEqualityTest
292 bool operator()(
float a,
float b)
294 return GDALFloatEquals(a, b) == TRUE;
299 int nXSize,
int nYSize,
300 double &dfWestLongitudeDeg,
301 double &dfSouthLatitudeDeg,
302 double &dfEastLongitudeDeg,
303 double &dfNorthLatitudeDeg);
306 double dfY1,
double dfX2,
double dfY2,
307 double &dfWestLongitudeDeg,
308 double &dfSouthLatitudeDeg,
309 double &dfEastLongitudeDeg,
310 double &dfNorthLatitudeDeg);
313 const char *pszGeolocationDataset,
316void *GDALCreateGeoLocTransformerEx(
GDALDatasetH hBaseDS,
318 int bReversed,
const char *pszSourceDataset,
String list class designed around our use of C "char**" string lists.
Definition cpl_string.h:438
This class represents an OpenGIS Spatial Reference System, and contains methods for converting betwee...
Definition ogr_spatialref.h:167
short GInt16
Int16 type.
Definition cpl_port.h:201
#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
int GBool
Type for boolean values (alias to int)
Definition cpl_port.h:214
#define CPL_DISALLOW_COPY_ASSIGN(ClassName)
Helper to remove the copy and assignment constructors so that the compiler will not generate the defa...
Definition cpl_port.h:1049
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
int GInt32
Int32 type.
Definition cpl_port.h:195
struct _CPLQuadTree CPLQuadTree
Opaque type for a quad tree.
Definition cpl_quad_tree.h:65
GIntBig GSpacing
Type to express pixel, line or band spacing.
Definition gdal.h:314
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
Public (C callable) GDAL algorithm entry points, and definitions.
int(* GDALTransformerFunc)(void *pTransformerArg, int bDstToSrc, int nPointCount, double *x, double *y, double *z, int *panSuccess)
Definition gdal_alg.h:95
Coordinate systems services.
Document node structure.
Definition cpl_minixml.h:70
Ground Control Point.
Definition gdal.h:959