MCPcopy Create free account
hub / github.com/OSGeo/gdal / GPMaskImageData

Function GPMaskImageData

alg/polygonize.cpp:50–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48
49template <class DataType>
50static CPLErr GPMaskImageData(GDALRasterBandH hMaskBand, GByte *pabyMaskLine,
51 int iY, int nXSize, DataType *panImageLine)
52
53{
54 const CPLErr eErr = GDALRasterIO(hMaskBand, GF_Read, 0, iY, nXSize, 1,
55 pabyMaskLine, nXSize, 1, GDT_UInt8, 0, 0);
56 if (eErr != CE_None)
57 return eErr;
58
59 for (int i = 0; i < nXSize; i++)
60 {
61 if (pabyMaskLine[i] == 0)
62 panImageLine[i] = GP_NODATA_MARKER;
63 }
64
65 return CE_None;
66}
67
68/************************************************************************/
69/* GDALPolygonizeT() */

Callers 1

GDALPolygonizeTFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected