-
Notifications
You must be signed in to change notification settings - Fork 0
/
AsciiRaster.h
36 lines (26 loc) · 1.29 KB
/
AsciiRaster.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
// Copyright 2022 Guiming Zhang ([email protected])
// Distributed under GNU General Public License (GPL) license
#ifndef _ASCIIRASTER_H_
#define _ASCIIRASTER_H_
// AsciiRaster Structure declaration
typedef struct {
size_t nCols;
size_t nRows;
// these additional data structures are for saving memory space and for speeding up computation by avoiding nodata celss (e.g, calculating distance to boundary)
bool data_serialized = false; // a flag indicating if cell values are serialized
size_t nVals; // Number of non-nodata values
int* rowcolIdx = NULL; // Array to hold the seqential index of non-nodata values, row * nCol + col
float* elementsVals = NULL; // Array to hold the serialized non-nodata values
float xLLCorner;
float yLLCorner;
float cellSize;
float noDataValue;
float* elements;
bool compute_serialized = false; // a flag indicating if compute is serialized
// if true, parallel computing is on serialized data values (data_serialized has to be true)
size_t start; //Used to identify starting index (in elements) when cells are being worked with accross multiple GPUs, inclusive
size_t end; //Ending index, exclusive
double* geotransform = NULL;
const char* projection = NULL;
} AsciiRaster;
#endif // _ASCIIRASTER_H_