直接上代码,环境ARCMAP10.8.2jishu = 0fname = ""def autoIncrement(a, b, c): #采用最大余数法; a为BSM,b为面积百分比整数部分,c为通过频数整数部分求和与100的差值。此代码排除了差值为负数的情况并且在此之前需要根据BSM与小数部分进行排序。global jishuglobal fnameglobal recif a != fname and c > 0:fname = apStart = 1jishu = pStartrec = pStart + breturn recelif a != fname and c == 0:fname = apStart = 1jishu = pStartrec = breturn recelif a == fname and c == 0:fname = apStart = 1jishu = jishu + pStartrec = breturn recelse:fname = apStart = 1jishu = jishu + pStartif jishu > c:rec = breturn recelse:rec = pStart + breturn rec
200字范文,内容丰富有趣,生活中的好帮手!