1 /* rawdem.h -- library of routines for processing raw dem files (30 arcsec)
3 * Written by Curtis Olson, started February 1998.
5 * Copyright (C) 1998 Curtis L. Olson - curt@me.umn.edu
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 * (Log is kept at end of this file)
32 #define MAX_COLS_X_2 14400
36 int nrows; /* number of rows */
37 int ncols; /* number of cols */
38 int ulxmap; /* X coord of center of upper left pixel in arcsec */
39 int ulymap; /* Y coord of center of upper left pixel in arcsec */
40 int rootx; /* X coord of upper left *edge* of DEM region in degrees */
41 int rooty; /* Y coord of upper left *edge* of DEM region in degrees */
42 int xdim; /* X dimension of a pixel */
43 int ydim; /* Y dimension of a pixel */
44 int tmp_min; /* current 1x1 degree tile minimum */
45 int tmp_max; /* current 1x1 degree tile maximum */
48 int fd; /* Raw DEM file descriptor */
50 /* storage area for a 1 degree high strip of data. Note, for
51 * convenience this is in y,x order */
52 short strip[120][MAX_ROWS];
54 short center[120][120]; /* tile with data taken at center of pixel */
55 float edge[121][121]; /* tile with data converted to corners */
59 /* Read the DEM header to determine various key parameters for this
61 void rawReadDemHdr( fgRAWDEM *raw, char *hdr_file );
63 /* Open a raw DEM file. */
64 void rawOpenDemFile( fgRAWDEM *raw, char *raw_dem_file );
66 /* Close a raw DEM file. */
67 void rawCloseDemFile( fgRAWDEM *raw );
69 /* Read a horizontal strip of (1 vertical degree) from the raw DEM
70 * file specified by the upper latitude of the stripe specified in
71 * degrees. The output the individual ASCII format DEM tiles. */
72 void rawProcessStrip( fgRAWDEM *raw, int lat_degrees, char *path );
75 #endif /* _RAWDEM_H */
79 /* Revision 1.2 1998/03/03 13:10:30 curt
80 /* Close to a working version.
82 * Revision 1.1 1998/03/02 23:31:02 curt