DEM File Packer
A Program that Packs DEM Files Into a Single Humongous Binary File
|
Main. More...
Functions | |
int | GetTime () |
Get time. | |
bool | ReadHeightData (int row, int col, char *filename) |
Read height data. | |
int | main (int argc, char *argv[]) |
Main. | |
Variables | |
char | filenamefilename [] = "filelist20x20.txt" |
Name of a file that contains a list of file names. | |
const int | GRIDSIZE = 20 |
Number of DEM files on one side of square grid. | |
const int | CELLSIZE = 4000 |
Number of points on one side of a DEM file. | |
const int | ARRAYSIZE = CELLSIZE*GRIDSIZE |
Number of points on one side of the whole array of heights. | |
long long | g_nPointCount = 0LL |
Number of points processed. | |
long long | g_nBadPointCount = 0LL |
Number of points with bad data processed. | |
unsigned short ** | g_nHeight |
Buffer for packed height data. | |
int GetTime | ( | ) |
Get the current time in milliseconds.
int main | ( | int | argc, |
char * | argv[] | ||
) |
Does initialization, allocates memory, reads the list of file names, reads those files into the height buffer g_pHeight, saves the height buffer into UtahDEMData.bin, deallocates the memory and shuts down.
argc | Argument count |
argv | Arguments. |
bool ReadHeightData | ( | int | row, |
int | col, | ||
char * | filename | ||
) |
Read the height data from a single DEM file and put it into the correct place in g_pHeight, which it assumes points to a buffer of the right size.
row | Y coordinate of cell. |
col | X coordinate of cell. |
filename | Name of DEM file to be read. |