Calculating bounding box in ArcMap


[Editor’s note: I keep returning to this technique for calculating a feature’s extent (minimum bounding rectangle) in ArcGIS using the Field Calculator. Thanks William and Jeff!]

Republished in part from ESRI Forums.
Sample Field Calculator code for computing XMIN appears below.

Information about shape properties appears in the “Geometry Object
” diagram (pdf). All four parameters are Xmin, Xmax, Ymin, and Ymax.

dim Output as double
dim pGeom as IGeometry

set pGeom = [shape]
Output = pGeom.Envelope.XMin

Tags: , , , , , , , , ,

One Response to “Calculating bounding box in ArcMap”

  1. Nathaniel says:

    dim pPointColl as IPointCollection
    set pPointColl = [Shape]
    a = pPointColl.PointCount