diff --git a/src/Prep/DemChop/hgtchop.cxx b/src/Prep/DemChop/hgtchop.cxx index 1454f29f..de3347f1 100644 --- a/src/Prep/DemChop/hgtchop.cxx +++ b/src/Prep/DemChop/hgtchop.cxx @@ -44,28 +44,23 @@ SG_USING_STD(string); int main(int argc, char **argv) { sglog().setLogLevels( SG_ALL, SG_WARN ); - if ( argc != 3 ) { - SG_LOG( SG_GENERAL, SG_ALERT, - "Usage " << argv[0] << " " ); + if ( argc != 4 ) { + cout << "Usage " << argv[0] << " " + << endl; + cout << endl; + cout << "\tresolution must be either 1 or 3 for 1arcsec or 3arcsec" + << endl; exit(-1); } - string hgt_name = argv[1]; - string work_dir = argv[2]; + int resolution = atoi( argv[1] ); + string hgt_name = argv[2]; + string work_dir = argv[3]; // determine if file is 1arcsec or 3arcsec variety - int resolution = 3; - SGPath tmp1( hgt_name ); - SGPath tmp2( tmp1.dir() ); - string dir = tmp2.file(); - if ( dir == "1arcsec" ) { - resolution = 1; - } else if ( dir == "3arcsec" ) { - resolution = 3; - } else { - cout << "ERROR: major problem in directory hierachy or file name!" - << endl; - cout << "unable to determine resolution." << endl; + if ( resolution != 1 && resolution != 3 ) { + cout << "ERROR: resolution must be 1 or 3." << endl; + exit( -1 ); } #ifdef _MSC_VER diff --git a/src/Prep/DemChop/testassem.cxx b/src/Prep/DemChop/testassem.cxx index b0132068..9382fb2d 100644 --- a/src/Prep/DemChop/testassem.cxx +++ b/src/Prep/DemChop/testassem.cxx @@ -83,7 +83,7 @@ int main(int argc, char **argv) { b_cur = sgBucketOffset(min.x, min.y, i, j); string file = work_dir + "/"; file += b_cur.gen_base_path() + "/"; - file += b_cur.gen_index_str() + ".arr.gz"; + file += b_cur.gen_index_str(); cout << file << endl; TGArray array;