21 static Rast3d_paramType *param;
57 int *useCompressionDefault,
int *doCompression,
58 int *usePrecisionDefault,
int *precision,
59 int *useDimensionDefault,
int *tileX,
int *tileY,
63 *useTypeDefault = *useCompressionDefault = 0;
64 *usePrecisionDefault = *useDimensionDefault = 0;
68 if (strcmp(param->type->answer,
"double") == 0)
70 else if (strcmp(param->type->answer,
"float") == 0)
79 if (strcmp(param->precision->answer,
"default") != 0) {
80 if (strcmp(param->precision->answer,
"max") == 0)
82 else if ((sscanf(param->precision->answer,
"%d", precision) != 1) ||
84 Rast3d_error(
_(
"Rast3d_get_standard3d_params: precision value invalid"));
89 *usePrecisionDefault = 1;
92 if (strcmp(param->compression->answer,
"default") != 0) {
93 if (strcmp(param->compression->answer,
"zip") == 0)
98 *useCompressionDefault = 1;
102 if (strcmp(param->dimension->answer,
"default") != 0) {
103 if (sscanf(param->dimension->answer,
"%dx%dx%d",
104 tileX, tileY, tileZ) != 3) {
105 Rast3d_error(
_(
"Rast3d_get_standard3d_params: tile dimension value invalid"));
110 *useDimensionDefault = 1;
124 windowParam->
key =
"region3";
129 windowParam->
description =
_(
"Window replacing the default");
136 if (windowParam ==
NULL)
char * Rast3d_get_window_params(void)
void Rast3d_init_defaults(void)
Initializes the default values described in RASTER3D Defaults. Applications have to use this function...
unsigned short compression
void Rast3d_set_window_params(void)
void * Rast3d_malloc(int)
Same as malloc (nBytes), except that in case of error Rast3d_error() is invoked.
#define RASTER3D_WINDOW_ELEMENT
void Rast3d_error(const char *,...) __attribute__((format(printf
struct Option * G_define_standard_option(int)
Create standardised Option structure.
void Rast3d_get_compression_mode(int *, int *)
Gets compression mode.
int Rast3d_get_standard3d_params(int *useTypeDefault, int *type, int *useCompressionDefault, int *doCompression, int *usePrecisionDefault, int *precision, int *useDimensionDefault, int *tileX, int *tileY, int *tileZ)
struct Option * G_define_option(void)
Initializes an Option struct.
#define RASTER3D_NO_COMPRESSION
void Rast3d_set_standard3d_input_params()
Initializes a parameter structure for the subset of command line arguments which lets the user overwr...
int Rast3d_get_file_type(void)
get G3d file type
void Rast3d_get_tile_dimension(int *, int *, int *)
get Tile Dimension
Structure that stores option information.
char * G_store(const char *)
Copy string to allocated memory.
#define RASTER3D_COMPRESSION
void Rast3d_free(void *)
Same as free (ptr).