Open Table of Contents

ET GeoWizards Scripting

FeaturesToBoundingRectangles
(Go to the main page of the function)

Note: FeaturesToBoundingRectangles method is obsolete. Use FeaturesToBoundingRectangles2 method instead.

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.

Syntax

Dim ET As  New ETGW_Core
Set variable =  ET.
FeaturesToBoundingRectangles2(pInFeatureClass,  sOutFileName, sAlign, sMessage)

The FeaturesToBoundingRectangles2 method syntax has the following object qualifier and arguments:

Part Description
pInFeatureClass Required. An IFeatureClass object ( Polygon or Polyline feature class)
sOutFileName Required. A String - the full name of the output feature class (A feature class with the same full name should not exist)
sAlign Required. A string defining the orientation of the rectangles to be created
  • "side" - aligns the rectangle along the longest segment of the polygon boundary
  • "axis" - aligns the rectangle along  the longest axis of the original polygons
  • "area" - Minimum area rectangle
sMessage Optional. In a case of failure -  description of the cause. If the functions completes with success an empty string will be returned. 

Example