Showing results for 
Search instead for 
Do you mean 

No Data value handling problem with shapefile in the Spatial Modeler

by Technical Evangelist on ‎03-30-2016 12:39 PM (288 Views)


The user wanted to change the raster files particular area with a values from a shapefile in the same geographical location. However the user found that the Saptial Modeler is not writing the desired value in the output raster.

The user  data consists of a raster data and a shapefile. The spatial modeler  raster input operator, a vector input as raster operator   and an expression  editor operator has been used by the user. The expression used was :

“EITHER $Input1 IF ( $Input2==0 ) OR $Input2 OTHERWISE”



The user found that the Spatial Model couldn’t write the desired value in the designated geograpgical location in the raster image.


After investigation, we have found  that the main problem was the  null value handling  with shapefile in the Spatial modeler.


Therefore  if a “Replace NoData With” operator is used in between the “Vecor Input AsRaster” and   the “Expression” operator , this can fix the problem . In this way the user  can directly put the output from the “Vector Input As Raster” into the “Expression” operator. The “Replace NoData With”  operator can be found in the “Data Generation” category in the Spatial Modeler.