I'm doing a grid based analysis for functional room capacity, trying to verify out how many 30 square foot blocks will fit comfortably in a room. I'm confirming this visually and against numbers generated in Excel by an architect. It works very well using the Select features by location tool within a distance of -3 feet from the polygon edge in generally rectangular rooms. However, I have to change this threshold to around -6 feet before it starts to make sense in awkwardly shaped rooms. I need to apply the same methodology to thousands of rooms, so I need the threshold to be a variable. Is there a programmatic way to identify irregularly shaped polygons? Should I look at Calculate Metrics from the Topographic Production Tools? I think my organization might have a license for this.
How would you define an irregular shaped polygon?
As a quick starter you might want to look at the perimeter/area ratio. Calculate it for each poly, then look at the values for what you consider an irregular shape and use that as your threshold.
The definition is the issue. I calculated the P/A ratio of the room in the screenshot, and another room in the same building that is totally square. The wacky room's ratio is 0.21 and the square is 0.13. I'll try using >0.2 as the threshold for irregular shapes and see how it does.
Well, the P/A ratio works really well in many cases. <0.15 ratio using -3 foot distance threshold and >.02 ratio using -6 foot distance threshold results in a reasonable number of selected grid cells. However, in this particular case in the photo below, the opposite is true. These rooms have a very low P/A ratio, but using -3 feet results in too many grid squares being selected (in this case 27). Using -6 feet is more reasonable (20 grid cells selected), but that blows up the model. We want to count grid cells inside the room, but using 'within' or 'completely within' also results in far too few grid cells being selected.