首页 > 其他 > 详细

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

时间:2018-08-25 11:09:42      阅读:222      评论:0      收藏:0      [点我收藏+]

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

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

原文:https://www.cnblogs.com/gispathfinder/p/9532813.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!