def gmlas_datasource(self):
gmlasconf = self.gmlas_config()
datasourceFile = self.gmlPathLineEdit.text()
if datasourceFile == '':
raise InputError(self.tr("You must select a input file or URL"))
isXsd = datasourceFile.endswith(".xsd")
isUrl = datasourceFile.startswith("http")
swapCoordinates = self.swapCoordinatesCombo.currentText()
driverConnection = ""
openOptions = ['EXPOSE_METADATA_LAYERS=YES', 'CONFIG_FILE={}'.format(gmlasconf)]
openOptions.append('SWAP_COORDINATES={}'.format(swapCoordinates))
if isXsd:
driverConnection = "GMLAS:"
openOptions.append('XSD={}'.format(datasourceFile))
elif isUrl:
driverConnection = "GMLAS:/vsicurl_streaming/{}".format(datasourceFile)
else:
driverConnection = "GMLAS:{}".format(datasourceFile)
with qgis_proxy_settings():
return gdal.OpenEx(driverConnection,
open_options=openOptions)
import_gmlas_panel.py 文件源码
python
阅读 19
收藏 0
点赞 0
评论 0
评论列表
文章目录