I am trying to compare a set of point features to the centroid of a single feature polygon using ArcPy. The problem is that the polygon generates a set of XY coordinates in meters, whereas the set of points generates a set of XY coordinates in decimal degrees.

Is there anyway to ensure consistency?

Using some variations of SHAPE@XY@DECIMALDEGREES threw errors. When I do the following:

with arcpy.da.SearchCursor("prim_catch_dissolved", ["TR", "SHAPE@XY"]) as cursor:

I get the results in meters, which is not what I'm after.

| improve this question | | | | |

Use the spatial_reference parameter to reproject on-the-fly.

with arcpy.da.SearchCursor("prim_catch_dissolved", ["TR", "SHAPE@XY"], spatial_reference=arcpy.SpatialReference("WGS 1984")) as cursor:
    # Do interesting things here
| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.