[libgfc Index] [libgfc Hierarchy] [Headers]
ADT for raster data More...
#include <src/gadt_raster.h>
Inherits: GSpatial
ADT for raster data.
A raster is a regular grid of cells which are divided into "morton slabs" of fixed
size. Each slab is then stored individualy as one record. Besides
slabs, a raster object also contains a header which holds the meta
information of the raster object (such as size, number of slabs, file
id where the slabs are stored, and flags for compression etc). The header
of a raster also contains the indexing information to the records of
individual Slabs, so that individual slab can be retrieved quickly without
scanning the whole raster data.
8, 16, 24 and 32-bit rasters are all supported.
The raster can be compressed upon request, in which case every slab
will have their data compressed using the deflate algorithm of zlib.
This compress/uncompress procedure is transparent to GRaster users.
[public]
initalize with specific bit depth. 16 bits for each value
[public]
initialize the raster with a pipe containing header info
[public]
initialize the raster; open and load the file containing previously stored raster data
[public]
copy ctor
[public]
assignment operator
[public]
print (only) the raster header
[public virtual]
generate a raster object out of a user string; the format of the string: "w h V00 V01 V02... V10 V11 V12... Vwh" where w and h are the width and height of the user supplied grid
[public virtual]
output the raster object into a user string. the format is the same as for input.
[public virtual]
pack the (zipped) raster data into a pipe
[public virtual]
unpack the (zipped) data from a pipe
[public virtual]
store the (zipped) raster data into a file
[public virtual]
load raster data from a previously stored raster file
[public virtual]
import user specified raster data file; it may be a text file or binary. The user specify the size (in byte) for the values. The width and height of the raster should also be specified. The user file should contain nothing but the data itself. The fifth parameter indicates whether the result raster object should be zipped or not. Note that a raster image can only have ineger values.
[public]
return number of cells on x dimension
[public]
return number of cells on y dimension
[public]
retu4n maximum value
[public]
return maximum value for given region
[public]
return minimum value
[public]
return min value for given region
[public]
return average val
[public]
return average value for given region
[public]
return the value to be ignored (for background/non-value)
[public]
set ignorant value
[public]
return the easting value
[public]
return the northing value
[public]
set easting value
[public]
set northing value
[public]
set the factor
[public]
get the factor
[public]
set geographic coordinates for lower corner
[public]
set the size of a pixel (cell)
[public]
get the size of a pixel
[public]
return number of slabs.
[public virtual]
set a pixel value
[public virtual]
get the value of a pixel. Note that the value returned is not adjusted. To get the true value at the pixel you must divide it by factor() !
[public]
return a pointer to the slab with given id
[public virtual]
return a scan line of the raster
[public virtual]
convert the raster to linear array of float-value with row-major order
[public]
set the raster to be zipped (compressed)
[public]
return true if the raster is zipped on storage
[public virtual]
calculate the statistics (min, max, average) of the raster. These statistics are updated and stored permanantly in the raster header.
[protected virtual]
retrieve the slab with given index; in GFC it is retrieved from a previously written raster data file; in a DB contecxt the programmer can inherit this class and override this method so that individual slab will be fetched from the db (out of a table for instance.)
[protected virtual]
store an individual slab into the data file; (or to a db table if the programmer choose to do so in an overriden function. return the (zipped) size actulay stored into the file. or -1 if failed.
Documentation generated by lqian@lqian-sun on Wed Jul 14 09:36:10 EDT 1999 | Kdoc |