USGS map file is only needed when --cover is enabled.
Also put the log output into the respective functions
This commit is contained in:
parent
d6c3a67caf
commit
aead9a1f9d
3 changed files with 7 additions and 10 deletions
|
@ -152,14 +152,9 @@ int main(int argc, char **argv) {
|
||||||
load_dirs.push_back(argv[i]);
|
load_dirs.push_back(argv[i]);
|
||||||
SG_LOG(SG_GENERAL, SG_ALERT, "Load directory: " << argv[i]);
|
SG_LOG(SG_GENERAL, SG_ALERT, "Load directory: " << argv[i]);
|
||||||
}
|
}
|
||||||
SG_LOG(SG_GENERAL, SG_ALERT, "Priorities file is " << priorities_file);
|
|
||||||
if ( ! load_area_types( priorities_file ) ) {
|
if ( !load_area_types( priorities_file )
|
||||||
SG_LOG(SG_GENERAL, SG_ALERT, "Failed to load priorities file " << priorities_file);
|
|| (!cover.empty() && !load_usgs_map( usgs_map_file)) ) {
|
||||||
exit(-1);
|
|
||||||
}
|
|
||||||
SG_LOG(SG_GENERAL, SG_ALERT, "USGS Map file is " << usgs_map_file);
|
|
||||||
if ( ! load_usgs_map( usgs_map_file ) ) {
|
|
||||||
SG_LOG(SG_GENERAL, SG_ALERT, "Failed to load USGS map file " << usgs_map_file);
|
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -64,9 +64,10 @@ int load_area_types( const std::string& filename ) {
|
||||||
ifstream in ( filename.c_str() );
|
ifstream in ( filename.c_str() );
|
||||||
|
|
||||||
if ( ! in ) {
|
if ( ! in ) {
|
||||||
SG_LOG(SG_GENERAL, SG_ALERT, "Unable to open file " << filename);
|
SG_LOG(SG_GENERAL, SG_ALERT, "Unable to open priorities file " << filename);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
SG_LOG(SG_GENERAL, SG_ALERT, "Priorities file is " << filename);
|
||||||
|
|
||||||
in >> skipcomment;
|
in >> skipcomment;
|
||||||
string sliver_area_name, default_area_name;
|
string sliver_area_name, default_area_name;
|
||||||
|
|
|
@ -38,9 +38,10 @@ int load_usgs_map( const std::string& filename ) {
|
||||||
ifstream in ( filename.c_str() );
|
ifstream in ( filename.c_str() );
|
||||||
|
|
||||||
if ( ! in ) {
|
if ( ! in ) {
|
||||||
SG_LOG(SG_GENERAL, SG_ALERT, "Unable to open file " << filename);
|
SG_LOG(SG_GENERAL, SG_ALERT, "Unable to open USGS map file " << filename);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
SG_LOG(SG_GENERAL, SG_ALERT, "USGS Map file is " << filename);
|
||||||
|
|
||||||
in >> skipcomment;
|
in >> skipcomment;
|
||||||
while ( !in.eof() ) {
|
while ( !in.eof() ) {
|
||||||
|
|
Loading…
Reference in a new issue