GRASS 8 Programmer's Manual 8.6.0dev(2026)-1d1e47ad9d
Loading...
Searching...
No Matches
R.h
Go to the documentation of this file.
1#include <grass/config.h>
2#include <grass/gis.h>
3
4#include <gdal.h>
5
6#define XDR_FLOAT_NBYTES 4
7#define XDR_DOUBLE_NBYTES 8
8#define NULL_ROWS_INMEM 8
9
10/* if short is 16 bits, then
11 * short will allow 32767 cols
12 * unsigned short will allow 65536 cols
13 * use int if you need more columns (but this will take more memory).
14 *
15 */
16typedef int COLUMN_MAPPING;
17
28
30 int, void *, int, int, GDALDataType, int,
31 int);
32
33struct tileinfo /* Information for tiles */
34{
35 char *name; /* Name of open file */
36 char *mapset; /* Mapset of open file */
37 struct Cell_head cellhd; /* Cell header */
38 struct ilist *clist; /* columns inside current region */
39};
40
41struct R_vrt {
44 struct ilist *tlist;
45};
46
47struct fileinfo /* Information for opened cell files */
48{
49 int open_mode; /* see defines below */
50 struct Cell_head cellhd; /* Cell header */
51 struct Reclass reclass; /* Table reclass */
52 struct Cell_stats statf; /* Cell stats */
53 struct Range range; /* Range structure */
54 struct FPRange fp_range; /* float Range structure */
56 int reclass_flag; /* Automatic reclass flag */
57 off_t *row_ptr; /* File row addresses */
58 COLUMN_MAPPING *col_map; /* Data to window col mapping */
59 double C1, C2; /* Data to window row constants */
60 int cur_row; /* Current data row in memory */
61 int null_cur_row; /* Current null row in memory */
62 int cur_nbytes; /* nbytes per cell for current row */
63 unsigned char *data; /* Decompressed data buffer */
64 int null_fd; /* Null bitmap fd */
65 unsigned char *null_bits; /* Null bitmap buffer */
66 int nbytes; /* bytes per cell */
67 RASTER_MAP_TYPE map_type; /* type: int, float or double map */
68 char *temp_name; /* Temporary name for NEW files */
69 char *null_temp_name; /* Temporary name for NEW NULL files */
70 int null_file_exists; /* for existing raster maps */
71 char *name; /* Name of open file */
72 char *mapset; /* Mapset of open file */
73 int io_error; /* io error warning given */
74 struct Quant quant;
75 struct GDAL_link *gdal;
76 int data_fd; /* Raster data fd */
77 off_t *null_row_ptr; /* Null file row addresses */
78 struct R_vrt *vrt;
79};
80
81struct R__ /* Structure of library globals */
82{
83 RASTER_MAP_TYPE fp_type; /* type for writing floating maps */
84 int mask_fd; /* File descriptor for automatic mask */
85 int auto_mask; /* Flag denoting automatic masking */
87 int nbytes;
90 int window_set; /* Flag: window set? */
91 int split_window; /* Separate windows for input and output */
92 struct Cell_head rd_window; /* Window used for input */
93 struct Cell_head wr_window; /* Window used for output */
94
97};
98
99extern struct R__ R__; /* allocated in init */
100
101#define OPEN_OLD 1
102#define OPEN_NEW_COMPRESSED 2
103#define OPEN_NEW_UNCOMPRESSED 3
int COLUMN_MAPPING
Definition R.h:16
CPLErr Rast_gdal_raster_IO(GDALRasterBandH, GDALRWFlag, int, int, int, int, void *, int, int, GDALDataType, int, int)
Input/output function for GDAL links.
Definition gdal.c:427
2D/3D raster map header (used also for region)
Definition gis.h:446
Definition raster.h:80
Definition R.h:82
int compress_nulls
Definition R.h:89
struct fileinfo * fileinfo
Definition R.h:96
int auto_mask
Definition R.h:85
int compression_type
Definition R.h:88
int window_set
Definition R.h:90
int want_histogram
Definition R.h:86
int fileinfo_count
Definition R.h:95
RASTER_MAP_TYPE fp_type
Definition R.h:83
int nbytes
Definition R.h:87
int split_window
Definition R.h:91
int mask_fd
Definition R.h:84
struct Cell_head wr_window
Definition R.h:93
struct Cell_head rd_window
Definition R.h:92
Definition R.h:41
struct tileinfo * tileinfo
Definition R.h:43
struct ilist * tlist
Definition R.h:44
int tilecount
Definition R.h:42
Definition R.h:48
off_t * row_ptr
Definition R.h:57
int data_fd
Definition R.h:76
char * mapset
Definition R.h:72
struct Quant quant
Definition R.h:74
RASTER_MAP_TYPE map_type
Definition R.h:67
int cur_nbytes
Definition R.h:62
int want_histogram
Definition R.h:55
unsigned char * null_bits
Definition R.h:65
struct R_vrt * vrt
Definition R.h:78
struct FPRange fp_range
Definition R.h:54
int null_fd
Definition R.h:64
struct Cell_head cellhd
Definition R.h:50
COLUMN_MAPPING * col_map
Definition R.h:58
off_t * null_row_ptr
Definition R.h:77
struct Reclass reclass
Definition R.h:51
int cur_row
Definition R.h:60
int reclass_flag
Definition R.h:56
struct GDAL_link * gdal
Definition R.h:75
int io_error
Definition R.h:73
int open_mode
Definition R.h:49
int null_file_exists
Definition R.h:70
unsigned char * data
Definition R.h:63
char * name
Definition R.h:71
char * temp_name
Definition R.h:68
struct Cell_stats statf
Definition R.h:52
double C2
Definition R.h:59
double C1
Definition R.h:59
int null_cur_row
Definition R.h:61
char * null_temp_name
Definition R.h:69
struct Range range
Definition R.h:53
int nbytes
Definition R.h:66
List of integers.
Definition gis.h:715
Definition R.h:34
struct Cell_head cellhd
Definition R.h:37
char * name
Definition R.h:35
struct ilist * clist
Definition R.h:38
char * mapset
Definition R.h:36