8 #define RASTER3D_NO_DEFAULT -10 10 #define RASTER3D_COMPRESSION_DEFAULT RASTER3D_COMPRESSION 11 #define RASTER3D_PRECISION_DEFAULT RASTER3D_MAX_PRECISION 12 #define RASTER3D_CACHE_SIZE_DEFAULT 1000 13 #define RASTER3D_CACHE_SIZE_MAX_DEFAULT 16777216 14 #define RASTER3D_FILE_TYPE_DEFAULT DCELL_TYPE 15 #define RASTER3D_TILE_X_DEFAULT 16 16 #define RASTER3D_TILE_Y_DEFAULT 16 17 #define RASTER3D_TILE_Z_DEFAULT 8 18 #define RASTER3D_ERROR_FUN_DEFAULT Rast3d_skip_error 19 #define RASTER3D_UNIT_DEFAULT "none" 20 #define RASTER3D_VERTICAL_UNIT_DEFAULT U_UNKNOWN 35 #define RASTER3D_COMPRESSION_ENV_VAR_YES "RASTER3D_USE_COMPRESSION" 42 #define RASTER3D_COMPRESSION_ENV_VAR_NO "RASTER3D_NO_COMPRESSION" 44 #define RASTER3D_PRECISION_ENV_VAR "RASTER3D_PRECISION" 45 #define RASTER3D_PRECISION_ENV_VAR_MAX "RASTER3D_MAX_PRECISION" 47 #define RASTER3D_CACHE_SIZE_ENV_VAR "RASTER3D_DEFAULT_CACHE_SIZE" 48 #define RASTER3D_CACHE_SIZE_MAX_ENV_VAR "RASTER3D_MAX_CACHE_SIZE" 50 #define RASTER3D_FILE_FLOAT_ENV_VAR "RASTER3D_WRITE_FLOAT" 51 #define RASTER3D_FILE_DOUBLE_ENV_VAR "RASTER3D_WRITE_DOUBLE" 53 #define RASTER3D_TILE_DIM_X_ENV_VAR "RASTER3D_TILE_DIMENSION_X" 54 #define RASTER3D_TILE_DIM_Y_ENV_VAR "RASTER3D_TILE_DIMENSION_Y" 55 #define RASTER3D_TILE_DIM_Z_ENV_VAR "RASTER3D_TILE_DIMENSION_Z" 57 #define RASTER3D_FATAL_ERROR_ENV_VAR "RASTER3D_USE_FATAL_ERROR" 58 #define RASTER3D_PRINT_ERROR_ENV_VAR "RASTER3D_USE_PRINT_ERROR" 60 #define RASTER3D_DEFAULT_WINDOW3D "RASTER3D_DEFAULT_WINDOW3D" 130 if (doCompress !=
NULL)
132 if (precision !=
NULL)
248 (
"Rast3d_set_tile_dimension: value for tile x environment variable out of range");
252 (
"Rast3d_set_tile_dimension: value for tile y environment variable out of range");
256 (
"Rast3d_set_tile_dimension: value for tile z environment variable out of range");
307 static int firstTime = 1;
308 const char *value, *windowName;
341 (
"Rast3d_init_defaults: precision environment variable has invalid value");
346 (
"Rast3d_init_defaults: value for cache environment variable out of range");
376 (
"Rast3d_init_defaults: cache environment variable has invalid value");
380 (
"Rast3d_init_defaults: value for cache environment variable out of range");
394 (
"Rast3d_init_defaults: cache environment variable has invalid value");
398 (
"Rast3d_init_defaults: value for cache environment variable out of range");
412 (
"Rast3d_init_defaults: tile dimension x environment variable has invalid value");
416 (
"Rast3d_init_defaults: value for tile x environment variable out of range");
428 (
"Rast3d_init_defaults: tile dimension y environment variable has invalid value");
432 (
"Rast3d_init_defaults: value for tile y environment variable out of range");
444 (
"Rast3d_init_defaults: tile dimension z environment variable has invalid value");
448 (
"Rast3d_init_defaults: value for tile z environment variable out of range");
477 if (windowName ==
NULL) {
#define RASTER3D_CACHE_SIZE_ENV_VAR
#define RASTER3D_MAX_PRECISION
#define RASTER3D_ERROR_FUN_DEFAULT
#define RASTER3D_DEFAULT_WINDOW3D
#define RASTER3D_TILE_DIM_X_ENV_VAR
#define RASTER3D_COMPRESSION_ENV_VAR_NO
Name of the environmental variable specifying that compression should not be used.
void Rast3d_set_cache_size(int nTiles)
set cache size
#define RASTER3D_FILE_DOUBLE_ENV_VAR
#define RASTER3D_CACHE_SIZE_MAX_DEFAULT
#define RASTER3D_PRECISION_ENV_VAR_MAX
void Rast3d_set_cache_limit(int nBytes)
Set cache limit.
#define RASTER3D_PRECISION_ENV_VAR
#define RASTER3D_FATAL_ERROR_ENV_VAR
#define RASTER3D_PRINT_ERROR_ENV_VAR
#define RASTER3D_UNIT_DEFAULT
#define RASTER3D_COMPRESSION_ENV_VAR_YES
Name of the environmental variable specifying that compression should be used.
void Rast3d_fatal_error(const char *,...) __attribute__((format(printf
void Rast3d_set_window(RASTER3D_Region *)
Sets the default window used for every map opened later in the program. Can be used multiple times in...
#define RASTER3D_TILE_X_DEFAULT
#define RASTER3D_TILE_Z_DEFAULT
void Rast3d_set_file_type(int type)
set G3d file type
void Rast3d_set_compression_mode(int doCompress, int precision)
set compression mode
#define RASTER3D_VERTICAL_UNIT_DEFAULT
void(* g3d_error_fun)(const char *)
#define RASTER3D_TILE_DIM_Z_ENV_VAR
#define U_UNDEFINED
List of units.
int Rast3d_read_window(RASTER3D_Region *, const char *)
Reads window from the file specified by windowName. The name is converted by the rules defined in win...
#define RASTER3D_NO_COMPRESSION
void Rast3d_fatal_error_noargs(const char *) __attribute__((noreturn))
int Rast3d_get_cache_size()
get cache size
#define RASTER3D_TILE_Y_DEFAULT
#define RASTER3D_CACHE_SIZE_MAX_ENV_VAR
void Rast3d_init_defaults(void)
Initializes the default values described in RASTER3D Defaults. Applications have to use this function...
#define RASTER3D_TILE_DIM_Y_ENV_VAR
#define RASTER3D_COMPRESSION_DEFAULT
#define RASTER3D_PRECISION_DEFAULT
void Rast3d_get_compression_mode(int *doCompress, int *precision)
Gets compression mode.
int g3d_tile_dimension[3]
#define RASTER3D_FILE_TYPE_DEFAULT
void Rast3d_set_tile_dimension(int tileX, int tileY, int tileZ)
set Tile Dimension
#define RASTER3D_CACHE_SIZE_DEFAULT
int g3d_vertical_unit_default
char * G_store(const char *)
Copy string to allocated memory.
void Rast3d_set_error_fun(void(*fun)(const char *))
set error function
void Rast3d_print_error(const char *)
Prints error message.
#define RASTER3D_MAP_VERSION
int Rast3d_get_cache_limit()
Get cache limit.
#define RASTER3D_NO_DEFAULT
void Rast3d_get_tile_dimension(int *tileX, int *tileY, int *tileZ)
get Tile Dimension
#define RASTER3D_FILE_FLOAT_ENV_VAR
#define RASTER3D_COMPRESSION
char * Rast3d_get_window_params(void)
int Rast3d_get_file_type()
get G3d file type