GRASS Programmer's Manual
6.5.svn(2014)-r66266
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
G.h
Go to the documentation of this file.
1
#include <grass/config.h>
2
#include <grass/gis.h>
3
#include <rpc/types.h>
4
#include <rpc/xdr.h>
5
#ifdef HAVE_GDAL
6
#include <gdal.h>
7
#endif
8
9
#define XDR_FLOAT_NBYTES 4
10
#define XDR_DOUBLE_NBYTES 8
11
#define NULL_ROWS_INMEM 8
12
13
/* if short is 16 bits, then
14
* short will allow 32767 cols
15
* unsigned short will allow 65536 cols
16
* use int if you need more columns (but this will take more memory).
17
*
18
*/
19
typedef
int
COLUMN_MAPPING
;
20
21
struct
GDAL_link
22
{
23
char
*
filename
;
24
int
band_num
;
25
DCELL
null_val
;
26
#ifdef HAVE_GDAL
27
GDALDatasetH
data
;
28
GDALRasterBandH band;
29
GDALDataType
type
;
30
#endif
31
};
32
33
#ifdef HAVE_GDAL
34
extern
CPLErr G_gdal_raster_IO(
35
GDALRasterBandH, GDALRWFlag,
36
int
,
int
,
int
,
int
,
37
void
*,
int
,
int
, GDALDataType,
38
int
,
int
);
39
#endif
40
41
struct
fileinfo
/* Information for opened cell files */
42
{
43
int
open_mode
;
/* see defines below */
44
struct
Cell_head
cellhd
;
/* Cell header */
45
struct
Reclass
reclass
;
/* Table reclass */
46
struct
Cell_stats
statf
;
/* Cell stats */
47
struct
Range
range
;
/* Range structure */
48
struct
FPRange
fp_range
;
/* float Range structure */
49
int
want_histogram
;
50
int
reclass_flag
;
/* Automatic reclass flag */
51
off_t *
row_ptr
;
/* File row addresses */
52
COLUMN_MAPPING
*
col_map
;
/* Data to window col mapping */
53
double
C1
,
C2
;
/* Data to window row constants */
54
int
cur_row
;
/* Current data row in memory */
55
int
null_cur_row
;
/* Current null row in memory */
56
int
cur_nbytes
;
/* nbytes per cell for current row */
57
unsigned
char
*
data
;
/* Decompressed data buffer */
58
int
nbytes
;
/* bytes per cell */
59
RASTER_MAP_TYPE
map_type
;
/* type: int, float or double map */
60
char
*
temp_name
;
/* Temporary name for NEW files */
61
char
*
null_temp_name
;
/* Temporary name for NEW NULL files */
62
int
null_file_exists
;
/* for existing raster maps */
63
char
*
name
;
/* Name of open file */
64
char
*
mapset
;
/* Mapset of open file */
65
int
io_error
;
/* io error warning given */
66
XDR
xdrstream
;
/* xdr stream for reading fp */
67
unsigned
char
*
NULL_ROWS
[
NULL_ROWS_INMEM
];
68
unsigned
char
*
null_work_buf
;
/* data buffer for reading null rows */
69
int
min_null_row
;
/* Minimum row null row number in memory */
70
struct
Quant
quant
;
71
struct
GDAL_link
*
gdal
;
72
};
73
74
struct
G__
/* Structure of library globals */
75
{
76
int
fp_nbytes
;
/* size of cell in floating maps */
77
RASTER_MAP_TYPE
fp_type
;
/* type for writing floating maps */
78
struct
Cell_head
window
;
/* Contains the current window */
79
int
window_set
;
/* Flag: window set? */
80
int
mask_fd
;
/* File descriptor for automatic mask */
81
int
auto_mask
;
/* Flag denoting automatic masking */
82
CELL *
mask_buf
;
83
char
*
null_buf
;
/* buffer for reading null rows */
84
CELL *
temp_buf
;
85
unsigned
char
*
compressed_buf
;
/* Pre/post compressed data buffer */
86
int
compressed_buf_size
;
/* sizeof compressed_buf */
87
unsigned
char
*
work_buf
;
/* work data buffer */
88
int
work_buf_size
;
/* sizeof work_buf */
89
int
null_buf_size
;
/* sizeof null_buf */
90
int
mask_buf_size
;
/* sizeof mask_buf */
91
int
temp_buf_size
;
/* sizeof temp_buf */
92
int
want_histogram
;
93
94
int
fileinfo_count
;
95
struct
fileinfo
*
fileinfo
;
96
};
97
98
extern
struct
G__
G__
;
/* allocated in gisinit */
99
100
#define OPEN_OLD 1
101
#define OPEN_NEW_COMPRESSED 2
102
#define OPEN_NEW_UNCOMPRESSED 3
103
#define OPEN_NEW_RANDOM 4
G__::mask_fd
int mask_fd
Definition:
G.h:80
G__::want_histogram
int want_histogram
Definition:
G.h:92
fileinfo::nbytes
int nbytes
Definition:
G.h:58
G__::auto_mask
int auto_mask
Definition:
G.h:81
G__::work_buf
unsigned char * work_buf
Definition:
G.h:87
fileinfo::want_histogram
int want_histogram
Definition:
G.h:49
G__::null_buf_size
int null_buf_size
Definition:
G.h:89
fileinfo::map_type
RASTER_MAP_TYPE map_type
Definition:
G.h:59
G__::null_buf
char * null_buf
Definition:
G.h:83
fileinfo::name
char * name
Definition:
G.h:63
fileinfo::row_ptr
off_t * row_ptr
Definition:
G.h:51
fileinfo::io_error
int io_error
Definition:
G.h:65
G__::fileinfo_count
int fileinfo_count
Definition:
G.h:94
G__::mask_buf_size
int mask_buf_size
Definition:
G.h:90
fileinfo::null_work_buf
unsigned char * null_work_buf
Definition:
G.h:68
fileinfo::temp_name
char * temp_name
Definition:
G.h:60
G__::compressed_buf_size
int compressed_buf_size
Definition:
G.h:86
fileinfo::data
unsigned char * data
Definition:
G.h:57
GDAL_link::filename
char * filename
Definition:
G.h:23
GDAL_link::band_num
int band_num
Definition:
G.h:24
fileinfo::col_map
COLUMN_MAPPING * col_map
Definition:
G.h:52
GDAL_link
Definition:
G.h:21
GDAL_link::null_val
DCELL null_val
Definition:
G.h:25
fileinfo::gdal
struct GDAL_link * gdal
Definition:
G.h:71
G__::work_buf_size
int work_buf_size
Definition:
G.h:88
fileinfo::range
struct Range range
Definition:
G.h:47
G__::temp_buf_size
int temp_buf_size
Definition:
G.h:91
fileinfo::reclass
struct Reclass reclass
Definition:
G.h:45
G__::window
struct Cell_head window
Definition:
G.h:78
G__
Definition:
G.h:74
fileinfo::C1
double C1
Definition:
G.h:53
menudata.data
tuple data
Definition:
core/menudata.py:219
fileinfo::statf
struct Cell_stats statf
Definition:
G.h:46
fileinfo::mapset
char * mapset
Definition:
G.h:64
fileinfo::open_mode
int open_mode
Definition:
G.h:43
fileinfo::cur_row
int cur_row
Definition:
G.h:54
G__::window_set
int window_set
Definition:
G.h:79
fileinfo::null_temp_name
char * null_temp_name
Definition:
G.h:61
fileinfo::cur_nbytes
int cur_nbytes
Definition:
G.h:56
fileinfo::C2
double C2
Definition:
G.h:53
fileinfo::null_file_exists
int null_file_exists
Definition:
G.h:62
G__::fileinfo
struct fileinfo * fileinfo
Definition:
G.h:95
fileinfo::xdrstream
XDR xdrstream
Definition:
G.h:66
G__::compressed_buf
unsigned char * compressed_buf
Definition:
G.h:85
G__::fp_nbytes
int fp_nbytes
Definition:
G.h:76
fileinfo::cellhd
struct Cell_head cellhd
Definition:
G.h:44
fileinfo::min_null_row
int min_null_row
Definition:
G.h:69
fileinfo
Definition:
G.h:41
COLUMN_MAPPING
int COLUMN_MAPPING
Definition:
G.h:19
G__::temp_buf
CELL * temp_buf
Definition:
G.h:84
NULL_ROWS_INMEM
#define NULL_ROWS_INMEM
Definition:
G.h:11
fileinfo::null_cur_row
int null_cur_row
Definition:
G.h:55
G__::mask_buf
CELL * mask_buf
Definition:
G.h:82
G__::fp_type
RASTER_MAP_TYPE fp_type
Definition:
G.h:77
fileinfo::quant
struct Quant quant
Definition:
G.h:70
fileinfo::NULL_ROWS
unsigned char * NULL_ROWS[NULL_ROWS_INMEM]
Definition:
G.h:67
fileinfo::fp_range
struct FPRange fp_range
Definition:
G.h:48
dialogs.type
type
Definition:
psmap/dialogs.py:2331
fileinfo::reclass_flag
int reclass_flag
Definition:
G.h:50
lib
gis
G.h
Generated on Sat Jan 2 2016 01:46:47 for GRASS Programmer's Manual by
1.8.5