12 static int Rast3d__readWindow(
struct Key_Value *windowKeys,
int *proj,
13 int *zone,
double *north,
double *south,
14 double *east,
double *west,
double *top,
15 double *bottom,
int *rows,
int *cols,
int *depths,
16 double *ew_res,
double *ns_res,
double *tb_res)
48 Rast3d_error(
"Rast3d_readWriteWindow: error writing window");
56 static void Rast3d_getFullWindowPath(
char *
path,
const char *windowName)
60 if (windowName ==
NULL) {
65 while (*windowName ==
' ')
69 sprintf(
path,
"%s", windowName);
139 if (windowName ==
NULL) {
158 Rast3d_getFullWindowPath(
path, windowName);
167 if (!Rast3d__readWindow(
168 windowKeys, &(window->
proj), &(window->
zone), &(window->
north),
174 "Rast3d_read_window: error extracting window key(s) of file %s",
int G_name_is_fully_qualified(const char *, char *, char *)
Check if map name is fully qualified (map @ mapset)
void G_warning(const char *,...) __attribute__((format(printf
char * G_file_name(char *, const char *, const char *, const char *)
Builds full path names to GIS data files.
void G_free_key_value(struct Key_Value *)
Free allocated Key_Value structure.
const char * G_mapset(void)
Get current mapset name.
struct Key_Value * G_read_key_value_file(const char *)
Read key/values pairs from file.
void G_get_window(struct Cell_head *)
Get the current region.
int Rast3d_key_get_int(struct Key_Value *, const char *, int *)
void Rast3d_set_window_params(void)
int Rast3d_key_get_double(struct Key_Value *, const char *, double *)
void Rast3d_error(const char *,...) __attribute__((format(printf
#define RASTER3D_WINDOW_DATABASE
#define RASTER3D_WINDOW_ELEMENT
#define RASTER3D_REGION_COLS
#define RASTER3D_REGION_EAST
#define RASTER3D_REGION_PROJ
#define RASTER3D_REGION_NORTH
#define RASTER3D_REGION_DEPTHS
#define RASTER3D_REGION_WEST
#define RASTER3D_REGION_NSRES
#define RASTER3D_REGION_ZONE
#define RASTER3D_REGION_ROWS
#define RASTER3D_REGION_BOTTOM
#define RASTER3D_REGION_TBRES
#define RASTER3D_REGION_SOUTH
#define RASTER3D_REGION_EWRES
#define RASTER3D_REGION_TOP
2D/3D raster map header (used also for region)
int cols3
Number of columns for 3D data.
double north
Extent coordinates (north)
double bottom
Extent coordinates (bottom) - 3D data.
int zone
Projection zone (UTM)
int depths
number of depths for 3D data
double east
Extent coordinates (east)
double ew_res3
Resolution - east to west cell size for 3D data.
double ns_res3
Resolution - north to south cell size for 3D data.
double top
Extent coordinates (top) - 3D data.
int rows3
Number of rows for 3D data.
double south
Extent coordinates (south)
double tb_res
Resolution - top to bottom cell size for 3D data.
double west
Extent coordinates (west)
int Rast3d_read_window(RASTER3D_Region *window, const char *windowName)
Reads window from the file specified by windowName. The name is converted by the rules defined in win...
void Rast3d_use_window_params(void)
Writes window to the file specified by windowName. The name is converted by the rules defined in wind...