Available with Production Mapping license.

## Summary

Performs the selected Simplify and Smooth operations on a line or polygon feature class. When used with spatially related features, this tool helps to maintain coincidence between shared edges.

## Usage

A warning is raised if the input features are not in a projected coordinate system. This tool relies on linear distance units, which will create unexpected results in an unprojected coordinate system. It is strongly suggested that you run this tool on data in a projected coordinate system to ensure valid results. An error is raised and the tool will not process if the coordinate system is missing or unknown.

If feature classes are selected as topology feature classes, features from these feature classes that share a boundary with the main feature class will also be generalized to maintain coincidence.

The integrity of the results of this tool relies on the topological integrity of the inputs. Proper coincidence must exist between the edges of the input and topology feature classes. Features may visually look coincident but may not be coincident in the database. Running the Integrate tool to integrate all the input and topology feature classes can help to ensure database coincidence.

Extremely large features, especially lines with thousands of vertices, can cause performance issues. Running the Dice tool can subdivide large features into smaller features based on a specified vertex limit.

The input features must consist of valid geometries. Running the Repair Bad Geometry tool on each of the inputs removes invalid geometry in the data that could prevent the tool from successfully running.

When the Simplify operation is selected, the Simplify Line tool simplifies the feature using one of these algorithms:

- The POINT_REMOVE method is the faster of the two algorithms; it removes redundant vertices. Use this method for data compression or more coarse simplification. The angularity (sharp corners) of the resulting line increases significantly as the tolerance increases, so the result may be less aesthetically pleasing than the input.
- The BEND_SIMPLIFY method is slower but typically produces results that are more faithful to the original features; it operates by eliminating insignificant bends along lines. Use this method for more refined simplification.
- The WEIGHTED_AREA algorithm works by first identifying triangles of effective area for each vertex. Those triangles are then weighted by a set of metrics to compare the flatness, skewness, and convexity of each area. The weighted areas guide the removal of their corresponding vertices to simplify the polygon outline while retaining as much character as possible.

When the Smooth operation is selected, the Smooth Line tool smooths the feature.

The tool sets a tolerance used by the Polynomial Approximation with Exponential Kernel (PAEK) algorithm. A tolerance must be specified and it must be greater than zero. You can choose a preferred unit; the default is the feature unit.

When using the BEZIER_INTERPOLATION smoothing algorithm, you must enter a zero (0) as the placeholder.

This tool cannot be run on data in an edit session. If you attempt to run the tool on data during an edit session, the error ERROR 000496: table is being edited appears. When this error appears, stop editing and run the script again.

## Syntax

arcpy.production.GeneralizeSharedFeatures(Input_Features, Generalize_Operation, Simplify_Tolerance, Smooth_Tolerance, {Topology_Feature_Classes}, {Simplification_Algorithm}, {Smoothing_Algorithm})

Parameter | Explanation | Data Type |

Input_Features | The features that will be generalized and smoothed. This must be a line or polygon feature class. | Feature Layer |

Generalize_Operation | Specifies the type of operation to perform on the line or polygon features. The Simplify and Smooth operations will be run as listed in the selected operation. - SIMPLIFY —Runs Simplify only once on the line or polygon features.
- SMOOTH —Runs Smooth only once on the line or polygon features.
- SIMPLIFY_SMOOTH —Runs Simplify and Smooth once on the line or polygon features.
- SIMPLIFY_SMOOTH_SIMPLIFY —Runs Simplify, Smooth, and Simplify on the line or polygon features.
- SIMPLIFY_SMOOTH_SIMPLIFY_SMOOTH —Runs Simplify and Smooth twice on the line or polygon features in the order listed.
| String |

Simplify_Tolerance | The tolerance used by the simplification algorithm. When a Simplify operation is used, the tolerance must be greater than zero (0). | Linear unit |

Smooth_Tolerance | The tolerance used by the smoothing algorithm. When a Smoothing operation is used, the tolerance must be greater than zero (0). | Linear unit |

Topology_Feature_Classes [Topology_Feature_Classes,...] (Optional) | One or more feature layers that are spatially related to the input features. Features that are coincident with the input features will maintain coincidence after generalization. Only the edges of the features that share a boundary with the input features will be modified. These must be line or polygon features. | Feature Layer |

Simplification_Algorithm (Optional) | Specifies the line simplification algorithm. - POINT_REMOVE —Retains critical points that depict the essential shape of a line and removes all other points. This is the default.
- BEND_SIMPLIFY —Retains the critical bends in a line and removes extraneous bends.
- WEIGHTED_AREA —Retains vertices that form triangles of the effective area. This algorithm works by first identifying triangles of effective area for each vertex.
| String |

Smoothing_Algorithm (Optional) | Specifies the smoothing algorithm. - PAEK —Acronym for Polynominal Approximation with Exponential Kernel. It calculates a smoothed line that will not pass through the input line vertices. This is the default.
- BEZIER_INTERPOLATION —Fits Bezier curves between vertices. The resulting line passes through the vertices of the input line. This algorithm does not require a tolerance. Bezier curves will be approximated when the output is a shapefile.
| String |

## Code sample

##### GeneralizeSharedFeatures example (stand-alone script)

The following stand-alone sample script demonstrates how to use GeneralizeSharedFeatures.

```
# Name: GeneralizeSharedFeaturesExample.py
# Description: Simplifies and smooths line or polygon features based on the selected
# operation.
# Author: Esri
# Date: May 2017
# Import arcpy module
import arcpy
# Check out Production Mapping license
arcpy.CheckOutExtension("Foundation")
# set environment
arcpy.env.workspace="c:/data/Edit_Sample.gdb"
# Define variables
inFeatures="Features/CoastA"
topoFeatures="Features/CoastL"
# Generalize polygon feature and maintain coincidence with shared edges
arcpy.GeneralizeSharedFeatures_production(inFeatures,"SIMPLIFY_SMOOTH","10 Meters","10 Meters",topoFeatures)
# Check in Production Mapping license
arcpy.CheckInExtension("Foundation")
```

## Environments

## Licensing information

- Basic: No
- Standard: No
- Advanced: Requires Production Mapping