GRASS GIS 7 Programmer's Manual  7.5.svn(2017)-r71769
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
open2.c File Reference
#include <grass/gis.h>
#include <grass/raster3d.h>
Include dependency graph for open2.c:

Go to the source code of this file.

Functions

void * Rast3d_open_new_param (const char *name, int typeIntern, int cache, RASTER3D_Region *region, int type, int compression, int precision, int tileX, int tileY, int tileZ)
 Opens new g3d-file with name in the current mapset. Tiles are stored in memory with typeIntern which must be one of FCELL_TYPE, DCELL_TYPE, or RASTER3D_TILE_SAME_AS_FILE. cache specifies the cache-mode used and must be either RASTER3D_NO_CACHE, RASTER3D_USE_CACHE_DEFAULT, RASTER3D_USE_CACHE_X, RASTER3D_USE_CACHE_Y, RASTER3D_USE_CACHE_Z, RASTER3D_USE_CACHE_XY, RASTER3D_USE_CACHE_XZ, RASTER3D_USE_CACHE_YZ, RASTER3D_USE_CACHE_XYZ, the result of Rast3d_cache_size_encode () (cf.{g3d:G3d.cacheSizeEncode}), or any positive integer which specifies the number of tiles buffered in the cache. region specifies the 3d region. The map is created using the type which must be of FCELL_TYPE or DCELL_TYPE. The methods for compression can be specified LZW or RLE. The digits of the floating point mantissa can be specified. In case of FCELL_TYPE 0-23 and 0-52 in case of DCELL_TYPE. The number cells in X, Y and Z direction defines the size of each tile. Returns a pointer to the cell structure ... if successful, NULL ... otherwise. More...
 
void * Rast3d_open_new_opt_tile_size (const char *name, int cache, RASTER3D_Region *region, int type, int maxSize)
 Opens new g3d-file with name in the current mapset. This method tries to compute optimal tile size based on the number of rows, cols and depths and the maximum allowed tile size in KB. Tiles are stored in memory using RASTER3D_TILE_SAME_AS_FILE method. cache specifies the cache-mode used and must be either RASTER3D_NO_CACHE, RASTER3D_USE_CACHE_DEFAULT, RASTER3D_USE_CACHE_X, RASTER3D_USE_CACHE_Y, RASTER3D_USE_CACHE_Z, RASTER3D_USE_CACHE_XY, RASTER3D_USE_CACHE_XZ, RASTER3D_USE_CACHE_YZ, RASTER3D_USE_CACHE_XYZ, the result of Rast3d_cache_size_encode () (cf.{g3d:G3d.cacheSizeEncode}), or any positive integer which specifies the number of tiles buffered in the cache. region specifies the 3d region. The map is created using the type which must be of FCELL_TYPE or DCELL_TYPE. Returns a pointer to the cell structure ... if successful, NULL ... otherwise. More...
 

Function Documentation

void* Rast3d_open_new_opt_tile_size ( const char *  name,
int  cache,
RASTER3D_Region region,
int  type,
int  maxSize 
)

Opens new g3d-file with name in the current mapset. This method tries to compute optimal tile size based on the number of rows, cols and depths and the maximum allowed tile size in KB. Tiles are stored in memory using RASTER3D_TILE_SAME_AS_FILE method. cache specifies the cache-mode used and must be either RASTER3D_NO_CACHE, RASTER3D_USE_CACHE_DEFAULT, RASTER3D_USE_CACHE_X, RASTER3D_USE_CACHE_Y, RASTER3D_USE_CACHE_Z, RASTER3D_USE_CACHE_XY, RASTER3D_USE_CACHE_XZ, RASTER3D_USE_CACHE_YZ, RASTER3D_USE_CACHE_XYZ, the result of Rast3d_cache_size_encode () (cf.{g3d:G3d.cacheSizeEncode}), or any positive integer which specifies the number of tiles buffered in the cache. region specifies the 3d region. The map is created using the type which must be of FCELL_TYPE or DCELL_TYPE. Returns a pointer to the cell structure ... if successful, NULL ... otherwise.

Parameters
nameThe name of the map
cacheThe type of the caching
regionThe region of the map
typeThe type of the map (FCELL_TYPE, or DCELL_TYPE)
maxSizeThe maximum size of a tile in kilo bytes
Returns
void *

Definition at line 98 of file open2.c.

References G_debug(), Rast3d_compute_optimal_tile_dimension(), Rast3d_get_file_type(), Rast3d_get_tile_dimension(), Rast3d_init_defaults(), Rast3d_open_cell_new(), Rast3d_set_file_type(), Rast3d_set_tile_dimension(), and RASTER3D_TILE_SAME_AS_FILE.

Referenced by N_write_array_3d_to_rast3d().

void* Rast3d_open_new_param ( const char *  name,
int  typeIntern,
int  cache,
RASTER3D_Region region,
int  type,
int  compression,
int  precision,
int  tileX,
int  tileY,
int  tileZ 
)

Opens new g3d-file with name in the current mapset. Tiles are stored in memory with typeIntern which must be one of FCELL_TYPE, DCELL_TYPE, or RASTER3D_TILE_SAME_AS_FILE. cache specifies the cache-mode used and must be either RASTER3D_NO_CACHE, RASTER3D_USE_CACHE_DEFAULT, RASTER3D_USE_CACHE_X, RASTER3D_USE_CACHE_Y, RASTER3D_USE_CACHE_Z, RASTER3D_USE_CACHE_XY, RASTER3D_USE_CACHE_XZ, RASTER3D_USE_CACHE_YZ, RASTER3D_USE_CACHE_XYZ, the result of Rast3d_cache_size_encode () (cf.{g3d:G3d.cacheSizeEncode}), or any positive integer which specifies the number of tiles buffered in the cache. region specifies the 3d region. The map is created using the type which must be of FCELL_TYPE or DCELL_TYPE. The methods for compression can be specified LZW or RLE. The digits of the floating point mantissa can be specified. In case of FCELL_TYPE 0-23 and 0-52 in case of DCELL_TYPE. The number cells in X, Y and Z direction defines the size of each tile. Returns a pointer to the cell structure ... if successful, NULL ... otherwise.

Parameters
nameThe name of the map
typeInternThe internal storage type for in memory chached tiles
cacheThe type of the caching
regionThe region of the map
typeThe type of the map (FCELL_TYPE, or DCELL_TYPE)
doLzwUse the LZW compression algorithm
doRleUse the Run-Length-Encoding algroithm for compression
precisionThe precision used for the mantissa (0 - 52) or RASTER3D_MAX_PRECISION
tileXThe number of cells in X direction of a tile
tileYThe number of cells in Y direction of a tile
tileZThe number of cells in Z direction of a tile
Returns
void *

Definition at line 41 of file open2.c.

References Rast3d_get_compression_mode(), Rast3d_get_file_type(), Rast3d_get_tile_dimension(), Rast3d_init_defaults(), Rast3d_open_cell_new(), Rast3d_set_compression_mode(), Rast3d_set_file_type(), and Rast3d_set_tile_dimension().