Automatic calculation of the sides of a polygon

711
3
07-21-2017 01:10 PM
LorenzoGiacchetti
New Contributor

Hi everyone!

I'm quite new to this kind of software, so my question could be found trivial to expert users. I just want to automatically calculate the length of the sides of each polygon in my shape file. In particular i'd like to calculate the shortest side for each polygon and then add it to the attribute table.

Thanks so much to anyone who reads this

0 Kudos
3 Replies
DanPatterson_Retired
MVP Emeritus

It isn't going to happen automatically for shapefiles at all.  If you use a geodatabase featureclass you will get area and perimeter/length.  As for the shortest side, that will require you to script in some form to perform the calculations.  Python would be the language, so you may wish to examine the arcpy interface for more information

XanderBakker
Esri Esteemed Contributor

There are some additional things to keep in mind, like:

  • What defines the shortest "side" of a polygon (is this the minimum distance between consecutive vertices off the polygon?
  • Or can more than 2 vertices belong to a side and only a significant change in angle will define a new side? What angle would be significant?

As Dan_Patterson mentioned, everything is scriptable, but you will have to define some details first.

JoshuaBixby
MVP Esteemed Contributor

To illustrate xander_bakker‌'s comment, how many "sides" does the following polygon have?  4, 15, or something in between?

Example of polygon with 4 uneven "sides"