I have a dataset that is in a WGS84_UTM projected coordinate system, can I force the Field Calculator to use another coordinate system when I use it to calculate areas using pythons !shape.area@squareyards!
?
My question is similar to checking "Use coordinate system of the data frame" in calculate geometry when the data frames projection is different; I would use this method but it does not have the option to calculate Square Yards. I could reproject the data to a new feature class, then calculate it and perform a join, or calculate the area in square feet using the data frames projection and dividing by 9, but since I will be doing this often the field calculator route would be the best way to go.
2 Answers 2
I would try using cursors for this type of situation. Take a look at Update Cursors and SpatialReference objects. The update cursor can replace a field calculator process in arcpy. Area tokens can be used to calculate area in another coordinate system, which can then be converted to other units. Take a look at this question.
-
I was hoping I could do this in the field calculator instead of a Update Cursor, but it doesn't sound like it can be done.Pete– Pete2013年10月08日 18:03:48 +00:00Commented Oct 8, 2013 at 18:03
You can simply use !shape.area@SQUAREYARDS!
(or in 10.2 to be more accurate, !shape.geodesicarea@SQUAREYARDS!
), wouldn't that be sufficient?
-
I want to use the !shape.area@SQUAREYARDS!, but have that function calculate the area using a different projection than the one the feature class is using.Pete– Pete2013年10月02日 20:32:29 +00:00Commented Oct 2, 2013 at 20:32
Explore related questions
See similar questions with these tags.