20 static Rast3d_paramType *param;
55 int *useCompressionDefault,
int *doCompression,
56 int *usePrecisionDefault,
int *precision,
57 int *useDimensionDefault,
int *tileX,
58 int *tileY,
int *tileZ)
61 *useTypeDefault = *useCompressionDefault = 0;
62 *usePrecisionDefault = *useDimensionDefault = 0;
66 if (strcmp(param->type->answer,
"double") == 0)
68 else if (strcmp(param->type->answer,
"float") == 0)
77 if (strcmp(param->precision->answer,
"default") != 0) {
78 if (strcmp(param->precision->answer,
"max") == 0)
80 else if ((sscanf(param->precision->answer,
"%d", precision) != 1) ||
83 _(
"Rast3d_get_standard3d_params: precision value invalid"));
88 *usePrecisionDefault = 1;
90 if (strcmp(param->compression->answer,
"default") != 0) {
91 if (strcmp(param->compression->answer,
"zip") == 0)
97 *useCompressionDefault = 1;
101 if (strcmp(param->dimension->answer,
"default") != 0) {
102 if (sscanf(param->dimension->answer,
"%dx%dx%d", tileX, tileY, tileZ) !=
105 "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)
struct Option * G_define_standard_option(int)
Create standardised Option structure.
struct Option * G_define_option(void)
Initializes an Option struct.
char * G_store(const char *)
Copy string to allocated memory.
void Rast3d_free(void *)
Same as free (ptr).
void Rast3d_get_tile_dimension(int *, int *, int *)
get Tile Dimension
int Rast3d_get_file_type(void)
get G3d file type
void Rast3d_get_compression_mode(int *, int *)
Gets compression mode.
void Rast3d_init_defaults(void)
Initializes the default values described in RASTER3D Defaults. Applications have to use this function...
void Rast3d_error(const char *,...) __attribute__((format(printf
void * Rast3d_malloc(int)
Same as malloc (nBytes), except that in case of error Rast3d_error() is invoked.
@ G_OPT_R3_TILE_DIMENSION
unsigned short compression
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)
void Rast3d_set_standard3d_input_params(void)
Initializes a parameter structure for the subset of command line arguments which lets the user overwr...
char * Rast3d_get_window_params(void)
void Rast3d_set_window_params(void)
#define RASTER3D_COMPRESSION
#define RASTER3D_NO_COMPRESSION
#define RASTER3D_WINDOW_ELEMENT
Structure that stores option information.