本文整理汇总了Python中SSUtilities.funWithXYTolerance方法的典型用法代码示例。如果您正苦于以下问题:Python SSUtilities.funWithXYTolerance方法的具体用法?Python SSUtilities.funWithXYTolerance怎么用?Python SSUtilities.funWithXYTolerance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SSUtilities
的用法示例。
在下文中一共展示了SSUtilities.funWithXYTolerance方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: doPoint2Poly
# 需要导入模块: import SSUtilities [as 别名]
# 或者: from SSUtilities import funWithXYTolerance [as 别名]
def doPoint2Poly(self):
#### Initial Data Assessment ####
printOHSSection(84428, prependNewLine = True)
printOHSSubject(84431, addNewLine = False)
self.ssdo.obtainData(self.ssdo.oidName)
self.checkIncidents(self.ssdo.numObs)
if len(self.ssdo.badRecords):
ARCPY.AddMessage("\n")
#################################
#### Checking Polygon Message ####
printOHSSubject(84430, addNewLine = False)
#### Spatial Join (Hold Messages) ####
outputFieldMaps = "EMPTY"
tempFC = UTILS.returnScratchName("SpatialJoin_TempFC")
self.cleanUpList.append(tempFC)
joinWithSpatialRef = UTILS.funWithSpatialRef(ANA.SpatialJoin,
self.ssdo.spatialRef,
outputFC = tempFC)
joinWithXY = UTILS.funWithXYTolerance(joinWithSpatialRef,
self.ssdo.distanceInfo)
joinWithXY(self.polygonFC, self.ssdo.inputFC, tempFC,
"JOIN_ONE_TO_ONE", "KEEP_ALL",
outputFieldMaps)
#### Set VarName, MasterField, AnalysisSSDO ####
self.createAnalysisSSDO(tempFC, "JOIN_COUNT")
示例2: doFishnet
# 需要导入模块: import SSUtilities [as 别名]
# 或者: from SSUtilities import funWithXYTolerance [as 别名]
def doFishnet(self):
#### Initial Data Assessment ####
printOHSSection(84428, prependNewLine = True)
printOHSSubject(84431, addNewLine = False)
#### Find Unique Locations ####
msg = ARCPY.GetIDMessage(84441)
ARCPY.SetProgressor("default", msg)
initCount = UTILS.getCount(self.ssdo.inputFC)
self.checkIncidents(initCount)
collectedPointFC = UTILS.returnScratchName("Collect_InitTempFC")
collInfo = EVENTS.collectEvents(self.ssdo, collectedPointFC)
self.cleanUpList.append(collectedPointFC)
collSSDO = SSDO.SSDataObject(collectedPointFC,
explicitSpatialRef = self.ssdo.spatialRef,
useChordal = True)
collSSDO.obtainDataGA(collSSDO.oidName)
#################################
if self.boundaryFC:
#### Assure Boundary FC Has Area and Obtain Chars ####
self.checkBoundary()
#### Location Outliers ####
lo = UTILS.LocationInfo(collSSDO, concept = "EUCLIDEAN",
silentThreshold = True, stdDeviations = 3)
printOHSLocationalOutliers(lo, aggType = self.aggType)
#### Agg Header ####
printOHSSection(84444)
if self.boundaryFC:
extent = self.boundExtent
forMercExtent = self.boundExtent
countMSGNumber = 84453
else:
countMSGNumber = 84452
extent = None
forMercExtent = collSSDO.extent
if collSSDO.useChordal:
extentFC_GCS = UTILS.returnScratchName("TempGCS_Extent")
extentFC_Merc = UTILS.returnScratchName("TempMercator_Extent")
points = NUM.array([ [forMercExtent.XMin, forMercExtent.YMax],
[forMercExtent.XMax, forMercExtent.YMin] ])
UTILS.createPointFC(extentFC_GCS, points,
spatialRef = collSSDO.spatialRef)
DM.Project(extentFC_GCS, extentFC_Merc, mercatorProjection)
d = ARCPY.Describe(extentFC_Merc)
extent = d.extent
fishOutputCoords = mercatorProjection
else:
fishOutputCoords = self.ssdo.spatialRef
#### Fish Subject ####
printOHSSubject(84449, addNewLine = False)
dist = scaleDecision(lo.nonZeroAvgDist, lo.nonZeroMedDist)
area = 0.0
#### Construct Fishnet ####
fish = UTILS.FishnetInfo(collSSDO, area, extent,
explicitCellSize = dist)
dist = fish.quadLength
snap = self.ssdo.distanceInfo.linearUnitString(dist)
#### Cell Size Answer ####
snapStr = self.ssdo.distanceInfo.printDistance(dist)
msg = ARCPY.GetIDMessage(84450).format(snapStr)
printOHSAnswer(msg)
self.fish = fish
#### Fishnet Count Subject ####
printOHSSubject(84451, addNewLine = False)
#### Create Temp Fishnet Grid ####
gridFC = UTILS.returnScratchName("Fishnet_TempFC")
self.cleanUpList.append(gridFC)
#### Apply Output Coords to Create Fishnet ####
oldSpatRef = ARCPY.env.outputCoordinateSystem
ARCPY.env.outputCoordinateSystem = fishOutputCoords
#### Fish No Extent ####
oldExtent = ARCPY.env.extent
ARCPY.env.extent = ""
#### Apply Max XY Tolerance ####
fishWithXY = UTILS.funWithXYTolerance(DM.CreateFishnet,
self.ssdo.distanceInfo)
#### Execute Fishnet ####
fishWithXY(gridFC, self.fish.origin, self.fish.rotate,
self.fish.quadLength, self.fish.quadLength,
self.fish.numRows, self.fish.numCols, self.fish.corner,
"NO_LABELS", self.fish.extent, "POLYGON")
#### Project Back to GCS if Use Chordal ####
if collSSDO.useChordal:
gridFC_ProjBack = UTILS.returnScratchName("TempFC_Proj")
DM.Project(gridFC, gridFC_ProjBack, collSSDO.spatialRef)
#.........这里部分代码省略.........