[GRASS5] Newbies Q: dealing with nulls in raster maps

Mris Nartis maris.gis at gmail.com
Mon Oct 17 11:57:02 EDT 2005


Hi all.

I'm writing my first C app (after hello world ;) - a GRASS module.
I managed to load raster into 2d array and do all stuff what I need,
except when dealing with null values.

Q's:
1. How can I check is raster cell value null? foo[x][y]==NULL?
2. How can I save resulting raster map with null instead of "0"?

Those Q's may sound lame, but, as I have only read "teach yourself C
in 24 hours" style tutorial, I cannot understand GRASS null magic
looking only on source.


tnx for reading,
Maris Nartiss.




More information about the grass-dev mailing list