您的位置:首页 > 编程语言 > Python开发

python-快速入门

2014-11-28 17:17 197 查看
ref: Calculate Field examples

Entering values with the keyboard is not the only way you can edit values in a table. In some cases, you might want to perform a mathematical calculation to set a field value for a single record or even all records. You can perform simple as well as advanced calculations on all or selected records. In addition, you can calculate area, length, perimeter, and other geometric properties on fields in attribute tables. The sections below include examples of using the field calculator. Calculations can be performed using either Python or VBScript.

Python is the recommended scripting language for ArcGIS. Use Python if you want access to geoprocessing functionality, including feature geometry. The adoption of Python as the scripting language for ArcGIS 10.0 provides many opportunities for performing calculations.

import numpy.random as R

def getRandomValue():
return R.random()


View Code
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: