#include <stdio.h>
#include <Bucket/bucketutils.h>
-#include <zlib/zlib.h>
+
+//#include <zlib/zlib.h>
+#include <Misc/fgstream.hxx>
#define DEM_SIZE 1200
class fgDEM {
// file pointer for input
- gzFile fd;
+ // gzFile fd;
+ fg_gzifstream *in;
// coordinates (in arc seconds) of south west corner
double originx, originy;
int do_data;
int cur_col, cur_row;
+ // return next token from input stream
+ string next_token();
+
+ // return next integer from input stream
+ int next_int();
+
+ // return next double from input stream
+ double next_double();
+
+ // return next exponential num from input stream
+ double next_exp();
+
public:
// Constructor
fgDEM( void );
// open a DEM file (use "-" if input is coming from stdin)
- int open ( char *file );
+ int open ( const string& file );
// close a DEM file
- int close ( void );
+ int close ();
// parse a DEM file
- int parse( void );
+ int parse();
// read and parse DEM "A" record
- int read_a_record( void );
+ int read_a_record();
// read and parse DEM "B" record
- void read_b_record( void );
+ void read_b_record();
// Informational methods
double info_originx( void ) { return(originx); }
double interpolate_altitude( double lon, double lat );
// Use least squares to fit a simpler data set to dem data
- void fit( char *fg_root, double error, struct fgBUCKET *p );
+ void fit( double error, fgBUCKET *p );
// Initialize output mesh structure
void outputmesh_init( void );
void outputmesh_set_pt( int i, int j, double value );
// Write out a node file that can be used by the "triangle" program
- void outputmesh_output_nodes( char *fg_root, struct fgBUCKET *p );
+ void outputmesh_output_nodes( const string& fg_root, fgBUCKET *p );
// Destructor
~fgDEM( void );
// $Log$
+// Revision 1.9 1998/10/16 19:08:14 curt
+// Portability updates from Bernie Bright.
+//
+// Revision 1.8 1998/09/19 17:59:46 curt
+// Use c++ streams (fg_gzifstream). Also converted many character arrays to
+// the string class.
+//
+// Revision 1.7 1998/07/04 00:47:19 curt
+// typedef'd struct fgBUCKET.
+//
// Revision 1.6 1998/06/05 18:14:40 curt
// Abort out early when reading the "A" record if it doesn't look like
// a proper DEM file.