Luca, > > I'm writing a function to cycle inside the feature and update a column > of attribute table, if I print the feature with DumpReadable() I can > see the right attributes but when the script finish the final > shapefile has no attribute table, any idea? > > This is the relevant part of code > > featureDefn = lay0.GetLayerDefn() > field = ogr.FieldDefn(out_col, ogr.OFTReal) > featureDefn.AddFieldDefn(field)
As suggested in http://gdal.org/python/osgeo.ogr.FeatureDefn- class.html#AddFieldDefn , you must call CreateField() on the layer object instead. Even -- Spatialys - Geospatial professional services http://www.spatialys.com _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
