[GRASS-dev] GRASS 7: Rast__allocate_null_bits() and Rast__null_bitstream_size()?

Glynn Clements glynn at gclements.plus.com
Sun Jul 19 23:47:10 EDT 2009


Markus Neteler wrote:

> in GRASS 7, I found that
>   Rast__allocate_null_bits()
>   Rast__null_bitstream_size()
> are used in r.null and r.support.
> 
> Question: why Rast__xxx() and not Rast_xxx()?

That's the convention for functions which are meant for internal use
only.

The only code which needs to use those functions is code which reads
or writes the null bitmap file directly. The "public" interface to the
null bitmap (e.g. Rast_get_null_value_row()) expands the bitmap to one
byte per cell.

Arguably, lib/raster needs e.g. Rast_create_null_bitmap() so that
r.null and r.support don't need to access the file directory.

OTOH, 7.0 is a good opportunity to eliminate the null bitmap
altogether.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list