当我们使用ArcGIS,在编辑字段或者有某种数据处理需求时,想要新建个字段生成一列随机数或者自增序列数,
下面是实现得过程和代码:
首先新建个字段,字段类型是整型或者浮点或者双精度
(1)生成随机数
1 | import random |
(2)自增序列数
1 | total = 0 |
PS;注意选择是python脚本,以及代码的缩进。
结果如下:
No results found
当我们使用ArcGIS,在编辑字段或者有某种数据处理需求时,想要新建个字段生成一列随机数或者自增序列数,
下面是实现得过程和代码:
首先新建个字段,字段类型是整型或者浮点或者双精度
(1)生成随机数
1 | import random |
(2)自增序列数
1 | total = 0 |
PS;注意选择是python脚本,以及代码的缩进。
结果如下: