def on_convertButton_clicked(self):
gdal.SetConfigOption("OGR_SQLITE_SYNCHRONOUS", "OFF")
gdal.SetConfigOption('GDAL_HTTP_UNSAFESSL', 'YES')
dest = self.databaseWidget.datasource_name()
if dest == '' and self.databaseWidget.format() == "SQLite":
with tempfile.NamedTemporaryFile(suffix='.sqlite') as tmp:
dest = tmp.name
if dest.startswith('PG:'):
schema = self.databaseWidget.schema()
else:
schema = None
try:
QApplication.setOverrideCursor(Qt.WaitCursor)
self.translate(self.import_params(dest))
import_in_qgis(dest, self.databaseWidget.format(), schema)
except InputError as e:
e.show()
except RuntimeError as e:
QMessageBox.warning(None,
plugin_name(),
e.args[0])
finally:
QApplication.restoreOverrideCursor()
import_gmlas_panel.py 文件源码
python
阅读 34
收藏 0
点赞 0
评论 0
评论列表
文章目录