matoretta

IRasterProps.NoData doesn´t work whit Iraster2.GetPixelValue. Why?

Discussion created by matoretta on Nov 14, 2013
Latest reply on Nov 14, 2013 by matoretta
Hi i have code loke belov. I set NoData value to my pRaster (IRaster2) as value - 9999. but when i use GetPixelValue(0, x, y) at pixel location whit NoData i have value = 0.  do anybody know where is mistake? Or how to set my NoData Value correctly ?

dim pRaster as IRaster2
.
.
pRasPropsIn = CType(pRaster, IRasterProps)
pRasPropsIn.NoDataValue = -9999 'urcovanie hodnoty no data
.
.
dim pValue as Single
pValue = pRaster.GetPixelValue(0, x, y)

here is pValue = 0 not -9999 !!!!!!

Outcomes