void OgrWriter::setConfiguration(const Settings& conf) { setCreateAllLayers(conf.getBool(createAllLayersKey(), false)); setScriptPath(conf.getString(scriptKey(), "")); setPrependLayerName(conf.getString(preLayerNameKey(), "")); _appendData = ConfigOptions(conf).getOgrAppendData(); QString strictStr = conf.getString(strictCheckingKey(), strictCheckingDefault()); if (strictStr == "on") { _strictChecking = StrictOn; } else if (strictStr == "off") { _strictChecking = StrictOff; } else if (strictStr == "warn") { _strictChecking = StrictWarn; } else { throw HootException("Error setting strict checking. Expected on/off/warn. got: " + strictStr); } }
void OgrWriter::setConfiguration(const Settings& conf) { ConfigOptions configOptions(conf); setCreateAllLayers(configOptions.getOgrWriterCreateAllLayers()); setScriptPath(configOptions.getOgrWriterScript()); setPrependLayerName(configOptions.getOgrWriterPreLayerName()); _appendData = configOptions.getOgrAppendData(); QString strictStr = configOptions.getOgrStrictChecking(); if (strictStr == "on") { _strictChecking = StrictOn; } else if (strictStr == "off") { _strictChecking = StrictOff; } else if (strictStr == "warn") { _strictChecking = StrictWarn; } else { throw HootException("Error setting strict checking. Expected on/off/warn. got: " + strictStr); } }