I have a shapefile in which there are a series of polygons that I have to attribute to the name of a project which are recorded in 6 attribute fields. For each polygon there might be one to 6 projects associated. I need for each instance of a project name to have one polygon (up to 6 identical but for the name of the project) associated so that I can later dissolve the polygons according to the projects names.
I've used the pyshp module but I encounter a problem with the writing of the new polygon shapes based on the existing polygons. I read the existing using shapes[i].parts but it returs  to most of the shapes. Could you please give me a hand solving this issue ?
Here is my code :
import shapefile #### Set input and target feature inputShp = r"Pre-treatment\FP_BVC_Polygons.shp" targShp= "Pre-treatment\FP_BVC_Polygons_test" sf= shapefile.Reader(inputShp) shapes= sf.shapes() records = sf.records() fields=sf.fields w=shapefile.Writer(shapefile.POLYGON) for i in range(0,len(records)): for j in range(12,19): if records[i][j] != "0": listGeom.append(list(shapes[i].points)) listRecord.append(records[i]) del i,j for i in range(0, len(listGeom)): w.poly(points=listGeom[i]) for i in range(0,len(fields)): w.field(fields[i],fields[i],fields[i],fields[i]) for rec in listRecord: w.record(rec,rec,rec,rec,rec,rec,rec,rec,rec, rec,rec,rec,rec,rec,rec,rec,rec,rec,rec) w.save(targShp)