ArcGIS for Desktop

  • Documentation
  • Pricing
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS for Desktop

A complete professional GIS

ArcGIS for Server

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Pricing
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Minimum Bounding Geometry

  • Summary
  • Illustration
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

Creates a feature class containing polygons which represent a specified minimum bounding geometry enclosing each input feature or each group of input features.

Illustration

Minimum Bounding Geometry tool illustration

Usage

  • The output polygon features and their attributes will vary depending on the specified geometry type and grouping choices.

  • License:

    The Geometry Type (geometry_type) options CONVEX_HULL, CIRCLE, and ENVELOPEEnvelope are only available with an ArcGIS for Desktop Advanced license.

  • The Group Option parameter on the dialog box (the group_option parameter in Python) will affect the output polygons and attributes in the following ways:

    • Using NONE, none of the input features will be grouped. An output polygon feature will be created for each input feature; the resulting polygons may overlap. The attributes of the input features will be maintained in the output feature class. A new field, ORIG_FID, will be added to the output feature class and set to the input feature IDs.
    • Using ALL, one output polygon feature will be created for all input features. The attributes of the input features will not be maintained in the output feature class.
    • Using LIST, each set of input features with the same field values in the specified group field(s) will be treated as a group. An output polygon feature will be created for each group; the resulting polygons may overlap. The attributes of the input features used as the group field or fields will be maintained in the output feature class.
  • Each geometry type can be characterized by one or more unique measurements; these measurements can optionally be added to the output as new fields as described below. The width, length, and diameter values are in feature units; the orientation angles are in decimal degrees clockwise from north. The prefix, MBG_, indicates minimum bounding geometry field.

    • For RECTANGLE_BY_AREA and RECTANGLE_BY_WIDTH, the new fields and measurements are:
      • MBG_Width—The length of the shorter side of the resulting rectangle.
      • MBG_Length—The length of the longer side of the resulting rectangle.
      • MBG_Orientation—The orientation of the longer side of the resulting rectangle.
    • For ENVELOPE, the new fields and measurements are:
      • MBG_Width—The length of the shorter side of the resulting rectangle.
      • MBG_Length—The length of the longer side of the resulting rectangle.
    • For CONVEX_HULL, the new fields and measurements are:
      • MBG_Width—The shortest distance between any two vertices of the convex hull. (It may be found between more than one pair of vertices, but the first found will be used.)
      • MBG_Length—The longest distance between any two vertices of the convex hull; these vertices are called antipodal pairs or antipodal points. (It may be found between more than one pair of vertices, but the first found will be used.)
      • MBG_APodX1—The x coordinate of the first point of the antipodal pairs.
      • MBG_APodY1—The y coordinate of the first point of the antipodal pairs.
      • MBG_APodX2—The x coordinate of the second point of the antipodal pairs.
      • MBG_APodY2—The y coordinate of the second point of the antipodal pairs.
      • MBG_Orientation—The orientation of the imagined line connecting the antipodal pairs.
    • For CIRCLE, the new field and measurement are:
      • MBG_Diameter—The diameter of the resulting circle.
  • There are special cases of input features that would result in invalid (zero-area) output polygons. In these cases, a small value derived from the input feature XY Tolerance will be used as the width, length, or diameter to create output polygons. These polygons serve as 'place holders' for keeping track of features. If the resulting polygons appear 'invisible' in ArcMap using the default polygon outline width, change to a thicker outline line symbol to display them. The examples of these cases include:

    • If a multipoint feature contains only one point or a group of such features are coincident, a very small square polygon will be created around the point for geometry types, RECTANGLE_BY_AREA, RECTANGLE_BY_WIDTH, CONVEX_HULL, and ENVELOPE; and a very small circle for geometry type CIRCLE. The MBG_Width, MBG_Length, MBG_Orientation, and MBG_Diameter values will be set to zero to indicate these cases.
    • If an input feature or a group of input features are perfectly aligned, for example, a horizontal or vertical line or a two-point multipoint feature, a rectangle polygon with a very small width will be created around the feature. This applies to geometry types RECTANGLE_BY_AREA, RECTANGLE_BY_WIDTH, CONVEX_HULL, and ENVELOPE; the resulting MBG_Width value will be set to zero to indicate these cases.

Syntax

MinimumBoundingGeometry_management (in_features, out_feature_class, {geometry_type}, {group_option}, {group_field}, {mbg_fields_option})
ParameterExplanationData Type
in_features

The input features that can be point, multipoint, line, polygon, or multipatch.

Feature Layer
out_feature_class

The output polygon feature class.

Feature Class
geometry_type
(Optional)

Specifies what type of minimum bounding geometry the output polygons will represent.

  • RECTANGLE_BY_AREA —The rectangle of the smallest area enclosing an input feature. This is the default.
  • RECTANGLE_BY_WIDTH —The rectangle of the smallest width enclosing an input feature.
  • CONVEX_HULL —The smallest convex polygon enclosing an input feature.
  • CIRCLE —The smallest circle enclosing an input feature.
  • ENVELOPE —The envelope of an input feature.
License:

The CONVEX_HULL, CIRCLE, and ENVELOPE options are only available with an ArcGIS for Desktop Advanced license.

String
group_option
(Optional)

Specifies how the input features will be grouped; each group will be enclosed with one output polygon.

  • NONE —Input features will not be grouped. This is the default. This option is not available for point input.
  • ALL —All input features will be treated as one group.
  • LIST —Input features will be grouped based on their common values in the specified field or fields in the group field parameter.
String
group_field
[group_field,...]
(Optional)

The field or fields in the input features that will be used to group features, when LIST is specified as group_option. At least one group field is required for LIST option. All features that have the same value in the specified field or fields will be treated as a group.

Field
mbg_fields_option
(Optional)

Specifies whether to add the geometric attributes in the output feature class or omit them in the output feature class.

  • NO_MBG_FIELDS —Omits any input attributes in the output feature class. This is the default.
  • MBG_FIELDS —Adds the geometric attributes in the output feature class.
Boolean

Code sample

MinimumBoundingGeometry Example 1 (Python window)

The following Python window script demonstrates how to use the MinimumBoundingGeometry function in immediate mode.

import arcpy
from arcpy import env
env.workspace = "C:/data"
arcpy.MinimumBoundingGeometry_management("parks.shp",
                                         "c:/output/output.gdb/parks_mbg",
                                         "RECTANGLE_BY_AREA", "NONE")
MinimumBoundingGeometry Example 2 (stand-alone script)

The following stand-alone script is a simple example of how to apply the MinimumBoundingGeometry function in a scripting environment.

# Name: MinimumBoundingGeometry.py
# Description: Use MinimumBoundingGeometry function to find an area 
#              for each multipoint input feature.

# import system modules 
import arcpy
from arcpy import env

# Set environment settings
env.workspace = "C:/data"

# Create variables for the input and output feature classes
inFeatures = "treeclusters.shp"
outFeatureClass = "forests.shp"

# Use MinimumBoundingGeometry function to get a convex hull area
#         for each cluster of trees which are multipoint features
arcpy.MinimumBoundingGeometry_management(inFeatures, outFeatureClass, 
                                         "CONVEX_HULL", "NONE")

Environments

  • Current Workspace
  • Scratch Workspace
  • Default Output Z Value
  • M Resolution
  • M Tolerance
  • Output M Domain
  • Output Z Domain
  • Output Coordinate System
  • Extent
  • Output has M values
  • Output has Z values
  • Output Spatial Grid 1
  • Output Spatial Grid 2
  • Output Spatial Grid 3
  • XY Resolution
  • XY Tolerance
  • Z Resolution
  • Z Tolerance

Licensing information

  • ArcGIS for Desktop Basic: Yes
  • ArcGIS for Desktop Standard: Yes
  • ArcGIS for Desktop Advanced: Yes

Related topics

  • An overview of the Features toolset

ArcGIS for Desktop

  • Home
  • Documentation
  • Pricing
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS for Desktop
  • ArcGIS for Server
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal