serialize polygons to disk and to binary write.