Create Cartographic Partitions (Cartography)

Summary

Creates a mesh of polygon features that cover the input feature class where each polygon encloses no more than a specified number of input features or input vertices, determined by the density and distribution of the input features.

The resulting partition feature class is ideally suited for the Cartographic Partitions geoprocessing environment setting. The Cartographic Partitions environment setting dictates to certain geoprocessing tools to load and process input features by partition. These tools operate contextually, meaning that multiple features, possibly from multiple themes, must be loaded simultaneously. Memory limitations are encountered with large datasets. Partitioning allows large datasets to be processed by these tools in portions sequentially.

Illustration

Partition polygon features created for world road features
Partition polygon features created for world road features

Usage

Syntax

arcpy.cartography.CreateCartographicPartitions(in_features, out_features, feature_count, {partition_method})
ParameterExplanationData Type
in_features
[in_features,...]

The input feature classes or layers whose feature distribution and density, or vertex distribution and density, dictate the size and arrangement of output polygons. The input features are typically destined for subsequent processing with other geoprocessing tools. Typically, the input features, when considered simultaneously, would exceed memory limitations of other tools, so partitions are created to subdivide inputs for processing.

Feature Layer
out_features

The output polygon feature class of partitions, each of which encloses a manageable number of input features, or manageable number of input vertices, not exceeding the number specified by the feature_count parameter.

Feature Class
feature_count

The ideal number of features or vertices (depending on the partition_method parameter) to be enclosed by each polygon in the output feature class. The recommended count for features is 50,000, which is the default value. For vertices, 1 million vertices will consume around 0.5 GB of memory depending on the tool using the partitions. The feature count cannot be lower than 500.

Long
partition_method
(Optional)

Specifies whether the feature_count parameter references the ideal number of features or the ideal number of vertices in each output polygon.

  • FEATURESPartitioning considers the number and density of individual features. This method is applicable in most cases, and is the default.
  • VERTICESPartitioning considers the number and density of vertices. This is used in cases where the input data contains a relatively small number of very complex features, like high-resolution country polygons, or where very long features are likely to cross multiple partition boundaries, like contour lines.
String

Code sample

CreateCartographicPartitions example (Python window)

The following Python window script demonstrates how to use the CreateCartographicPartitions tool in immediate mode.

import arcpy
arcpy.env.workspace = "C:/data/cartography.gdb/transportation"
arcpy.CreateCartographicPartitions_cartography("roads.lyr", "partitions", 50000, "FEATURES")

Licensing information

  • Basic: No
  • Standard: No
  • Advanced: Yes

Related topics