This tool provides a measure of overall polygon shape complexity, or
irregularity, for both raster and vector features. Several shape
indices have been created to compare a polygon's shape to simple
Euclidean shapes (e.g. circles, squares, etc.). One of the problems
with this approach is that it inherently convolves the
characteristics of polygon complexity and elongation. The Shape
Complexity Index (*SCI*) was developed as a parameter for assessing
the complexity of a polygon that is independent of its elongation.
In fact, the *SCI* has a different definition for vector polygons and
raster polygons. For vector features, *SCI* relates a polygon's shape
to that of an encompassing convex hull. It is defined as:
`SCI = 1 - A / A`

_{h}

Where
where *A* is the polygon's area and *A _{h}* is
the area of the convex hull containing the polygon. Convex
polygons, i.e. those that do not contain concavities, have a value
of 0. As the shape of the polygon becomes more complex, the

For raster polygons, the *SCI* is the average number of line
intersections with polygon boundaries averaged for the N-S, E-W,
NW-SE, and NE-SW directions. Convex polygons will have a value of 2
and more irregular shaped polygons, including those containing holes,
will have higher values. The input raster grid should contain
polygons with unique identifiers greater than zero. The user must
also specify the name of the output raster file (where the radius of
gyration will be assigned to each feature in the input file) and
the specified option of outputting text data.

The following is an example of a Python script that uses this tool:

```
wd = pluginHost.getWorkingDirectory()
```

inputFile = wd + "polygons.shp" # vector input

outputFile = "" # ignored for vector input

textOutput = "false" # also ignored

args = [inputFile, outputFile, textOutput]

pluginHost.runPlugin("ShapeComplexityIndex", args, False)

This is a Groovy script also using this tool:

```
def wd = pluginHost.getWorkingDirectory()
```

def inputFile = wd + "polygons.dep" // raster input

def outputFile = wd + "output.dep"

def textOutput = "true"

String[] args = [inputFile, outputFile, textOutput]

pluginHost.runPlugin("ShapeComplexityIndex", args, False)

- John Lindsay (2013)