ArcGIS 中取出面上最大的Z值的坐标点

def MaxZ(shape):  
     line = shape.getPart(0)
     pnt = line.next()
     maxValue = float("-inf")
     while pnt:
         if maxValue < pnt.Z:
             maxValue = pnt.Z
         pnt = line.next()
     return maxValue


MaxZ(!shape!)


   
    point.X += shiftValue
    return point
   
MinZ(!shape!)
   
def MinZ(shape):  
     line = shape.getPart(0)
     pnt = line.next()
     minValue = float("inf")
     while pnt:
         if minValue > pnt.Z:
             minValue = pnt.Z
         pnt = line.next()
     return minValue
    
    
def info( ZValue , ZValueMin , ZValueMax ):
     returnValue = "unknown"
     if ZValue and ZValueMin and  ZValueMax:
         if ZValueMax - ZValueMin < 0.00000001:
             returnValue = "unknown"
         elif ZValue > ZValueMax or ZValue < ZValueMin:
             returnValue = "error"
         else:
             returnValue = "ok"
     return returnValue
    
    
    
def MinZ(shape):  
     line = shape.getPart(0)
     pnt = line.next()
     minValue = float("inf")
     while pnt:
         if minValue > pnt.Z:
             minValue = pnt.Z
         pnt = line.next()
     return minValue

posted @ 2018-08-25 07:39  ParamousGIS  阅读(584)  评论(0编辑  收藏  举报