AnsweredAssumed Answered

insert records

Question asked by jayasudha123 on Dec 20, 2016
Latest reply on Dec 20, 2016 by bixb0012

The following code returns records from polygon shape file. The shape is returned as object.
How this object can be converted to array or list of coordinates so that it can be inserted into
oracle spatial table in MDSYS.SDO_ORDINATE_ARRAY


import arcpy
fc = "C:\\roads.shp"
fields = ["idnumber", "shape@"]

with arcpy.da.SearchCursor(fc, fields) as cursor:
for row in cursor:
print ("{0},{1}".format(row[0], row[1]))

 

pms,<geoprocessing describe geometry object object at 0x028D1FC0>
xrz,<geoprocessing describe geometry object object at 0x028D4100>
avx,<geoprocessing describe geometry object object at 0x028D1FC0>
cbm,<geoprocessing describe geometry object object at 0x028D4100>

Outcomes