No subject

Eric Buddington eric at detritus.ees.wesleyan.edu
Wed Sep 6 14:38:12 EDT 1995


I am writing a converter to convert from DEM to GRASS raster format.

I use G_open_new_cell_random() to create the new raster file. According to
progman.ps, when I call G_close_cell(), it will write the header file. How
do I set the header info for the cell data so that it will be saved?

Should I modify G__.fileinfo[fd]->cellhd to set it?            
Or should I call G_put_cellhd() after calling G_close_cell?

Modifying the G__ structure seems more logical and efficient, but it is 
used in gislib only, so perhaps it shouldn't be accessed directly.

The documentation (progman.ps) says that programmers shouldn't need to
use G_put_cellhd. Also, the write routine for cell files 
G_put_map_row_random() uses G__.fileinfo[fd]->cellhd to determine what
to write (to see if it's inside the region or not).

Eric
eric at detritus.ees.wesleyan.edu 



More information about the grass-user mailing list