T-shaped polygons

Is there any coefficient that can indicate T-shaped polygons ?

Examples of T-shaped polygons :

• Are you looking for an algorithm to automatically detect T-shaped polygons? – Aaron Mar 6 '14 at 16:48
• Yes ! It should not be a 100% success rate of detection, but if it could catch anything close to a T-shape that would be great. – Akheloes Mar 6 '14 at 17:04

I don't know of any off-the-shelf solution. However, here's an idea which you could work up into a script or possibly in Model Builder (WARNING- I don't have ArcGIS to hand, so can't test it, and some experimentation will be needed):

1. Convert the polygons to lines
2. Collapse dual lines to center lines. This will give something close to a straight skeleton of your polygons
3. Throw away the unresolved lines (they are clearly not T shaped polygons or parts of polygons. Note that since both the left and right side of each center line should be the same polygon outline, you could also reject all lines where the Leftline FID and RightLine FID are not identical.
4. Of the remaining lines, for each polygon compare the orientation of the segments and determine whether any two segments are within some threshold of 90 degrees (you choose your limits). If so, you could flag the polygon as T shaped.

Limitations:
- The work-flow I have described there will (if it works) also pick up X, Z and L shapes. However, if you make you algorithm for comparing segment orientations rather more sophisticated, then you should be able to refine it to detect T shapes by checking the connectivity of the various segments.
- I also can't remember off-hand whether the collapsed lines are presented as multilines or single lines for a given left-right casing FID combination or how the process handles the branching. Is there an angle at which a branch is presented as a separate line for instance? These factors will determine what you do next.
- I anticipate that you will need to possibly do some reorganization of the lines so that they can be handled sensibly by your algorithm the determines the T shape by orientation of the lines. Therefore, you will need to experiment a bit here.
- And another thing... once you have determined the branching pattern of your skeleton and decided that it is essentially T shaped, you will need to compare that to the polygon's area to perimeter ratio. A 'fat' polygon that you don't want to count as a T may result in a T shaped skeleton but will have a smaller perimeter to area ratio. Some of these issues can be resolved by setting the minimum_width option of the `Collapse Dual Lines` tool but a sanity check seems prudent.

Please remember, this is just an idea and you'd need to develop the solution yourself, but it is an approach I might start with.

If you don't have a suitable licence for these tools in ArcGIS then you could use/buy FME. I don't think ET GeoTools/GeoWizards will help with creating the straight skeleton but they might help with the how you present your lines to the final algorithm to determine T shapes.

• +1, thanks for your answer, it's been a good starting point, still, I've done some experimentation and found a difficulty in reorganizing the lines in a way that makes the Collapse Dual Lines To Centerline yield viable skeletons. I guess I'll have to work on this point for a while before I can report any progress to you (tried things like negative buffers, changing the distance for the Collapse Dual Lines To Centerline). I'll keep you updated. – Akheloes Mar 7 '14 at 10:44
• It's been a long time since I used this function, but I do recall similar problems. I think negative buffers was also one solution I tried. Another option could be to pre-sift your polygons by setting a selection threshold for 'thin polygons' (on the assumption that 'fat' ones are not sufficiently T shaped) by using the area to perimeter ratio comparison. Hopefully this would yield a set of polygons that are not only more likely to be T shaped but also more amenable to being collapsed to a skeleton. Just an idea! – MappaGnosis Mar 7 '14 at 10:52
• One way I found to determine good skeletons is the following : 1. Create a convex hull on the polygon, 2. Erase the polygon from its convex hull, 3. Use polygon to line on the last result, 4. Use the collapse dual tool on the last result 5. Perfom a selection on LnType (=1) This gives some good stuff, I'll still be working some more on this and giving you updates :) – Akheloes Mar 7 '14 at 11:14