I have a point feature class that I'm creating 1nm buffers around using the Bufferer tool. I need to add an attribute called AreaKm2 and populate the fields with the spherical or geodesic area in km2. In ArcGIS you can do this as a field calculation using the following python script:
!
From what I understand there is no FME transformer that enables me to calculate the geodesic area of a polygon. Therefore I was hoping to be able to run the above script using the Python Caller transformer. I'm pretty basic with Python and have so far come up with this:
import fme
import fmeobjects
# Template Function interface:
# When using this function, make sure its name is set as the value of
# the 'Class or Function to Process Features' transformer parameter
def processFeature(feature):
feature.setAttribute("AreaKm2")
feature.CalculateAttribute("AreaKm2", "!")
and a whole lot of errors! Does anyone have any advice they could please send through to me to get this to work? The other way would be to bring the feature class back into ArcGIS and carry out the calculation there. It would be awesome though if it could be automated. Thanks