gcsnad83 = arcpy.SpatialReference(4269) pt = arcpy.Point() pt.X = 42.6544321 pt.Y = -143.132412 ptg = arcpy.PointGeometry(pt,gcsnad83) g = arcpy.Geometry() s = arcpy.ConvertCoordinateNotation_management(ptg, g, "#", "#", "SHAPE", "MGRS", "#", "#") print(arcpy.GetMessages(0)) print s
Solved! Go to Solution.
gcsnad83 = arcpy.SpatialReference(4269) pt = arcpy.Point() pt.X = -13.6544321 pt.Y = -123.132412 ptg = arcpy.PointGeometry(pt,gcsnad83) g = r"IN_MEMORY\table" arcpy.ConvertCoordinateNotation_management(ptg, g, "#", "#", "SHAPE", "MGRS", "#", "#") with arcpy.da.SearchCursor(g, ["MGRS"]) as cursor: for row in cursor: print row[0] del cursor
gcsnad83 = arcpy.SpatialReference(4269) pt = arcpy.Point() pt.X = -13.6544321 pt.Y = -123.132412 ptg = arcpy.PointGeometry(pt,gcsnad83) g = r"IN_MEMORY\table" arcpy.ConvertCoordinateNotation_management(ptg, g, "#", "#", "SHAPE", "MGRS", "#", "#") with arcpy.da.SearchCursor(g, ["MGRS"]) as cursor: for row in cursor: print row[0] del cursor