Skip to main content
Solved

Classifying polygon by shape

  • January 21, 2025
  • 5 replies
  • 58 views

arenscott
Contributor
Forum|alt.badge.img+4

Hi all, 

I’d like to classify polygons by shape, these might include: pie shaped, L shaped, T shaped.

I was originally thinking that I’d have to convert them to raster and use some sort of supervised classification. Another method might be to convert them to centerlines and compare their linework: a T shape polygon would have 1 or 2 lines at the top, meeting at 90degrees to another line point downwards

Best answer by ctredinnick

For Circle, Square, you have bounding box and circularity approaches. L, or T shaped sounds like you’re interested in the number of concave parts of the shape.

You could Generalise it to remove noise/complexity, Thin, with a tolerance like half the distance across the polygon. HullReplacer, then clip it against itself to count the concave parts.

It’s difficult to know the limitations because it’s dependent on how you’ll use it.

A raster classification would be viable if one already exists. If it doesn’t then you have to weigh the time to make it, and how long it will be useful for.

View original
Did this help you find an answer to your question?

5 replies

geomancer
Evangelist
Forum|alt.badge.img+47
  • Evangelist
  • January 21, 2025

Between what kinds of polygon shapes would you have to differentiate?

Number of points can be an indicator, the angles of the polygon, the number of angles that are larger than 90 degrees, the lengths of the sides, is the polygon convex or concave, maybe the ratio between area and circumference, and much more.

 


arenscott
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • January 21, 2025

Hi geomancer

We’re looking to basically classify non-square or rectangular polygons. 
These would have to be classified as pie shaped, L shaped, T shaped.

I think you’re right, an analysis of points, lines and angles could be very useful.

I found that initially excluding squares and rectangles (which we don’t care about) can be done by a bounding box transformer - then comparing the areas of both. They should be very similar

Perhaps some sort of AI tool or raster classification could also work?


hkingsbury
Celebrity
Forum|alt.badge.img+51
  • Celebrity
  • January 21, 2025

ctredinnick
Supporter
Forum|alt.badge.img+18
  • Supporter
  • Best Answer
  • January 21, 2025

For Circle, Square, you have bounding box and circularity approaches. L, or T shaped sounds like you’re interested in the number of concave parts of the shape.

You could Generalise it to remove noise/complexity, Thin, with a tolerance like half the distance across the polygon. HullReplacer, then clip it against itself to count the concave parts.

It’s difficult to know the limitations because it’s dependent on how you’ll use it.

A raster classification would be viable if one already exists. If it doesn’t then you have to weigh the time to make it, and how long it will be useful for.


arenscott
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • January 21, 2025

Thanks everyone, I really appreciate the thoughtful responses!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings