00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #ifndef GDAL_ALG_PRIV_H_INCLUDED
00032 #define GDAL_ALG_PRIV_H_INCLUDED
00033
00034 #include "gdal_alg.h"
00035
00036 CPL_C_START
00037
00039 typedef enum { GBV_UserBurnValue = 0, GBV_Z = 1, GBV_M = 2
00043 } GDALBurnValueSrc;
00044
00045 typedef struct {
00046 unsigned char * pabyChunkBuf;
00047 int nXSize;
00048 int nYSize;
00049 int nBands;
00050 GDALDataType eType;
00051 double *padfBurnValue;
00052 GDALBurnValueSrc eBurnValueSource;
00053 } GDALRasterizeInfo;
00054
00055
00056
00057
00058
00059 typedef void (*llScanlineFunc)( void *, int, int, int, double );
00060 typedef void (*llPointFunc)( void *, int, int, double );
00061
00062 void GDALdllImagePoint( int nRasterXSize, int nRasterYSize,
00063 int nPartCount, int *panPartSize,
00064 double *padfX, double *padfY, double *padfVariant,
00065 llPointFunc pfnPointFunc, void *pCBData );
00066
00067 void GDALdllImageLine( int nRasterXSize, int nRasterYSize,
00068 int nPartCount, int *panPartSize,
00069 double *padfX, double *padfY, double *padfVariant,
00070 llPointFunc pfnPointFunc, void *pCBData );
00071
00072 void GDALdllImageLineAllTouched(int nRasterXSize, int nRasterYSize,
00073 int nPartCount, int *panPartSize,
00074 double *padfX, double *padfY,
00075 double *padfVariant,
00076 llPointFunc pfnPointFunc, void *pCBData );
00077
00078 void GDALdllImageFilledPolygon(int nRasterXSize, int nRasterYSize,
00079 int nPartCount, int *panPartSize,
00080 double *padfX, double *padfY,
00081 double *padfVariant,
00082 llScanlineFunc pfnScanlineFunc, void *pCBData );
00083
00084 CPL_C_END
00085
00086
00087
00088
00089
00090 class GDALRasterPolygonEnumerator
00091
00092 {
00093 private:
00094 void MergePolygon( int nSrcId, int nDstId );
00095 int NewPolygon( GInt32 nValue );
00096
00097 public:
00098
00099 GInt32 *panPolyIdMap;
00100 GInt32 *panPolyValue;
00101
00102 int nNextPolygonId;
00103 int nPolyAlloc;
00104
00105 int nConnectedness;
00106
00107 public:
00108 GDALRasterPolygonEnumerator( int nConnectedness=4 );
00109 ~GDALRasterPolygonEnumerator();
00110
00111 void ProcessLine( GInt32 *panLastLineVal, GInt32 *panThisLineVal,
00112 GInt32 *panLastLineId, GInt32 *panThisLineId,
00113 int nXSize );
00114
00115 void CompleteMerges();
00116
00117 void Clear();
00118 };
00119
00120 #ifdef OGR_ENABLED
00121
00122
00123
00124
00125
00126 class GDALRasterFPolygonEnumerator
00127
00128 {
00129 private:
00130 void MergePolygon( int nSrcId, int nDstId );
00131 int NewPolygon( float fValue );
00132
00133 public:
00134
00135 GInt32 *panPolyIdMap;
00136 float *pafPolyValue;
00137
00138 int nNextPolygonId;
00139 int nPolyAlloc;
00140
00141 int nConnectedness;
00142
00143 public:
00144 GDALRasterFPolygonEnumerator( int nConnectedness=4 );
00145 ~GDALRasterFPolygonEnumerator();
00146
00147 void ProcessLine( float *pafLastLineVal, float *pafThisLineVal,
00148 GInt32 *panLastLineId, GInt32 *panThisLineId,
00149 int nXSize );
00150
00151 void CompleteMerges();
00152
00153 void Clear();
00154 };
00155 #endif
00156
00157 typedef void* (*GDALTransformDeserializeFunc)( CPLXMLNode *psTree );
00158
00159 void* GDALRegisterTransformDeserializer(const char* pszTransformName,
00160 GDALTransformerFunc pfnTransformerFunc,
00161 GDALTransformDeserializeFunc pfnDeserializeFunc);
00162 void GDALUnregisterTransformDeserializer(void* pData);
00163
00164
00165
00166
00167
00174 #define MAX_ULPS 10
00175
00176 GBool GDALFloatEquals(float A, float B);
00177
00178 #endif