[GRASS-dev] raster row alloc?

Glynn Clements glynn at gclements.plus.com
Thu Jun 1 09:21:50 EDT 2006


Hamish wrote:

> I notice G_allocate_raster_buf() allocates G_window_cols() + 1.
> 
> What's the +1 for? Is it just for good luck,

AFAICT, yes.

> is there a null terminator which inidcates EOL? or something else?

G_{get,put}_raster_row() etc only read/write G_window_cols() elements.

> I'd like to use  G_set_null_value(array, nrows*ncols, map_type);
> to fill some nrows with NULL in one go instead of a loop over the number
> of rows, and perhaps G_raster_cpy() to copy a few lines over at a time.
> 
> nrows*(ncols+1) ?

Not necessary.

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




More information about the grass-dev mailing list