{
double exnodes[MAX_EX_NODES][3];
struct stat stat_buf;
- string dir;
- char file[256], exfile[256];
+ string dir, file;
+ char exfile[256];
#ifdef WIN32
char tmp_path[256];
#endif
string command;
FILE *fd;
- long int index;
int colmin, colmax, rowmin, rowmax;
int i, j, count, excount, result;
}
// get index and generate output file name
- index = p.gen_index();
- sprintf(file, "%s/%ld.node", dir.c_str(), index);
+ file = dir + "/" + p.gen_index_str() + ".node";
// get (optional) extra node file name (in case there is matching
// .poly file.
- strcpy(exfile, file);
- strcat(exfile, ".ex");
+ exfile = file + ".ex";
// load extra nodes if they exist
excount = 0;
// $Log$
+// Revision 1.5 1999/03/25 19:03:50 curt
+// Minor tweaks related to FGBucket usage.
+//
// Revision 1.4 1999/03/20 20:32:51 curt
// First mostly successful tile triangulation works. There's plenty of tweaking
// to do, but we are marching in the right direction.
#include "array.hxx"
main(int argc, char **argv) {
- char tile_name[256];
double lon, lat;
if ( argc != 2 ) {
}
string work_dir = argv[1];
-
lon = -146.248360; lat = 61.133950; // PAVD (Valdez, AK)
lon = -110.664244; lat = 33.352890; // P13
string base = b.gen_base_path();
string path = work_dir + "/Scenery/" + base;
- long int b_index = b.gen_index();
- sprintf(tile_name, "%ld", b_index);
- string arrayfile = path + "/" + tile_name + ".dem";
+ string arrayfile = path + "/" + b.gen_index_str() + ".dem";
cout << "arrayfile = " << arrayfile << endl;
FGArray a(arrayfile);
// corner.
int
FGDem::write_area( const string& root, FGBucket& b, bool compress ) {
- char tile_name[256];
-
// calculate some boundaries
double min_x = ( b.get_center_lon() - 0.5 * b.get_width() ) * 3600.0;
double max_x = ( b.get_center_lon() + 0.5 * b.get_width() ) * 3600.0;
string command = "mkdir -p " + path;
system( command.c_str() );
- long int b_index = b.gen_index();
- sprintf(tile_name, "%ld", b_index);
- string demfile = path + "/" + tile_name + ".dem";
+ string demfile = path + "/" + b.gen_index_str() + ".dem";
cout << "demfile = " << demfile << endl;
// write the file
// $Log$
+// Revision 1.27 1999/03/25 19:04:36 curt
+// Minor tweaks related to FGBucket usage.
+//
// Revision 1.26 1999/03/13 17:40:37 curt
// Moved point interpolation and least squares fitting to contruction program
// area.