• 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

  • 相关阅读:
    Java的字符串及格式化输入输出
    Java的数据类型与类型转换
    java基本程序
    svn基础入门
    github基础入门笔记
    git基础入门笔记
    linux基础入门笔记
    二、FreeMarker 模版开发指南 第二章 数值和类型
    【CodeForces】[599B]Spongebob and Joke
    【CodeForces】[612B]HDD is Outdated Technology
  • 原文地址:https://www.cnblogs.com/gispathfinder/p/9532813.html
Copyright © 2020-2023  润新知