本文整理汇总了Python中SSUtilities.createSeriesStr方法的典型用法代码示例。如果您正苦于以下问题:Python SSUtilities.createSeriesStr方法的具体用法?Python SSUtilities.createSeriesStr怎么用?Python SSUtilities.createSeriesStr使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SSUtilities
的用法示例。
在下文中一共展示了SSUtilities.createSeriesStr方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: createOutput
# 需要导入模块: import SSUtilities [as 别名]
# 或者: from SSUtilities import createSeriesStr [as 别名]
def createOutput(self, outputTable, displayIt = False):
"""Creates K-Function Output Table.
INPUTS
outputTable (str): path to the output table
displayIt {bool, False}: create output graph?
"""
#### Allow Overwrite Output ####
ARCPY.env.overwriteOutput = 1
#### Get Output Table Name With Extension if Appropriate ####
outputTable, dbf = UTILS.returnTableName(outputTable)
#### Set Progressor ####
ARCPY.SetProgressor("default", ARCPY.GetIDMessage(84008))
#### Delete Table If Exists ####
UTILS.passiveDelete(outputTable)
#### Create Table ####
outPath, outName = OS.path.split(outputTable)
try:
DM.CreateTable(outPath, outName)
except:
ARCPY.AddIDMessage("ERROR", 541)
raise SystemExit()
#### Add Result Fields ####
fn = UTILS.getFieldNames(kOutputFieldNames, outPath)
expectedKName, observedKName, diffKName, lowKName, highKName = fn
outputFields = [expectedKName, observedKName, diffKName]
if self.permutations:
outputFields += [lowKName, highKName]
for field in outputFields:
UTILS.addEmptyField(outputTable, field, "DOUBLE")
#### Create Insert Cursor ####
try:
insert = DA.InsertCursor(outputTable, outputFields)
except:
ARCPY.AddIDMessage("ERROR", 204)
raise SystemExit()
#### Add Rows to Output Table ####
for testIter in xrange(self.nIncrements):
distVal = self.cutoffs[testIter]
ldVal = self.ld[testIter]
diffVal = ldVal - distVal
rowResult = [distVal, ldVal, diffVal]
if self.permutations:
ldMinVal = self.ldMin[testIter]
ldMaxVal = self.ldMax[testIter]
rowResult += [ldMinVal, ldMaxVal]
insert.insertRow(rowResult)
#### Clean Up ####
del insert
#### Make Table Visable in TOC if *.dbf Had To Be Added ####
if dbf:
ARCPY.SetParameterAsText(1, outputTable)
#### Display Results ####
if displayIt:
if "WIN" in SYS.platform.upper():
#### Set Progressor ####
ARCPY.SetProgressor("default", ARCPY.GetIDMessage(84186))
#### Get Image Directory ####
imageDir = UTILS.getImageDir()
#### Make List of Fields and Set Template File ####
yFields = [expectedKName, observedKName]
if self.permutations:
#### Add Confidence Envelopes ####
yFields.append(highKName)
yFields.append(lowKName)
tee = OS.path.join(imageDir, "KFunctionPlotEnv.tee")
else:
tee = OS.path.join(imageDir, "KFunctionPlot.tee")
xFields = [ expectedKName for i in yFields ]
#### Create Data Series String ####
dataStr = UTILS.createSeriesStr(xFields, yFields, outputTable)
#### Make Graph ####
DM.MakeGraph(tee, dataStr, "KFunction")
ARCPY.SetParameterAsText(11, "KFunction")
else:
ARCPY.AddIDMessage("Warning", 942)