Reproject coordinates without building a geometry object

508
1
12-05-2016 05:15 AM
MaximeDemers
Occasional Contributor III

Is it possible with arcpy to reproject single x,y coordinates without building a complete geometry object. For instance is it possible to do something like this

input = [[-8081441,5685214], [-8081446,5685216], [-8081442,5685219], [-8081440,5685211], [-8081441,5685214]]
output = [arcpy.A_Reproj_Fn((coord[0], coord[1]), source_SR, dest_SR) for coord in input]

I have huge arrays of coordinates to reproject, but for performance issue I dont want to build a geometry object before reprojecting.

Thank you for any suggestion!

0 Kudos
1 Reply
NeilAyres
MVP Frequent Contributor

The projection engine will need geometries.

You could do this in python using geometry method .projectAs or just use the normal features of ArcMap.

You could add all your points (if that is what they are), in the source SR, then change the data frame to the target SR, then add those coordinates as attributes back to the original points.