My goal is to rasterize a vector polygon-based shapefile.

Whenever I run in the modeler or even from the Processing Toolbox the Rasterize tool of GDAL, I receive a raster layer that's not good for me, as in "NaN" values.

To be more precises, what does my Model do? It first takes in a vector, then through Advanced Python Calculator I've placed a function so that it reclassifies the string value to integer, which is added to a new field (I've tested the output right after the Calculator step and it's fine, however it does have a lot NULL values because that data is not of interest but perhaps that could be the problem).

When it converts the vector into raster based on this new field, it basically gives me a raster with "NaN" values, as in pure black. Also, I plan on obtaining raster oa cellsize of 10.

Any ideas on how to fix this?

  • To which value do you want NULL values being mapped if not to NaN? – Detlev Jun 18 '15 at 19:36
  • Well, I didn't really plan to add them a value. If I did, it would change things later when I have to do some calculations. Interestingly enough, with other layers I'm not having the same issue even though the number of NULL values are much less. – Geosphere Jun 18 '15 at 20:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.