IRasterProps.NoData doesn´t work. Why?

340
0
10-14-2013 03:08 AM
martinmaretta
Occasional Contributor
Hi i want to work whit my raster via pixelBlock, but when i try define to my raster value of NoData nothing happen. (I want set NoData as -9999, but when i create array of pixels, minimum value is 0. Also when i save this raster there is no NoData values only 0). do anybody know where is a mistake? I used to create pixelblock like this in past and it was workong fine. thank a lot

        Dim pBlock As IPixelBlock3
        Dim pPoint As IPnt
        Dim pRasPropsIn2 As IRasterProps
        Dim pRaster As IRaster
        Dim pSingArray As Single(,)
        pRaster = pOutRasterArray(0) 'Array whit raster object
        pRasPropsIn2 = CType(pRaster, IRasterProps)
        pRasPropsIn2.NoDataValue = -9999
        pPoint = New DblPnt
        pPoint.SetCoords(10, 10)
        pBlock = pRaster.CreatePixelBlock(pPoint)
        pSingArray = CType(pBlock.PixelData(0), Single(,)) ' this array has nodata = 0
0 Kudos
0 Replies