Enable Feature Binning (Data Management)

Summary

Enables database computation for 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 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

  • Database computation for feature binning is only supported for point and multipoint feature classes stored in an enterprise geodatabase or database. Feature binning in cloud data warehouses is only supported for point feature classes. The data cannot be versioned or archive enabled.

    Supported platforms are as follows:

    • Amazon Redshift
    • IBM Db2
    • Google BigQuery
    • Microsoft SQL Server
    • Oracle
    • PostgreSQL
    • SAP HANA
    • Snowflake

  • Only the owner of the feature class can enable feature binning. For Google BigQuery, which does not have table owners, the user who enables feature binning must have specific privileges granted. See Privileges for using ArcGIS with cloud data warehouses for more information.

  • Feature binning is not supported for external tables in Google BigQuery.

  • 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 binned 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 binned 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. For example, if you use a definition query or apply a time or range filter on a binned feature layer in a map, the static cache is ignored and the bin aggregation occurs dynamically.

  • To enable feature binning on a distributed table in Microsoft Azure Cosmos DB for PostgreSQL, the table must contain at least one integer column that is not nullable that ArcGIS can use as an ID column.

  • Use the Disable Feature Binning tool to disable the database computation capability from a layer if necessary. You can also turn off bin drawing for a layer in a map or scene in ArcGIS Pro, or switch to application driven computation by clicking the Computation Settings button on the Binning tab.

  • 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 database computed feature binning will be enabled. Supported input types are point and multipoint feature classes stored in an enterprise geodatabase or database, or point feature classes stored in a cloud data warehouse. 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 the Square, Flat hexagon, and Pointy hexagon options are supported. If you are using Snowflake or Redshift data, only the Geohash option is supported.

  • Flat hexagonThe flat hexagon binning scheme, also known as flat geohex or flat hexbinning, will be enabled. 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, PostgreSQL, and BigQuery data.
    Flat hexagon bin type
  • Pointy hexagonThe pointy hexagon binning scheme, also known as pointy geohex or pointy hexbinning, will be enabled. The tiles are a tessellation of hexagons in which the orientation of the hexagons has a point of the hexagon on top.
    Pointy hexagon bin type
  • SquareThe square binning scheme, also known as geosquare or squarebinning, will be enabled. The tiles are a tessellation of squares This is the default for Db2 and SAP HANA data.
    Square hexagon bin type
  • GeohashThe geohash binning scheme, in which the tiles are a tessellation of rectangles, will be enabled. Because geohash bins always use the WGS84 geographic coordinate system (GCS WGS84, EPSG WKID 4326), you cannot specify a bin coordinate system for geohash bins. This is the default and only option for Snowflake and Redshift data.
    Geohash bin type
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.

This parameter does not apply to BigQuery, Redshift, or Snowflake. For those platforms, the coordinate system of the input feature class is used.

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 the summary statistics will be calculated. Supported field types are short integer, long integer, big integer, float, and double.
  • Statistic Type—The type of statistic that will be calculated 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.
    • A static cache is generated by default for data in IBM Db2, Microsoft SQL Server, Oracle, and PostgreSQL.
    • To generate a static cache for feature classes in PostgreSQL that use PostGIS spatial types, GDAL libraries must be installed in the database.
    • A static cache is always generated for data in BigQuery, Redshift, and Snowflake.
  • 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 database computed 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 database computed feature binning will be enabled. Supported input types are point and multipoint feature classes stored in an enterprise geodatabase or database, or point feature classes stored in a cloud data warehouse. 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 the SQUARE, FLAT_HEXAGON, and POINTY_HEXAGON options are supported. If you are using Snowflake or Redshift data, only the GEOHASH option is supported.

  • FLAT_HEXAGONThe flat hexagon binning scheme, also known as flat geohex or flat hexbinning, will be enabled. 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, PostgreSQL, and BigQuery data.
    Flat hexagon bin type
  • POINTY_HEXAGONThe pointy hexagon binning scheme, also known as pointy geohex or pointy hexbinning, will be enabled. The tiles are a tessellation of hexagons in which the orientation of the hexagons has a point of the hexagon on top.
    Pointy hexagon bin type
  • SQUAREThe square binning scheme, also known as geosquare or squarebinning, will be enabled. The tiles are a tessellation of squares This is the default for Db2 and SAP HANA data.
    Square hexagon bin type
  • GEOHASHThe geohash binning scheme, in which the tiles are a tessellation of rectangles, will be enabled. Because geohash bins always use the WGS84 geographic coordinate system (GCS WGS84, EPSG WKID 4326), you cannot specify a bin coordinate system for geohash bins. This is the default and only option for Snowflake and Redshift data.
    Geohash bin type
String
bin_coord_sys
[bin_coord_sys,...]
(Optional)

The coordinate systems that will be used to visualize the aggregated output feature layer. You can specify 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.

This parameter does not apply to BigQuery, Redshift, or Snowflake. For those platforms, the coordinate system of the input feature class is used.

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 the summary statistics will be calculated. Supported field types are short integer, long integer, big integer, float, and double.
  • Statistic Type—The type of statistic that will be calculated 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.
    • A static cache is generated by default for data in IBM Db2, Microsoft SQL Server, Oracle, and PostgreSQL.
    • To generate a static cache for feature classes in PostgreSQL that use PostGIS spatial types, GDAL libraries must be installed in the database.
    • A static cache is always generated for data in BigQuery, Redshift, and Snowflake.
  • 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 database computed 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 = arcpy.SpatialReference('GCS_WGS_1984')
arcpy.management.EnableFeatureBinning(
    "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