Features To Minimum Bounding Rectangles

Running programmatically

Creates a bounding rectangle from each feature in the input feature class. Three ways to align the rectangles are available. Attributes of the original features are transferred to the resulting polygons.

Inputs:

Outputs:

Examples:

Bounding rectangle aligned with the longest segment of the boundary of the input polygon

Bounding rectangle aligned with the longest axis of the boundary of the input polygon

Minimum area bounding rectangle

Running Programmatically

(Go to TOP)

Parameters

Expression Explanation
Function Name FeaturesToRectangles
<input dataset> A String representing the input layer.
<output dataset> A String - the full name of the output layer.
{Alignment} A String defining the orientation of the rectangles to be created
  • "LongestSegment" - aligns the rectangle along the longest segment of the polygon boundary
  • "LongestAxis" - aligns the rectangle along the longest axis of the original polygons
  • "MinArea" - Minimum area rectangle"

Running the function

ETGWPath used in the table below is the  full path to ETGWRun.exe (E.G. "C:\Program Files\ETSpatial Techniques\ETGeo Wizards\ETGWRun.exe")

Language Syntax
Python subprocess.call([ETGWPath, "FeaturesToRectangles", "input dataset", "output dataset", "Alignment"])
.NET using ETGWRun.exe StartInfo.FileName = ETGWPath
StartInfo.Arguments = "FeaturesToRectangles" "input dataset" "output dataset" "Alignment"
.NET using ETGWOutX.dll FeaturesToRectangles(input dataset, output dataset,Alignment)
ArcPy arcpy.FeaturesToRectangles(input dataset, output dataset,Alignment)

Notes:

(Go to TOP)