Updates to match libArray api changes.
This commit is contained in:
parent
f526985854
commit
869f0412a3
2 changed files with 13 additions and 18 deletions
|
@ -44,28 +44,23 @@ SG_USING_STD(string);
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
sglog().setLogLevels( SG_ALL, SG_WARN );
|
sglog().setLogLevels( SG_ALL, SG_WARN );
|
||||||
|
|
||||||
if ( argc != 3 ) {
|
if ( argc != 4 ) {
|
||||||
SG_LOG( SG_GENERAL, SG_ALERT,
|
cout << "Usage " << argv[0] << " <resolution> <hgt_file> <work_dir>"
|
||||||
"Usage " << argv[0] << " <hgt_file> <work_dir>" );
|
<< endl;
|
||||||
|
cout << endl;
|
||||||
|
cout << "\tresolution must be either 1 or 3 for 1arcsec or 3arcsec"
|
||||||
|
<< endl;
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
string hgt_name = argv[1];
|
int resolution = atoi( argv[1] );
|
||||||
string work_dir = argv[2];
|
string hgt_name = argv[2];
|
||||||
|
string work_dir = argv[3];
|
||||||
|
|
||||||
// determine if file is 1arcsec or 3arcsec variety
|
// determine if file is 1arcsec or 3arcsec variety
|
||||||
int resolution = 3;
|
if ( resolution != 1 && resolution != 3 ) {
|
||||||
SGPath tmp1( hgt_name );
|
cout << "ERROR: resolution must be 1 or 3." << endl;
|
||||||
SGPath tmp2( tmp1.dir() );
|
exit( -1 );
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
|
|
@ -83,7 +83,7 @@ int main(int argc, char **argv) {
|
||||||
b_cur = sgBucketOffset(min.x, min.y, i, j);
|
b_cur = sgBucketOffset(min.x, min.y, i, j);
|
||||||
string file = work_dir + "/";
|
string file = work_dir + "/";
|
||||||
file += b_cur.gen_base_path() + "/";
|
file += b_cur.gen_base_path() + "/";
|
||||||
file += b_cur.gen_index_str() + ".arr.gz";
|
file += b_cur.gen_index_str();
|
||||||
cout << file << endl;
|
cout << file << endl;
|
||||||
|
|
||||||
TGArray array;
|
TGArray array;
|
||||||
|
|
Loading…
Add table
Reference in a new issue