Generalize

Title  Generalize

Summary

Geoprocessing tool that performs a Douglas-Peucker simplification on features.


Illustration

The line is simplified within the boundary of the maximum allowable offset

Usage


Syntax

Parameter Explanation
in_features

The polygon or line features to be generalized.

tolerance (Optional)

The tolerance sets the maximum allowable offset, which will determine the degree of simplification. This value limits the distance the output geometry can differ from the input geometry. You can specify a preferred unit of measurement. The default is the feature unit.

esri_out_feature_service_name (Optional)

The name of the optional feature service to create on the federated server containing the result of this tool. If no name is specified an output feature service will not be created.

Code Samples

Generalize example 1 (Python window)

The following Python window script demonstrates how to use the Generalize function in immediate mode:


import arcpy
arcpy.env.workspace = "C:\data\data.gdb"
arcpy.Generalize_edit("zones", "10 Feet")

                    

Generalize example 2 (stand-alone script)

The stand-alone script below is an example of how to use the Generalize function in a workflow where features are first simplified and then buffered:


# Name: BufferZones.py
# Purpose: Simplify features using the Generalize tool and then Buffer them

# Import script modules
import arcpy

# Set the workspace
arcpy.env.workspace = "C:/data/data.gdb"

# Set local parameters
inFeatures = "zones"
gTolerance = "4 Feet"
copFeatures = "zones_cp"
bufDist = "50 Miles"
bufOutput = "zones_buff"

# Since Generalize permanently updates the input, first make a copy of the 
# original feature class
arcpy.CopyFeatures_management (inFeatures, copFeatures)

# Use the Generalize tool to simplify the Buffer input to shorten Buffer 
# processing time
arcpy.Generalize_edit(copFeatures, gTolerance)

# Buffer the output
arcpy.Buffer_analysis(copFeatures, bufOutput, bufDist)

                    

Tags

Credits

Use limitations