1
0
Fork 0

Updates to match libArray api changes.

This commit is contained in:
curt 2003-03-19 22:49:13 +00:00
parent f526985854
commit 869f0412a3
2 changed files with 13 additions and 18 deletions

View file

@ -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] << " <hgt_file> <work_dir>" );
if ( argc != 4 ) {
cout << "Usage " << argv[0] << " <resolution> <hgt_file> <work_dir>"
<< 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

View file

@ -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;