Basic If/Then in Python Parser of ArcGIS Field Calculator?

您所在的位置:网站首页 王者大概有多少人玩 Basic If/Then in Python Parser of ArcGIS Field Calculator?

Basic If/Then in Python Parser of ArcGIS Field Calculator?

2022-05-22 06:36| 来源: 网络整理| 查看: 265

I am using ArcGIS 10.2 for Desktop, and I've been looking through this site, and can't seem to figure out my answer yet. Very new to VBA and Python, but lots of years with ArcGIS. I know I can do this the slow way with Select By Attributes, but It's time consuming.

I am attempting a spatial join between cases of a disease (points layer) and US Census Tracts (polygon layer). This requires count data. For each point/case, I have a field called YEAR with date ranges 2001 to 2012 depending on what year the case happened. I need a count column for each year. For example, the first one I'm calling COUNT01. If the case date in YEAR is 2001, then COUNT01 will have a 1 in it. If it is any other year (2002-2012), then there will need to be a 0. I will have COUNT02, COUNT03...COUNT12 columns. Can't have a "Null" value.

Here's what I've tried so far

enter image description here

And here is what the data looks like in Arc.

enter image description here



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3