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
*/
16
typedef
int
COLUMN_MAPPING
;
17
18
struct
GDAL_link
{
19
char
*
filename
;
20
int
band_num
;
21
DCELL
null_val
;
22
int
hflip
;
23
int
vflip
;
24
GDALDatasetH
data
;
25
GDALRasterBandH
band
;
26
GDALDataType
type
;
27
};
28
29
extern
CPLErr
Rast_gdal_raster_IO
(
GDALRasterBandH
,
GDALRWFlag
,
int
,
int
,
int
,
30
int
,
void
*,
int
,
int
,
GDALDataType
,
int
,
31
int
);
32
33
struct
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
41
struct
R_vrt
{
42
int
tilecount
;
43
struct
tileinfo
*
tileinfo
;
44
struct
ilist
*
tlist
;
45
};
46
47
struct
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 */
55
int
want_histogram
;
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
81
struct
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 */
86
int
want_histogram
;
87
int
nbytes
;
88
int
compression_type
;
89
int
compress_nulls
;
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
95
int
fileinfo_count
;
96
struct
fileinfo
*
fileinfo
;
97
};
98
99
extern
struct
R__
R__
;
/* allocated in init */
100
101
#define OPEN_OLD 1
102
#define OPEN_NEW_COMPRESSED 2
103
#define OPEN_NEW_UNCOMPRESSED 3
COLUMN_MAPPING
int COLUMN_MAPPING
Definition
R.h:16
Rast_gdal_raster_IO
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
AMI_STREAM
Definition
ami_stream.h:153
config.h
gis.h
Cell_head
2D/3D raster map header (used also for region)
Definition
gis.h:446
Cell_stats
Definition
raster.h:181
FPRange
Definition
raster.h:218
GDAL_link
Definition
R.h:18
GDAL_link::band
GDALRasterBandH band
Definition
R.h:25
GDAL_link::null_val
DCELL null_val
Definition
R.h:21
GDAL_link::data
GDALDatasetH data
Definition
R.h:24
GDAL_link::vflip
int vflip
Definition
R.h:23
GDAL_link::filename
char * filename
Definition
R.h:19
GDAL_link::type
GDALDataType type
Definition
R.h:26
GDAL_link::hflip
int hflip
Definition
R.h:22
GDAL_link::band_num
int band_num
Definition
R.h:20
Quant
Definition
raster.h:80
R__
Definition
R.h:82
R__::compress_nulls
int compress_nulls
Definition
R.h:89
R__::fileinfo
struct fileinfo * fileinfo
Definition
R.h:96
R__::auto_mask
int auto_mask
Definition
R.h:85
R__::compression_type
int compression_type
Definition
R.h:88
R__::window_set
int window_set
Definition
R.h:90
R__::want_histogram
int want_histogram
Definition
R.h:86
R__::fileinfo_count
int fileinfo_count
Definition
R.h:95
R__::fp_type
RASTER_MAP_TYPE fp_type
Definition
R.h:83
R__::nbytes
int nbytes
Definition
R.h:87
R__::split_window
int split_window
Definition
R.h:91
R__::mask_fd
int mask_fd
Definition
R.h:84
R__::wr_window
struct Cell_head wr_window
Definition
R.h:93
R__::rd_window
struct Cell_head rd_window
Definition
R.h:92
R_vrt
Definition
R.h:41
R_vrt::tileinfo
struct tileinfo * tileinfo
Definition
R.h:43
R_vrt::tlist
struct ilist * tlist
Definition
R.h:44
R_vrt::tilecount
int tilecount
Definition
R.h:42
Range
Definition
raster.h:211
Reclass
Definition
raster.h:31
fileinfo
Definition
R.h:48
fileinfo::row_ptr
off_t * row_ptr
Definition
R.h:57
fileinfo::data_fd
int data_fd
Definition
R.h:76
fileinfo::mapset
char * mapset
Definition
R.h:72
fileinfo::quant
struct Quant quant
Definition
R.h:74
fileinfo::map_type
RASTER_MAP_TYPE map_type
Definition
R.h:67
fileinfo::cur_nbytes
int cur_nbytes
Definition
R.h:62
fileinfo::want_histogram
int want_histogram
Definition
R.h:55
fileinfo::null_bits
unsigned char * null_bits
Definition
R.h:65
fileinfo::vrt
struct R_vrt * vrt
Definition
R.h:78
fileinfo::fp_range
struct FPRange fp_range
Definition
R.h:54
fileinfo::null_fd
int null_fd
Definition
R.h:64
fileinfo::cellhd
struct Cell_head cellhd
Definition
R.h:50
fileinfo::col_map
COLUMN_MAPPING * col_map
Definition
R.h:58
fileinfo::null_row_ptr
off_t * null_row_ptr
Definition
R.h:77
fileinfo::reclass
struct Reclass reclass
Definition
R.h:51
fileinfo::cur_row
int cur_row
Definition
R.h:60
fileinfo::reclass_flag
int reclass_flag
Definition
R.h:56
fileinfo::gdal
struct GDAL_link * gdal
Definition
R.h:75
fileinfo::io_error
int io_error
Definition
R.h:73
fileinfo::open_mode
int open_mode
Definition
R.h:49
fileinfo::null_file_exists
int null_file_exists
Definition
R.h:70
fileinfo::data
unsigned char * data
Definition
R.h:63
fileinfo::name
char * name
Definition
R.h:71
fileinfo::temp_name
char * temp_name
Definition
R.h:68
fileinfo::statf
struct Cell_stats statf
Definition
R.h:52
fileinfo::C2
double C2
Definition
R.h:59
fileinfo::C1
double C1
Definition
R.h:59
fileinfo::null_cur_row
int null_cur_row
Definition
R.h:61
fileinfo::null_temp_name
char * null_temp_name
Definition
R.h:69
fileinfo::range
struct Range range
Definition
R.h:53
fileinfo::nbytes
int nbytes
Definition
R.h:66
ilist
List of integers.
Definition
gis.h:715
tileinfo
Definition
R.h:34
tileinfo::cellhd
struct Cell_head cellhd
Definition
R.h:37
tileinfo::name
char * name
Definition
R.h:35
tileinfo::clist
struct ilist * clist
Definition
R.h:38
tileinfo::mapset
char * mapset
Definition
R.h:36
lib
raster
R.h
Generated on Fri Apr 3 2026 06:59:56 for GRASS 8 Programmer's Manual by
1.9.8