1
0
Fork 0

USGS map file is only needed when --cover is enabled.

Also put the log output into the respective functions
This commit is contained in:
Christian Schmitt 2012-10-15 22:15:16 +02:00
parent d6c3a67caf
commit aead9a1f9d
3 changed files with 7 additions and 10 deletions

View file

@ -152,14 +152,9 @@ int main(int argc, char **argv) {
load_dirs.push_back(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 ) ) {
SG_LOG(SG_GENERAL, SG_ALERT, "Failed to load priorities file " << priorities_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);
if ( !load_area_types( priorities_file )
|| (!cover.empty() && !load_usgs_map( usgs_map_file)) ) {
exit(-1);
}

View file

@ -64,9 +64,10 @@ int load_area_types( const std::string& filename ) {
ifstream in ( filename.c_str() );
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;
}
SG_LOG(SG_GENERAL, SG_ALERT, "Priorities file is " << filename);
in >> skipcomment;
string sliver_area_name, default_area_name;

View file

@ -38,9 +38,10 @@ int load_usgs_map( const std::string& filename ) {
ifstream in ( filename.c_str() );
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;
}
SG_LOG(SG_GENERAL, SG_ALERT, "USGS Map file is " << filename);
in >> skipcomment;
while ( !in.eof() ) {