本文整理汇总了Python中SSUtilities.readPolygonFC方法的典型用法代码示例。如果您正苦于以下问题:Python SSUtilities.readPolygonFC方法的具体用法?Python SSUtilities.readPolygonFC怎么用?Python SSUtilities.readPolygonFC使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SSUtilities
的用法示例。
在下文中一共展示了SSUtilities.readPolygonFC方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: checkBoundary
# 需要导入模块: import SSUtilities [as 别名]
# 或者: from SSUtilities import readPolygonFC [as 别名]
def checkBoundary(self):
printOHSSubject(84486, addNewLine = False)
#### Assure That There Is Only a Single Polygon ####
cnt = UTILS.getCount(self.boundaryFC)
if cnt > 1:
#### Dissolve Polys into Boundary ####
dissolveFC = UTILS.returnScratchName("Dissolve_TempFC")
DM.Dissolve(self.boundaryFC, dissolveFC, "#", "#", "SINGLE_PART",
"DISSOLVE_LINES")
self.boundaryFC = dissolveFC
self.cleanUpList.append(dissolveFC)
#### Read Boundary FC ####
ssdoBound = SSDO.SSDataObject(self.boundaryFC,
explicitSpatialRef = self.ssdo.spatialRef,
silentWarnings = True,
useChordal = True)
polyDict, polyAreas = UTILS.readPolygonFC(self.boundaryFC,
spatialRef = self.ssdo.spatialRef,
useGeodesic = self.ssdo.useChordal)
self.boundArea = sum(polyAreas.values())
self.boundExtent = getPolyExtent(polyDict)
del ssdoBound
if UTILS.compareFloat(0.0, self.boundArea):
#### Invalid Study Area ####
ARCPY.AddIDMessage("ERROR", 932)
self.cleanUp()
raise SystemExit()
else:
areaStr = self.ssdo.distanceInfo.printDistance(self.boundArea)
msg = ARCPY.GetIDMessage(84492).format(areaStr)
printOHSAnswer(msg)