本文整理汇总了Python中lds.LDSUtilities.LDSUtilities.standardiseLayerConfigName方法的典型用法代码示例。如果您正苦于以下问题:Python LDSUtilities.standardiseLayerConfigName方法的具体用法?Python LDSUtilities.standardiseLayerConfigName怎么用?Python LDSUtilities.standardiseLayerConfigName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lds.LDSUtilities.LDSUtilities
的用法示例。
在下文中一共展示了LDSUtilities.standardiseLayerConfigName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from lds.LDSUtilities import LDSUtilities [as 别名]
# 或者: from lds.LDSUtilities.LDSUtilities import standardiseLayerConfigName [as 别名]
def __init__(self,lcfname):
'''
Constructor
'''
super(LayerFileReader,self).__init__(lcfname)
self.cp = ConfigParser()
self.lcfilename = LU.standardiseLayerConfigName(self.lcfname)
self._readConfigFile(self.lcfilename)
示例2: runReplicationScript
# 需要导入模块: from lds.LDSUtilities import LDSUtilities [as 别名]
# 或者: from lds.LDSUtilities.LDSUtilities import standardiseLayerConfigName [as 别名]
def runReplicationScript(self,clean=False):
'''Run the layer/group repliction script'''
destination,lgval,uconf,epsg,fe,te,fd,td = self.readParameters()
uconf_path = LU.standardiseUserConfigName(uconf)
destination_path = LU.standardiseLayerConfigName(destination)
destination_driver = LU.standardiseDriverNames(destination)
if not os.path.exists(uconf_path):
self.userConfMessage(uconf_path)
return
elif not MainFileReader(uconf_path).hasSection(destination_driver):
self.userConfMessage(uconf_path,destination_driver)
return
#-----------------------------------------------------
#'destname','layer','uconf','group','epsg','fd','td','int'
self.parent.gpr.write((destination_driver,lgval,uconf,epsg,fd,td))
ldslog.info(u'dest={0}, lg={1}, conf={2}, epsg={3}'.format(destination_driver,lgval,uconf,epsg))
ldslog.info('fd={0}, td={1}, fe={2}, te={3}'.format(fd,td,fe,te))
lgindex = self.parent.confconn.getLayerGroupIndex(lgval,col=1)
#lorg = self.parent.confconn.lglist[lgindex][0]
#----------don't need lorg in TP anymore but it is useful for sorting/counting groups
#self.parent.confconn.tp.setLayerOrGroup(lorg)
self.parent.confconn.tp.setLayerGroupValue(lgval)
if self.fromdateenable.isChecked(): self.parent.confconn.tp.setFromDate(fd)
if self.todateenable.isChecked(): self.parent.confconn.tp.setToDate(td)
self.parent.confconn.tp.setUserConf(uconf)
if self.epsgenable: self.parent.confconn.tp.setEPSG(epsg)
#because clean state persists in TP
if clean:
self.parent.confconn.tp.setCleanConfig()
else:
self.parent.confconn.tp.clearCleanConfig()
#(re)initialise the data source since uconf may have changed
#>>#self.parent.confconn.tp.src = self.parent.confconn.initSourceWrapper()
#--------------------------
###ep = self.parent.confconn.reg.openEndPoint(self.parent.confconn.destname,self.parent.confconn.uconf)
###self.parent.confconn.reg.closeEndPoint(self.parent.confconn.destname)
###ep = None
#Open ProcessRunner and run with TP(proc)/self(gui) instances
#HACK temp add of dest_drv to PR call
try:
#TODO. Test for valid LC first
self.tpr = ProcessRunner(self,destination_driver)
except Exception as e:
ldslog.error('Cannot create ProcessRunner {}. NB Possible missing Layer Config {}'.format(str(e),destination_path))
self.layerConfMessage(destination_path)
return
#If PR has been successfully created we must vave a valid dst
ldslog.debug('TRPstart')
self.tpr.start()
示例3: launchLCEditor
# 需要导入模块: from lds.LDSUtilities import LDSUtilities [as 别名]
# 或者: from lds.LDSUtilities.LDSUtilities import standardiseLayerConfigName [as 别名]
def launchLCEditor(self, checked=None):
'''Layer Config Editor launch'''
fn = LU.standardiseLayerConfigName(str(self.controls.destlist[self.controls.destcombo.currentIndex()]))
prefs = LDSPrefsEditor(fn,self)
prefs.setWindowTitle('LDS Preferences Editor (Layer Config)')
prefs.show()