Buffer 3D (3D Analyst)

License Level:BasicStandardAdvanced

Summary

Creates a 3D buffer around point or line features.

Illustration

Buffer 3D illustration

Usage

Syntax

Buffer3D_3d (in_features, out_feature_class, buffer_distance_or_field, {buffer_joint_type}, {buffer_quality}, {simplification_tolerance})
ParameterExplanationData Type
in_features

The line or point features to be buffered.

Feature Layer
out_feature_class

The output multipatch features that represent the 3D buffers.

Feature Class
buffer_distance_or_field

The distance of the buffer around the input features, which can be provided as either a linear distance or be derived from a numeric field in the input feature's attribute table.

If the Distance linear units are not specified or are entered as Unknown, the linear unit of the input features' spatial reference is used.

Linear Unit; Field
buffer_joint_type
(Optional)

The shape of the buffer between the vertices of the line segments. This parameter is only valid for input line features.

  • STRAIGHTThe shape of connections between vertices will be straight. This is the default.
  • ROUNDThe shape of connections between vertices will be round.
String
buffer_quality
(Optional)

The number of segments used to represent the resulting multipatch features. The default is 20, but any number between the range of 6 to 60 can be entered.

Long
simplification_tolerance
(Optional)

Simplification eliminates vertices from the input lines by maintaining critical vertex points that define the shape of the original lines within the maximum allowable offset. By default, simplification will not take place unless a tolerance value is specified. The simplification tolerance can be defined as a string containing the numeric value and its desired linear unit of measure (for example, 1.5 Meters) or a numeric value without an associated unit of measure, in which case, it would default to the linear unit of the input's horizontal spatial reference.

Linear Unit

Code Sample

Buffer3D example 1 (Python window)

The following sample demonstrates the use of this tool in the Python window:

import arcpy
from arcpy import env

arcpy.CheckOutExtension('3D')
env.workspace = 'C:/data'
arcpy.Buffer3D_3d('lineFC.shp', 'buffer3d.shp', '15 Meters', 
                 'Round', 30, '1 Meters')
Buffer3D example 2 (stand-alone script)

The following sample demonstrates the use of this tool in a stand-alone Python script:

'''****************************************************************************
Name: Buffer 3D Example
Description: This script demonstrates an application of 
             the Buffer 3D and Inside 3D tools.
****************************************************************************'''
# Import system modules
import arcpy
from arcpy import env
import exceptions, sys, traceback

try:
    # Obtain a license for the ArcGIS 3D Analyst extension
    arcpy.CheckOutExtension('3D')
    # Set environment settings
    env.workspace = 'C:/data'
    # Set Local Variables
    inFC = 'lineFC.shp'
    bufferOut = 'buffer3d.shp'
    # Execute Buffer 3D
    arcpy.Buffer3D_3d(inFC, bufferOut, '15 Meters', 'Round', '30', '1 Meters')
    arcpy.Inside3D_3d(bufferOut, 'survey_pts.shp', 'inside_analysis.dbf')

except arcpy.ExecuteError:
    print arcpy.GetMessages()
except:
    # Get the traceback object
    tb = sys.exc_info()[2]
    tbinfo = traceback.format_tb(tb)[0]
    # Concatenate error information into message string
    pymsg = 'PYTHON ERRORS:\nTraceback info:\n{0}\nError Info:\n{1}'\
          .format(tbinfo, str(sys.exc_info()[1]))
    msgs = 'ArcPy ERRORS:\n {0}\n'.format(arcpy.GetMessages(2))
    # Return python error messages for script tool or Python Window
    arcpy.AddError(pymsg)
    arcpy.AddError(msgs)

Environments

Related Topics

Licensing Information

ArcGIS for Desktop Basic: Requires 3D Analyst
ArcGIS for Desktop Standard: Requires 3D Analyst
ArcGIS for Desktop Advanced: Requires 3D Analyst
11/8/2012