Skip to main content
  • 3,353 Posts
  • 13,750 Replies
3353 Posts
Reading Attributes from a File Geodatabase and create Features via Python

Hi, I want to read only one Attribute(FGDB_ID) from a File Geodatabase with Python.The geometry is not required. The readout of the File Geodatebase works well, but no features are generated. The Attributes will be printed only in the log window, but no Features will be generated.How can I create features from the individual values?import fmeobjectsimport arcpy# Template Classclass FeatureCreator(object):    def __init__(self):        # Name der FC        fc = "\\\\path\\gdb.gdb\\GK_ANNO"        # Ergebnisliste        FGDB_ID = []        # ArcPy-Suchcursor erstellen und auf die entsprechende Spalte der FC        # ansetzen.        cursor = arcpy.SearchCursor(fc, "", "", "FGDB_ID")        # Spalte zeilenweise auslesen...        for row in cursor:        # ... und FGDB_ID an Ergebnisliste anhängen.            FGDB_ID.append(row.FGDB_ID)

Badge Winners

Show all badges

Community Stats

32,263
Posts
122,463
Replies
39,956
Members

Latest FME