I have a polygon that has 200 Zone and Bottom fields as Zone1, Zone2, Zone3,...., Zone200 and Bottom1, Bottom2, Bottom3,...., Bottom200 . I am trying to split the polygon to 200 units and create fields called "Zone" and "Bottom". Then populate these fields as Zone1/Bottom1 for unit 1, Zone2/Bottom2 for unit 2 and so on.
I am at the writing the attribute stage. I was able to get the values but I couldn't set the values to the final attributes. I attached the workbench template.
My current code looks like this:
import fme
import fmeobjects
def processFeature(feature):
for i in range(1, 201):
zone = "Zone" + str(i)
bottom = "Bottom" + str(i)
zoneValue = feature.getAttribute(zone)
bottomValue = feature.getAttribute(bottom))
feature.setAttribute("Zone", zoneValue)
feature.setAttribute("Bottom", bottomValue)