Using Calculate Field to create x,y centroids in decimal degrees

1015
2
08-01-2011 10:21 AM
WillJames
New Contributor II
Can anyone tell me how to use calculate field to create x, y coordinates of the centroids of a polygon in decimal degrees? Currently I am only able to create x, y coordinates in metres. I have tried using this line in my python script:

float(!SHAPE.CENTROID@decimaldegrees!.split()[0]

but it does nothing. I know the inherent problems and inaccuracies of creating decimal degree coordinates in this manner but I would like to know if there is a way to force arc to do it.

Thanks,
Will
0 Kudos
2 Replies
markdenil
Regular Contributor II
generate your centroid points, then reproject them to lat/long with your prefered datum.
Then capture the locations, which will now be in lat/long.
0 Kudos
WillJames
New Contributor II
generate your centroid points, then reproject them to lat/long with your prefered datum.
Then capture the locations, which will now be in lat/long.


Thanks I figured that out when I checked data frame properties and realized I was in a projected space.
0 Kudos