This question already has an answer here:
I am interested in converting a polygon featureclass created via Create Fishnet (Data Management) from singleparts to multipart. QGIS has a very handy tool called singleparts to multipart that does the job, however, I need to stay within the arcpy/Python realm. The ArcGIS equivalent appears to be Dissolve, yet the tool does not preserve individual feature geometry when the polygons share a border.
The following is an example of the type of fishnet polygon data I am working with, which was generated from the below script.
import arcpy # Create a fishnet with 9 columns and 9 rows # with origin at (1, 1) and output geometry is set to default (POLYGON) arcpy.CreateFishnet_management("C:/temp/fishnet2.shp", "1 1", "1 9", "1", "1", "9", "9", "#", "NO_LABELS", geometry_type = "POLYGON")
How can I convert a fishnet polygon from singleparts to multipart using a scripting approach?
*Note. There is a similar question at GIS SE (Create a single connected polygon from multiple polygons), although it appears to be limited to desktop tools. I am looking for any Python or arcpy-based approaches.