मुख्य कारण मैं देख सकता हूँ कि एक फीचर क्लास नहीं बनाना चाहता क्योंकि arcpy.CreateFeatureclass_management धीमा हो सकता है। आप arcpy.da.NumPyArrayTofeatureClass का भी उपयोग कर सकते हैं, जो in_memory फीचर कक्षाओं के लिए कम या ज्यादा त्वरित है:
In [1]: import arcpy
In [2]: import numpy as np
In [3]: geosr = arcpy.SpatialReference('Geographic Coordinate Systems/Spheroid-based/WGS 1984 Major Auxiliary Sphere')
In [4]: tosr = arcpy.SpatialReference('Projected Coordinate Systems/World/WGS 1984 Web Mercator (auxiliary sphere)')
In [5]: npai=list(enumerate(((-115.12799999956881, 36.11419999969922), (-117, 38.1141))))
In [6]: npai
Out[6]: [(0, (-115.12799999956881, 36.11419999969922)), (1, (-117, 38.1141))]
In [7]: npa=np.array(npai, np.dtype(([('idfield', np.int32), ('XY', np.float, 2)])))
In [8]: npa
Out[8]:
array([(0, [-115.12799999956881, 36.11419999969922]),
(1, [-117.0, 38.1141])],
dtype=[('idfield', '<i4'), ('XY', '<f8', (2,))])
In [9]: fcName = arcpy.CreateScratchName(workspace='in_memory', data_type='FeatureClass')
In [10]: arcpy.da.NumPyArrayToFeatureClass(npa, fcName, ['XY'], geosr)
In [11]: with arcpy.da.SearchCursor(fcName, 'SHAPE@XY', spatial_reference=tosr) as cur:
...: print list(cur)
...:
[((-12815990.336048, 4316346.515041453),), ((-13024380.422813002, 4595556.878958654),)]