The previous article raised questions about field calculation. After several days of exploration, it was found that it was not difficult to write VBA. As long as the related tables and their connection relationships are established, field calculation can be easily completed.
The process is as follows:
1. Create a data table under arccatalog
Create the original data table: Data
Data
Objectid F1 F2 f1_score f2_score total_score
1 R1 r1
2 R1 r2
3 R2 r1
4 R2 r2
5 R3 r1
6 R3 r2
Create score rules: f1_rule, f2_rule
F1_rule
Objectid factor_name rule_name rule_score factor_weight
1 F1 R1 100. 25
2 F1 R2 80. 25
3 F1 R3 60. 25
F2_rule
Objectid factor_name rule_name rule_score factor_weight
1 F2 R1 100. 75
2 F2 R2 50. 75
2. Create a join table under ArcMap)
1) Use the F1 field of the data table to establish an association with the rule_name field of the f1_rule table.
2) use the F2 field of the data table to associate with the rule_name field of the f2_rule table.
3. Use the calculate value tool of arctoolbox to calculate Fields
1) single factor calculation: f1_score = rule_score x factor_weight; f2_score = rule_score x factor_weight
2) Total score calculation: total_score = f0000score + f2_score
The whole process is very simple. If we encapsulate steps 1 and 2 with the model, we will basically complete "office automation!