/* * grid.h - Create a grid structure and declare functions * * Author: Jon Todd * */ #ifndef __grid_h #define __grid_h #include #include // grid structure // typedef struct grid_t { char*name; // File name (path) short**data; // Data int ncols; // Number of columns int nrows; // Number of rows double x; // x lat lon corner double y; // y lat lon corner int cellsize; // Cell size int nodata; // No data value int max; // Max elevation int min; // Min elevation } GRID; // min - return the min of two ints // int min(int x, int y); // importGrid - brings grid file into an array // GRID *importGrid(char *path); // writeGrid - write grid structure to file path // void writeGrid(GRID *g,char *path); // printGrid - Print the grid info // void printGrid(GRID *g); // freeGrid - free memory from grid // void freeGrid(GRID *g); #endif