User Tools

Site Tools


doc:aggregation

Shape aggregation

Documentation | Other Specifications | Shape aggregation

Aggregation is available since Version 11.37.0-Unstable2.

Dynamic aggregation

Spatial aggregation is a process of splitting data into groups based on localization. Dynamic means the aggregation process is repeated every time the map is redrawn, e.g., zoom change, extent change, or layer edition.

This functionality empowers a new approach to analyzing, interpreting, and managing maps. It also solves the problem of large dataset visualization.

The TatukGIS Developer Kernel (DK) provides three main types of aggregation, as follows:

  • binning,
  • clustering,
  • shape reduction.

To enable dynamic aggregation, simply assign an instance of the aggregator class to TGIS_LayerVector.DynamicAggregator property. The aggregator behavior can be controlled using properties:

  • Radius and RadiusAsText - a radius within which shapes will be grouped; use similar as Size from Params section. Using Param AsText syntax is preferred.
  • Threshold - minimum number of shapes to form a group.

The easiest way to play with aggregation is via Layer's properties form:

Binning

Binning methods use polygons to represent original shapes. The most common bin shapes are square and hexagon. In brief, the binning process involves a few steps:

  1. Creating a grid of polygons in adopted shape and radius. Grid should cover the map and layer common extent.
  2. Overlaying a polygonal grid with original shapes.
  3. Counting shapes, or summarizing field values within polygons.
  4. Threshold property can be used to eliminate irrelevant bins. If Threshold=0, an empty bin will be shown.

Historically, binning was applied only for point datasets. Because TatukGIS does not wish to introduce unnecessary restrictions, nothing stands in the way of using binning with other vector data types, i.e., polylines or polygons. In this case, shape's centroid is considered.

DK has implemented the following binning methods, based on the following grids:

For hexagons, the Radius property defines the length of the radius of the circle inscribed in a hexagon. More precisely, it is the height of the equilateral triangle which constructs the hexagon.

Binning methods comparison

Clustering

As discussed in this specification, clustering refers to the process of reducing and summarizing large datasets to provide better readability of the map, regardless of scale.

The main difference when compared to binning is clustering allows original and clustered data to coexist on the map. Depending on the parameters, such as Radius and Threshold, clusterization creates new virtual shapes that represent groups of original shapes from the layer. These shapes are not drawn. The remaining shapes which are not clustered, behave as normal. As a result, both clustered and non-clustered shapes are visible on the map.

The following clustering methods are available in TatukGIS Developer Kernel:

The above methods create clusters in grid positions, similarly to corresponding binning methods.

Original layer ClusteringMovingAverage

Shape Reduction

Working with datasets that contain dense packed shapes, i.e., point clouds, can be challenging. Very often we do not need to see all the elements that compose the layer.

Broadly speaking, this method simplifies an original vector layer, so its contents can be visualized in a fast and effective way. Shapes transmitted to display are chosen based on distance from Radius. It’s recommended to use map units, i.e., pixels, points, etc., to define the RadiusAsText. The Threshold property is ignored. This method works only for points for now.

For more about ShapeReduction, see: TGIS_AggregatorShapeReduction class.

Original layer ShapeReduction

Delphi / C++ specific

Delphi and C++ developers wanting to use dynamic aggregation functionality, e.g.:

  • registering the aggregator's implementation classes,
  • activating and deactivating aggregation directly in Layer Properties Control,
  • saving the aggregator settings in projects,

must add to the project one of the following units: GisAggregator, GisAllLayers, or GisAllBasicLayers.

2021/09/24 09:01

Page Tools