added argument for setting transform file path

pull/599/head
Frederik Gelder 2017-06-12 12:13:44 +02:00
rodzic ea5aeef213
commit 6e5291db7c
1 zmienionych plików z 15 dodań i 0 usunięć

Wyświetl plik

@ -322,6 +322,21 @@ void Georef::parseArguments(int argc, char *argv[])
}
log_ << "Log file path was set to: " << logFile_ << "\n";
}
else if (argument == "-outputTransformFile")
{
++argIndex;
if (argIndex >= argc)
{
throw GeorefException("Missing argument for '" + argument + "'.");
}
finalTransformFile_ = std::string(argv[argIndex]);
std::ofstream testFile(logFile_.c_str());
if (!testFile.is_open())
{
throw GeorefException("Argument '" + argument + "' has a bad value.");
}
log_ << "Transform file path was set to: " << finalTransformFile_ << "\n";
}
else if(argument == "-bundleFile" && argIndex < argc)
{
argIndex++;