Summary
Enables feature binning on a feature class.
Feature binning is an advanced visualization capability that allows you to explore and visualize large datasets. It also helps you observe patterns at macro and micro levels with simple out-of-the-box mapping options. Feature binning aggregates large amounts of point features into dynamic polygon bins that vary through scaled levels of detail. A single bin represents all features within its boundaries at that level of detail. Feature binning can improve both drawing performance and data comprehension.
Learn more about binned feature layers.
Illustration
Usage
Feature binning is only supported for point and multipoint feature classes stored in an enterprise geodatabase or database. The data cannot be versioned or archive enabled.
Supported database platforms are as follows:
- IBM Db2
- Microsoft SQL Server
- Oracle
- PostgreSQL
- SAP HANA
Use the same coordinate system for the bins as the map containing the binned feature layer to avoid dynamic (on-the-fly) projection. If you are unsure of the coordinate system to use, an equal area projection such as World Cylindrical Equal Area is recommended. You cannot use a custom coordinate system.
For very large datasets or if the data is not updated often, you can enable a static cache of aggregated results. The cache is not necessarily created for all levels of detail however. The static cache can be managed by running the Manage Feature Bin Cache tool. Use this tool to specify the levels of detail of the static cache.
A bin-enabled layer switches to dynamic mode in a map when you zoom past the level of detail extent of the static cache. The Max cached level property on a bin-enabled layer's Layer Properties dialog box lists the maximum level of detail of the static cache. Static caches are generated using all the features of the dataset. So, if you use a definition query, or apply a time or range filter on a bin-enabled feature layer in a map, the static cache is ignored and the bin aggregation occurs dynamically.
Use the Disable Feature Binning tool to disable binning capability from a layer if necessary. You can also turn off bin drawing for a layer in a map or scene without disabling feature binning.
When feature binning is dynamic and you want to update the list of summary statistics stored in the feature class, you must disable and reenable feature binning. You can add new summary statistics to the feature layer in a map or scene from the layer's Summary Statistics dialog box. These summary statistics are stored with the layer only. They are not stored in the source feature class.
Syntax
arcpy.management.EnableFeatureBinning(in_features, {bin_type}, {bin_coord_sys}, {summary_stats}, {generate_static_cache})
Parameter | Explanation | Data Type |
in_features | The feature class for which feature binning will be enabled. Only point and multipoint feature classes stored in an enterprise geodatabase or database are supported. The data cannot be versioned or archive enabled. | Feature Layer |
bin_type (Optional) | Specifies the type of binning that will be enabled. If you are using SAP HANA data, only square bins are supported.
| String |
bin_coord_sys [bin_coord_sys,...] (Optional) | The coordinate systems that will be used to visualize the aggregated output feature layer. You can choose up to two coordinate systems to visualize the output layer. By default, the coordinate system of the input feature class is used. Custom coordinate systems are not supported. | Coordinate System |
summary_stats [[Field, Statistic Type],...] (Optional) | Specifies the statistics that will be summarized and stored in the bin cache. Statistics are used to symbolize bins and provide aggregate information for all the points in a bin. One summary statistic, the total feature count (shape_count), is always available. You can define up to five additional summary statistics.
| Value Table |
generate_static_cache (Optional) | Specifies whether a static cache of the aggregated results will be generated or visualizations will be aggregated on the fly. The cache is not necessarily created for all levels of detail.
| Boolean |
Derived Output
Name | Explanation | Data Type |
out_features | The updated input with feature binning enabled. | Feature Layer |
Code sample
Enable square feature binning on the Earthquakes feature layer that will have the count statistic added to the feature bin cache.
import arcpy
bin_coord_sys = "GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]",
arcpy.EnableFeatureBinning_management("lod_gdb.elec.Earthquakes",
"SQUARE",
bin_coord_sys,
"depth_km MAX",
"STATIC_CACHE")
Environments
Licensing information
- Basic: Yes
- Standard: Yes
- Advanced: Yes