32 #ifndef GDAL_ALG_PRIV_H_INCLUDED
33 #define GDAL_ALG_PRIV_H_INCLUDED
48 { GBV_UserBurnValue = 0, GBV_Z = 1, GBV_M = 2
62 unsigned char *pabyChunkBuf;
74 const std::int64_t *int64_values;
75 const double *double_values;
78 GDALBurnValueSrc eBurnValueSource;
79 GDALRasterMergeAlg eMergeAlg;
80 bool bFillSetVisitedPoints;
81 std::set<uint64_t> *poSetVisitedPoints;
95 typedef void (*llScanlineFunc)(
void *, int, int, int, double);
96 typedef void (*llPointFunc)(
void *, int, int, double);
98 void GDALdllImagePoint(
int nRasterXSize,
int nRasterYSize,
int nPartCount,
99 const int *panPartSize,
const double *padfX,
100 const double *padfY,
const double *padfVariant,
101 llPointFunc pfnPointFunc,
void *pCBData);
103 void GDALdllImageLine(
int nRasterXSize,
int nRasterYSize,
int nPartCount,
104 const int *panPartSize,
const double *padfX,
105 const double *padfY,
const double *padfVariant,
106 llPointFunc pfnPointFunc,
void *pCBData);
108 void GDALdllImageLineAllTouched(
int nRasterXSize,
int nRasterYSize,
109 int nPartCount,
const int *panPartSize,
110 const double *padfX,
const double *padfY,
111 const double *padfVariant,
112 llPointFunc pfnPointFunc,
void *pCBData,
113 bool bAvoidBurningSamePoints,
114 bool bIntersectOnly);
116 void GDALdllImageFilledPolygon(
int nRasterXSize,
int nRasterYSize,
117 int nPartCount,
const int *panPartSize,
118 const double *padfX,
const double *padfY,
119 const double *padfVariant,
120 llScanlineFunc pfnScanlineFunc,
void *pCBData,
121 bool bAvoidBurningSamePoints);
129 #define GP_NODATA_MARKER -51502112
131 template <
class DataType,
class EqualityTest>
class GDALRasterPolygonEnumeratorT
135 void MergePolygon(
int nSrcId,
int nDstId);
136 int NewPolygon(DataType nValue);
141 GInt32 *panPolyIdMap =
nullptr;
142 DataType *panPolyValue =
nullptr;
144 int nNextPolygonId = 0;
147 int nConnectedness = 0;
150 explicit GDALRasterPolygonEnumeratorT(
int nConnectedness = 4);
151 ~GDALRasterPolygonEnumeratorT();
153 bool ProcessLine(DataType *panLastLineVal, DataType *panThisLineVal,
154 GInt32 *panLastLineId,
GInt32 *panThisLineId,
int nXSize);
156 void CompleteMerges();
161 struct IntEqualityTest
163 bool operator()(std::int64_t a, std::int64_t b)
const
169 typedef GDALRasterPolygonEnumeratorT<std::int64_t, IntEqualityTest>
170 GDALRasterPolygonEnumerator;
172 constexpr
const char *GDAL_APPROX_TRANSFORMER_CLASS_NAME =
173 "GDALApproxTransformer";
174 constexpr
const char *GDAL_GEN_IMG_TRANSFORMER_CLASS_NAME =
175 "GDALGenImgProjTransformer";
177 bool GDALIsTransformer(
void *hTransformerArg,
const char *pszClassName);
179 typedef void *(*GDALTransformDeserializeFunc)(
CPLXMLNode *psTree);
181 void CPL_DLL *GDALRegisterTransformDeserializer(
183 GDALTransformDeserializeFunc pfnDeserializeFunc);
184 void CPL_DLL GDALUnregisterTransformDeserializer(
void *pData);
186 void GDALCleanupTransformDeserializerMutex();
190 void *GDALCreateTPSTransformerInt(
int nGCPCount,
const GDAL_GCP *pasGCPList,
191 int bReversed,
char **papszOptions);
193 void CPL_DLL *GDALCloneTransformer(
void *pTransformerArg);
195 void GDALRefreshGenImgProjTransformer(
void *hTransformArg);
196 void GDALRefreshApproxTransformer(
void *hTransformArg);
198 int GDALTransformLonLatToDestGenImgProjTransformer(
void *hTransformArg,
199 double *pdfX,
double *pdfY);
200 int GDALTransformLonLatToDestApproxTransformer(
void *hTransformArg,
201 double *pdfX,
double *pdfY);
203 bool GDALTransformIsTranslationOnPixelBoundaries(
207 void *pTransformerArg);
213 GDALTransformerInfo sTI;
216 double dfOversampleFactor;
222 double adfBackMapGeoTransform[6];
250 double dfPIXEL_OFFSET;
252 double dfLINE_OFFSET;
255 bool bOriginIsTopLeftCorner;
256 bool bGeographicSRSWithMinus180Plus180LongRange;
259 char **papszGeolocationInfo;
261 } GDALGeoLocTransformInfo;
269 struct GDALReprojectionTransformInfo
271 GDALTransformerInfo sTI;
272 char **papszOptions =
nullptr;
278 GDALReprojectionTransformInfo() : sTI()
280 memset(&sTI, 0,
sizeof(sTI));
283 GDALReprojectionTransformInfo(
const GDALReprojectionTransformInfo &) =
285 GDALReprojectionTransformInfo &
286 operator=(
const GDALReprojectionTransformInfo &) =
delete;
298 GDALTransformerInfo sTI;
300 double adfSrcGeoTransform[6];
301 double adfSrcInvGeoTransform[6];
303 void *pSrcTransformArg;
309 double adfDstGeoTransform[6];
310 double adfDstInvGeoTransform[6];
312 void *pDstTransformArg;
318 bool bCheckWithInvertPROJ;
321 bool bHasCustomTransformationPipeline;
323 } GDALGenImgProjTransformInfo;
331 int GDALComputeMedianCutPCTInternal(
334 int (*pfnIncludePixel)(
int,
int,
void *),
int nColors,
int nBits,
335 T *panHistogram,
GDALColorTableH hColorTable, GDALProgressFunc pfnProgress,
341 GInt16 *pasDynamicColorMap,
int bDither,
342 GDALProgressFunc pfnProgress,
void *pProgressArg);
344 #define PRIME_FOR_65536 98317
349 #define MEDIAN_CUT_AND_DITHER_BUFFER_SIZE_65536 \
350 (6 * sizeof(int) * PRIME_FOR_65536)
364 GBool GDALFloatEquals(
float A,
float B);
366 struct FloatEqualityTest
368 bool operator()(
float a,
float b)
370 return GDALFloatEquals(a, b) == TRUE;
375 int nXSize,
int nYSize,
376 double &dfWestLongitudeDeg,
377 double &dfSouthLatitudeDeg,
378 double &dfEastLongitudeDeg,
379 double &dfNorthLatitudeDeg);
382 double dfY1,
double dfX2,
double dfY2,
383 double &dfWestLongitudeDeg,
384 double &dfSouthLatitudeDeg,
385 double &dfEastLongitudeDeg,
386 double &dfNorthLatitudeDeg);
389 const char *pszGeolocationDataset,
392 void *GDALCreateGeoLocTransformerEx(
GDALDatasetH hBaseDS,
394 int bReversed,
const char *pszSourceDataset,
String list class designed around our use of C "char**" string lists.
Definition: cpl_string.h:449
This class represents an OpenGIS Spatial Reference System, and contains methods for converting betwee...
Definition: ogr_spatialref.h:169
short GInt16
Int16 type.
Definition: cpl_port.h:181
#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
int GBool
Type for boolean values (alias to int)
Definition: cpl_port.h:196
#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:1042
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
int GInt32
Int32 type.
Definition: cpl_port.h:175
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:315
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
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:71
Ground Control Point.
Definition: gdal.h:1075