GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
g3dopen.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/types.h>
#include <unistd.h>
#include <grass/G3d.h>
#include <grass/glocale.h>
#include "G3d_intern.h"
Include dependency graph for g3dopen.c:

Go to the source code of this file.

Functions

void * G3d_openCellOldNoHeader (const char *name, const char *mapset)
 
void * G3d_openCellOld (const char *name, const char *mapset, G3D_Region *window, int typeIntern, int cache)
 Opens existing g3d-file name in mapset. Tiles are stored in memory with type which must be any of FCELL_TYPE, DCELL_TYPE, or G3D_TILE_SAME_AS_FILE. cache specifies the cache-mode used and must be either G3D_NO_CACHE, G3D_USE_CACHE_DEFAULT, G3D_USE_CACHE_X, G3D_USE_CACHE_Y, G3D_USE_CACHE_Z, G3D_USE_CACHE_XY, G3D_USE_CACHE_XZ, G3D_USE_CACHE_YZ, G3D_USE_CACHE_XYZ, the result of G3d_cacheSizeEncode () (cf.{g3d:G3d.cacheSizeEncode}), or any positive integer which specifies the number of tiles buffered in the cache. window sets the window-region for the map. It is either a pointer to a window structure or G3D_DEFAULT_WINDOW, which uses the window stored at initialization time or set via G3d_setWindow () (cf.{g3d:G3d.setWindow}). To modify the window for the map after it has already been opened use G3d_setWindowMap () (cf.{g3d:G3d.setWindowMap}). Returns a pointer to the cell structure ... if successful, NULL ... otherwise. More...
 
void * G3d_openCellNew (const char *name, int typeIntern, int cache, G3D_Region *region)
 Opens new g3d-file with name in the current mapset. Tiles are stored in memory with type which must be one of FCELL_TYPE, DCELL_TYPE, or G3D_TILE_SAME_AS_FILE. cache specifies the cache-mode used and must be either G3D_NO_CACHE, G3D_USE_CACHE_DEFAULT, G3D_USE_CACHE_X, G3D_USE_CACHE_Y, G3D_USE_CACHE_Z, G3D_USE_CACHE_XY, G3D_USE_CACHE_XZ, G3D_USE_CACHE_YZ, G3D_USE_CACHE_XYZ, the result of G3d_cacheSizeEncode () (cf.{g3d:G3d.cacheSizeEncode}), or any positive integer which specifies the number of tiles buffered in the cache. region specifies the 3d region. Returns a pointer to the cell structure ... if successful, NULL ... otherwise. More...
 

Function Documentation

void* G3d_openCellNew ( const char *  name,
int  typeIntern,
int  cache,
G3D_Region *  region 
)

Opens new g3d-file with name in the current mapset. Tiles are stored in memory with type which must be one of FCELL_TYPE, DCELL_TYPE, or G3D_TILE_SAME_AS_FILE. cache specifies the cache-mode used and must be either G3D_NO_CACHE, G3D_USE_CACHE_DEFAULT, G3D_USE_CACHE_X, G3D_USE_CACHE_Y, G3D_USE_CACHE_Z, G3D_USE_CACHE_XY, G3D_USE_CACHE_XZ, G3D_USE_CACHE_YZ, G3D_USE_CACHE_XYZ, the result of G3d_cacheSizeEncode () (cf.{g3d:G3d.cacheSizeEncode}), or any positive integer which specifies the number of tiles buffered in the cache. region specifies the 3d region. Returns a pointer to the cell structure ... if successful, NULL ... otherwise.

Parameters
name
type
cache
region
Returns
void *

Definition at line 213 of file g3dopen.c.

References compression, G3d_adjustRegion(), g3d_do_compression, g3d_do_lzw_compression, g3d_do_rle_compression, G3d_error(), g3d_file_type, G3d_fillHeader(), G3d_getNearestNeighborFunPtr(), G3D_HAS_INDEX, G3d_initDefaults(), G3d_makeMapsetMapDirectory(), G3d_malloc(), G3d_maskOff(), G3d_maskOpenOld(), G3D_MIN, g3d_precision, G3d_range_init(), G3d_regionCopy(), g3d_tile_dimension, g3d_unit_default, G3D_USE_XDR, G3D_WRITE_DATA, G3d_writeInts(), G__name_is_fully_qualified(), G_mapset(), G_store(), G_tempfile(), NULL, xmapset, and xname.

Referenced by G3d_changePrecision(), G3d_changeType(), G3d_makeAlignedVolumeFile(), G3d_openNewParam(), G3d_retile(), and N_write_array_3d_to_rast3d().

void* G3d_openCellOld ( const char *  name,
const char *  mapset,
G3D_Region *  window,
int  typeIntern,
int  cache 
)

Opens existing g3d-file name in mapset. Tiles are stored in memory with type which must be any of FCELL_TYPE, DCELL_TYPE, or G3D_TILE_SAME_AS_FILE. cache specifies the cache-mode used and must be either G3D_NO_CACHE, G3D_USE_CACHE_DEFAULT, G3D_USE_CACHE_X, G3D_USE_CACHE_Y, G3D_USE_CACHE_Z, G3D_USE_CACHE_XY, G3D_USE_CACHE_XZ, G3D_USE_CACHE_YZ, G3D_USE_CACHE_XYZ, the result of G3d_cacheSizeEncode () (cf.{g3d:G3d.cacheSizeEncode}), or any positive integer which specifies the number of tiles buffered in the cache. window sets the window-region for the map. It is either a pointer to a window structure or G3D_DEFAULT_WINDOW, which uses the window stored at initialization time or set via G3d_setWindow () (cf.{g3d:G3d.setWindow}). To modify the window for the map after it has already been opened use G3d_setWindowMap () (cf.{g3d:G3d.setWindowMap}). Returns a pointer to the cell structure ... if successful, NULL ... otherwise.

Parameters
name
mapset
window
type
cache
Returns
void *

Definition at line 85 of file g3dopen.c.

References dialogs::cols, compression, G3d_adjustRegion(), G3d_error(), G3d_fatalError(), G3d_fillHeader(), G3d_free(), G3d_getNearestNeighborFunPtr(), G3d_longDecode(), G3d_malloc(), G3d_openCellOldNoHeader(), G3D_READ_DATA, G3d_readHeader(), G3d_readInts(), G3d_regionCopy(), G3d_windowPtr(), NULL, dialogs::type, and dialogs::unit.

Referenced by G3d_compareFiles(), G3d_maskOpenOld(), N_read_rast3d_to_array_3d(), and open_g3d_file().

void* G3d_openCellOldNoHeader ( const char *  name,
const char *  mapset 
)