I am new to this forum and have a question about creating and populating fields in attribute table of a shapefile. We are working at the parcel level and have a python script that calculates 12 metrics for each parcel each day for a year. Parcel characteristics, weather and utility data are used in the iterative daily calculations. The start and end dates are specified, twelve new fields are created each day, and the metrics are calculated for each parcel.
The issue is: When writing to the attribute table of the shapefile, it fails after about 3 months with a cannot create field error. The error occurs after the same number of days regardless of the start and end dates. When writing to a standalone table, however, it completes for a year without an issue.
Question: Is there a limit on the number of fields in the attribute table of a shapefile and does not apply to a standalone table?
Thanks in advance, Robert
- The maximum record length for an attribute is 4,000 bytes. The record length is the number of bytes used to define all the fields, not the number of bytes used to store the actual values.
- The maximum number of fields is 255. A conversion to shapefile will convert the first 255 fields if this limit is exceeded.