for fc in lstFCs: rows = arcpy.SearchCursor(fc) print fc for row in rows: type = row.Shape geom = "%.4f" % type.centroid.X truegeom = "%.4f" % type.trueCentroid.X if geom != truegeom: print row.ObjectID del row, rows
fclist = gp.listfeatureclasses("arc_test*") for fc in fclist: rows = gp.searchcursor(fc) row = rows.next() while row: typ = row.Shape geom = str(typ.centroid.X) print row.getvalue("OBJECTID"), geom truegeom = str(typ.truecentroid.X) print row.getvalue("OBJECTID"), truegeom row = rows.next()
lstFCs = arcpy.ListFeatureClasses("*", "Polyline") for fc in lstFCs: rows = arcpy.SearchCursor(fc) print fc for row in rows: type = row.Shape geom = str(type.centroid.X) truegeom = str(type.trueCentroid.X) if geom != truegeom: print row.ObjectID del row, rows
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.