32 #ifndef GDAL_ALG_PRIV_H_INCLUDED
33 #define GDAL_ALG_PRIV_H_INCLUDED
43 typedef enum { GBV_UserBurnValue = 0, GBV_Z = 1, GBV_M = 2
55 unsigned char * pabyChunkBuf;
63 const double *padfBurnValue;
64 GDALBurnValueSrc eBurnValueSource;
65 GDALRasterMergeAlg eMergeAlg;
79 typedef void (*llScanlineFunc)(
void *, int, int, int, double );
80 typedef void (*llPointFunc)(
void *, int, int, double );
82 void GDALdllImagePoint(
int nRasterXSize,
int nRasterYSize,
83 int nPartCount,
const int *panPartSize,
84 const double *padfX,
const double *padfY,
85 const double *padfVariant,
86 llPointFunc pfnPointFunc,
void *pCBData );
88 void GDALdllImageLine(
int nRasterXSize,
int nRasterYSize,
89 int nPartCount,
const int *panPartSize,
90 const double *padfX,
const double *padfY,
91 const double *padfVariant,
92 llPointFunc pfnPointFunc,
void *pCBData );
94 void GDALdllImageLineAllTouched(
int nRasterXSize,
int nRasterYSize,
95 int nPartCount,
const int *panPartSize,
96 const double *padfX,
const double *padfY,
97 const double *padfVariant,
98 llPointFunc pfnPointFunc,
void *pCBData,
99 int bAvoidBurningSamePoints );
101 void GDALdllImageFilledPolygon(
int nRasterXSize,
int nRasterYSize,
102 int nPartCount,
const int *panPartSize,
103 const double *padfX,
const double *padfY,
104 const double *padfVariant,
105 llScanlineFunc pfnScanlineFunc,
void *pCBData );
113 #define GP_NODATA_MARKER -51502112
115 template<
class DataType,
class EqualityTest>
class GDALRasterPolygonEnumeratorT
119 void MergePolygon(
int nSrcId,
int nDstId );
120 int NewPolygon( DataType nValue );
126 GInt32 *panPolyIdMap =
nullptr;
127 DataType *panPolyValue =
nullptr;
129 int nNextPolygonId = 0;
132 int nConnectedness = 0;
135 explicit GDALRasterPolygonEnumeratorT(
int nConnectedness=4 );
136 ~GDALRasterPolygonEnumeratorT();
138 void ProcessLine( DataType *panLastLineVal, DataType *panThisLineVal,
142 void CompleteMerges();
147 struct IntEqualityTest
149 bool operator()(
GInt32 a,
GInt32 b)
const {
return a == b; }
152 typedef GDALRasterPolygonEnumeratorT<GInt32, IntEqualityTest> GDALRasterPolygonEnumerator;
154 typedef void* (*GDALTransformDeserializeFunc)(
CPLXMLNode *psTree );
156 void CPL_DLL *GDALRegisterTransformDeserializer(
const char* pszTransformName,
158 GDALTransformDeserializeFunc pfnDeserializeFunc);
159 void CPL_DLL GDALUnregisterTransformDeserializer(
void* pData);
161 void GDALCleanupTransformDeserializerMutex();
165 void* GDALCreateTPSTransformerInt(
int nGCPCount,
const GDAL_GCP *pasGCPList,
166 int bReversed,
char** papszOptions );
168 void CPL_DLL * GDALCloneTransformer(
void *pTransformerArg );
170 void GDALRefreshGenImgProjTransformer(
void* hTransformArg);
171 void GDALRefreshApproxTransformer(
void* hTransformArg);
178 template<
class T>
int
183 GByte* pabyGreenBand,
185 int (*pfnIncludePixel)(
int,
int,
void*),
190 GDALProgressFunc pfnProgress,
191 void * pProgressArg );
199 GInt16* pasDynamicColorMap,
201 GDALProgressFunc pfnProgress,
202 void * pProgressArg );
204 #define PRIME_FOR_65536 98317
209 #define MEDIAN_CUT_AND_DITHER_BUFFER_SIZE_65536 (6 * sizeof(int) * PRIME_FOR_65536)
223 GBool GDALFloatEquals(
float A,
float B);
225 struct FloatEqualityTest
227 bool operator()(
float a,
float b) {
return GDALFloatEquals(a,b) == TRUE; }
234 double& dfWestLongitudeDeg,
235 double& dfSouthLatitudeDeg,
236 double& dfEastLongitudeDeg,
237 double& dfNorthLatitudeDeg );
244 double& dfWestLongitudeDeg,
245 double& dfSouthLatitudeDeg,
246 double& dfEastLongitudeDeg,
247 double& dfNorthLatitudeDeg );