Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Commit

Permalink
fixed 0 to nodata issue
Browse files Browse the repository at this point in the history
  • Loading branch information
billyz313 committed Mar 1, 2019
1 parent 2a816cc commit 5415c65
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,9 @@ def getDayValue(year,month,day,bounds,clippedmask,dataType,operationsType, polyg
# Get the image band and write the data array values to it. Flush the Cache and set the NoDataValue (This is the step that writes data to the output file)
outDataArray = hdf_Data_Array
outBand = outDS.GetRasterBand(bandName)
outBand.WriteArray(outDataArray, 0, 0)
outBand.FlushCache()
outBand.WriteArray(outDataArray, 0, 0)
outBand.SetNoDataValue(noData_Value)
outBand.FlushCache()

#logger.debug("Alert: 5")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,8 @@ def getDayValue(year,month,day,bounds,clippedmask,dataType,operationsType, polyg
outDataArray = hdf_Data_Array
outBand = outDS.GetRasterBand(bandName)
outBand.WriteArray(outDataArray, 0, 0)
outBand.FlushCache()
outBand.SetNoDataValue(noData_Value)
outBand.FlushCache()

#logger.debug("Alert: 5")

Expand Down

0 comments on commit 5415c65

Please sign in to comment.