Enable Feature Binning (Data Management)

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

Enable Feature Binning tool 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. However, the cache is not necessarily created for all levels of detail. 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 the 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.

Parameters

LabelExplanationData Type
Input 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.

  • Flat hexagonThis binning scheme is also known as flat geohex or flat hexbinning. The tiles are a tessellation of hexagons in which the orientation of the hexagons has a flat edge of the hexagon on top. This is the default for Microsoft SQL Server, Oracle, and PostgreSQL data.
  • Pointy hexagonThis binning scheme is also known as pointy geohex or pointy hexbinning. The tiles are a tessellation of hexagons in which the orientation of the hexagons has a point of the hexagon on top.
  • SquareThis binning scheme is also known as geosquare or squarebinning. The tiles are a tessellation of squares This is the default for Db2 and SAP HANA data. This is the only available bin type for SAP HANA data.
  • GeohashIn this binning scheme, the tiles are a tessellation of rectangles. Because geohash bins always use the WGS 1984 geographic coordinate system (GCS WGS 1984, EPSG WKID 4326), you cannot specify a bin coordinate system for geohash bins.
String
Bin Coordinate Systems
(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 Statistics
(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.

  • Field—The field on which to calculate the summary statistics. Supported field types are short integer, long integer, float, and double.
  • Statistic Type—The type of statistic to calculate for the specified field. Statistics are calculated for all features in the bin. Available statistics types are as follows:
    • Mean (AVG)—Calculates the average for the specified field
    • Minimum (MIN)—Finds the smallest value for all records of the specified field
    • Maximum (MAX)—Finds the largest value for all records of the specified field
    • Standard deviation (STDDEV)—Calculates the standard deviation value for the field
    • Sum (SUM)—Adds the total value for the specified field

Value Table
Generate Binning 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.

  • Checked—A static cache of the aggregated results will be generated. It is recommended that you use this option for better performance. However, changes to the underlying data will not be updated in the cache unless the Manage Feature Bin Cache tool is run. This is the default for IBM Db2, Microsoft SQL Server, Oracle, and PostgreSQL data. You cannot generate a static cache for SAP HANA data. To generate a static cache for feature classes in PostgreSQL that use PostGIS spatial types, GDAL libraries must be installed in the database.
  • Unchecked—A static cache of the aggregated results will not be generated, and visualizations will be aggregated on the fly. This is the only option for SAP HANA data.

Boolean

Derived Output

LabelExplanationData Type
Updated Features

The updated input with feature binning enabled.

Feature Layer

arcpy.management.EnableFeatureBinning(in_features, {bin_type}, {bin_coord_sys}, {summary_stats}, {generate_static_cache})
NameExplanationData 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.

  • FLAT_HEXAGONThis binning scheme is also known as flat geohex or flat hexbinning. The tiles are a tessellation of hexagons in which the orientation of the hexagons has a flat edge of the hexagon on top. This is the default for Microsoft SQL Server, Oracle, and PostgreSQL data.
  • POINTY_HEXAGONThis binning scheme is also known as pointy geohex or pointy hexbinning. The tiles are a tessellation of hexagons in which the orientation of the hexagons has a point of the hexagon on top.
  • SQUAREThis binning scheme is also known as geosquare or squarebinning. The tiles are a tessellation of squares This is the default for Db2 and SAP HANA data. This is the only available bin type for SAP HANA data.
  • GEOHASHIn this binning scheme, the tiles are a tessellation of rectangles. Because geohash bins always use the WGS 1984 geographic coordinate system (GCS WGS 1984, EPSG WKID 4326), you cannot specify a bin coordinate system for geohash bins.
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.

  • Field—The field on which to calculate the summary statistics. Supported field types are short integer, long integer, float, and double.
  • Statistic Type—The type of statistic to calculate for the specified field. Statistics are calculated for all features in the bin. Available statistics types are as follows:
    • Mean (AVG)—Calculates the average for the specified field
    • Minimum (MIN)—Finds the smallest value for all records of the specified field
    • Maximum (MAX)—Finds the largest value for all records of the specified field
    • Standard deviation (STDDEV)—Calculates the standard deviation value for the field
    • Sum (SUM)—Adds the total value for the specified field

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.

  • STATIC_CACHEA static cache of the aggregated results will be generated. It is recommended that you use this option for better performance. However, changes to the underlying data will not be updated in the cache unless the Manage Feature Bin Cache tool is run. This is the default for IBM Db2, Microsoft SQL Server, Oracle, and PostgreSQL data. You cannot generate a static cache for SAP HANA data. To generate a static cache for feature classes in PostgreSQL that use PostGIS spatial types, GDAL libraries must be installed in the database.
  • DYNAMICA static cache of the aggregated results will not be generated, and visualizations will be aggregated on the fly. This is the only option for SAP HANA data.
Boolean

Derived Output

NameExplanationData Type
out_features

The updated input with feature binning enabled.

Feature Layer

Code sample

EnableFeatureBinning example (Python window)

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

This tool does not use any geoprocessing environments.

Licensing information

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

Related topics