Is it possible to separate grid layout by setting distances between each polygon? I need certain distance gaps between each polygon. Attaching a screenshot of a grid
1 Answer
A simple "blunt" approach is to delete every other cell, this may be sufficient for your needs. You can take advantage of the row number and some clever use of maths to solve this.
Use the Fishnet tool to create your grid. Open the attribute table and select the first row, note its bottom left.
With attribute table still open run the select by attribute tool and set the where clause to be:
MOD("OID",2) = 0
In my case the unique row ID is OID, you might have FID or ObjectID, use the appropriate one.
This will select up alternate rows, confirm you have many selected polygons then run the Delete Features tool which will delete only the selected and you end up with:
arcpy.da.InsertCursor
, but it's conceivable to use CreateFishnet if you increase the density (five fifths in height to obtain 60% coverage) then identify the features at the top of the window for deletion, then dissolve the others. It's just math. Note that posting two closely related Questions in two hours is pushing the envelope on duplication, and your really ought to be using a Within for selection of the polygons.