next up previous
Next: Stats Class Up: C++ Classes Previous: R250 Class

RasterFile Class

 

The RasterFile class is another virtual base class. Two classes are derived from this class: the OldRaster class and the NewRaster class, each used to read or write GRASS raster maps. GRASS differentiates between existing raster files and new raster files. This fact along with the different methods required for the two types of maps motivated two separate classes.

The OldRaster class deals with the file management of existing raster files. It does not have any internal row buffers, rather it relies on external RowBuf objects (Section 4.1.4). This is because the existing raster objects are accessed from a number of other objects. The OldRaster class also stores other information about existing map layers, such as the GRASS header, category values and the color map (Section 2.2). These GRASS parameters are used by the Stats (Section 4.1.8), Graphics (Section 4.1.10) and NewRaster classes when analyzing the raster map.

The NewRaster class deals with newly created maps (either land cover or tree age) and manages its own RowBuf object to write out new map rows. The color map and category values are copied from an OldRaster object to insure the new map is properly displayed.



Michael W. Berry (berry@cs.utk.edu)
Wed Aug 16 10:48:40 EDT 1995