-
Notifications
You must be signed in to change notification settings - Fork 1
/
rastmap.h
40 lines (35 loc) · 819 Bytes
/
rastmap.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef DRASTMAP_H
#define RASTMAP_H
#include <grass/raster.h>
#include <grass/segment.h>
/* RASTER MAP */
typedef struct __cell_map__ {
char *name;
char *mapset;
int fd;
RASTER_MAP_TYPE type;
const char *temp_file;
int temp_fd;
SEGMENT seg;
void *buf;
CELL *cbuf;
FCELL *fbuf;
DCELL *dbuf;
} cell_map;
/* COLLECT SEGMENTATION INFO */
typedef struct __seg_map__ {
int nrows;
int ncols;
int srows;
int scols;
int maxmem;
int nseg;
int segments_in_memory;
} seg_map;
extern int allocate_buf(cell_map *);
extern int check_fd(cell_map *);
extern int manage_segments(seg_map *);
extern int init_seg_map(cell_map *, seg_map *);
extern int copy_segment(cell_map *, short);
extern int get_segment_number(int, int, seg_map *);
#endif /* RASTMAP_H */