003集—三调数据库添加三大类字段——arcgis

在国土管理日常统计工作中经常需要用到三大类数据(农用地、建设用地、未利用地),而三调数据库中无三大类字段,因此需要手工录入三大类字段,并根据二级地类代码录入相关三大类名称。本代码可一键录入海量三大类名称统计工作。方法如下:

打开数据库文件的属性表,添加三大类字段,打开字段计算器,如下图:

接下来是核心代码,采用了VB中的select case 语句 :

Dim density
''二级类转三大类:by qq:443440204
''说明:此代码按土地报批要求,043 和0404 荒草地归类为农用地,如依据三调工作分类,需手工更正到
select case  [DLBM] 
case "012"
density ="农用地"
case "013"
density= "农用地"
case "021"
density= "农用地"
case "023"
density= "农用地"
case "031"
density= "农用地"
case "033"
density= "农用地"
case "104"
density= "农用地"
case "114"
density= "农用地"
case "117"
density= "农用地"
case "122"
density= "农用地"
case "043"
density= "农用地"
case "201"
density= "建设用地"
case "202"
density= "建设用地"
case "203"
density= "建设用地"
case "204"
density= "建设用地"
case "205"
density= "建设用地"
case "101"
density= "建设用地"
case "102"
density= "建设用地"
case "113"
density= "建设用地"
case "118"
density= "建设用地"
case "111"
density= "未利用地"
case "116"
density= "未利用地"
case "125"
density= "未利用地"
case "0102"
density ="农用地"
case "0103"
density= "农用地"
case "0201"
density= "农用地"
case "0204"
density= "农用地"
case "0301"
density= "农用地"
case "0305"
density= "农用地"
case "0307"
density= "农用地"
case "1006"
density= "农用地"
case "1103"
density= "农用地"
case "1104"
density= "农用地"
case "1104A"
density= "农用地"
case "1107"
density= "农用地"
case "1107A"
density= "农用地"
case "1202"
density= "农用地"
case "05H1"
density= "建设用地"
case "0508"
density= "建设用地"
case "0601"
density= "建设用地"
case "0602"
density= "建设用地"
case "0701"
density= "建设用地"
case "0702"
density= "建设用地"
case "08H1"
density= "建设用地"
case "08H2"
density= "建设用地"
case "08H2A"
density= "建设用地"
case "0809"
density= "建设用地"
case "0810"
density= "建设用地"
case "0810A"
density= "建设用地"
case "09"
density= "建设用地"
case "1001"
density= "建设用地"
case "1002"
density= "建设用地"
case "1003"
density= "建设用地"
case "1004"
density= "建设用地"
case "1005"
density= "建设用地"
case "1109"
density= "建设用地"
case "1201"
density= "建设用地"
case "0404"
density= "农用地"
case "1101"
density= "未利用地"
case "1106"
density= "未利用地"
case "0302"
density= "农用地"
 case else
density= "1错误"
end select

确定即可生成三大类代码。

同理,生成一级类通用代码如下 :

selectcase 语句

Dim density
''二级类转一级类:by qq:443440204
select case left( [DLBM] ,2)
case "01"
density ="耕地"
case "02"
density ="园地"
case "03"
density ="林地"
case "04"
density ="草地"
case "05"
density ="商业服务业用地"
case "06"
density ="工矿用地"
case "07"
density ="住宅用地"
case "08"
density ="公共管理与公共服务用地"
case "09"
density ="特殊用地"
case "10"
density ="交通运输用地"
case "11"
density ="水域及水利设施用地"
case "12"
density ="其他土地"
case "00"
density ="湿地"
case "20"
density ="城镇村及工矿用地"
case  else
density ="1错误"
end select

if else 语句显得比较啰嗦,也一并附上:

Dim density
Dim fz
fz=left( [DLBM] ,2)

if fz ="01"Then
density ="耕地"
elseif fz ="02"Then
density ="园地"
elseif fz ="03"Then
density ="林地"
elseif fz ="04"Then
density ="草地"
elseif fz ="05"Then
density ="商业服务业用地"
elseif fz ="06"Then
density ="工矿用地"
elseif fz ="07"Then
density ="住宅用地"
elseif fz ="08"Then
density ="公共管理与公共服务用地"
elseif fz ="09"Then
density ="特殊用地"
elseif fz ="10"Then
density ="交通运输用地"
elseif fz ="11"Then
density ="水域及水利设施用地"
elseif fz ="12"Then
density ="其他土地"
elseif fz ="00"Then
density ="湿地"
elseif fz ="20"Then
density ="城镇村及工矿用地"
else
 density =null
end if
相关推荐
The_Ticker4 分钟前
CFD平台如何接入实时行情源
java·大数据·数据库·人工智能·算法·区块链·软件工程
Elastic 中国社区官方博客10 分钟前
Elasticsearch 开放推理 API 增加了对 IBM watsonx.ai Slate 嵌入模型的支持
大数据·数据库·人工智能·elasticsearch·搜索引擎·ai·全文检索
企鹅侠客14 分钟前
ETCD调优
数据库·etcd
Json_1817901448021 分钟前
电商拍立淘按图搜索API接口系列,文档说明参考
前端·数据库
煎饼小狗32 分钟前
Redis五大基本类型——Zset有序集合命令详解(命令用法详解+思维导图详解)
数据库·redis·缓存
永乐春秋1 小时前
WEB-通用漏洞&SQL注入&CTF&二次&堆叠&DNS带外
数据库·sql
打鱼又晒网1 小时前
【MySQL】数据库精细化讲解:内置函数知识穿透与深度学习解析
数据库·mysql
大白要努力!1 小时前
android 使用SQLiteOpenHelper 如何优化数据库的性能
android·数据库·oracle
tatasix2 小时前
MySQL UPDATE语句执行链路解析
数据库·mysql
南城花随雪。2 小时前
硬盘(HDD)与固态硬盘(SSD)详细解读
数据库