python gdal 修改shp文件的属性值
driver = ogr.GetDriverByName('ESRI Shapefile')
datasource = driver.Open(shpFileName, 1)
layer = datasource.GetLayer()
for feature in layer:
dataValue = numArray[j][i]
feature.SetField(field, dataValue)
layer.SetFeature(feature)
layer.ResetReading()