Maptitude GISDK Help

SelfAggregate()

Summary

Groups the records in a view, based on a field, to create an aggregate view.

 

Syntax

new_view_name = SelfAggregate(string aggregate_view_name, string aggregate_field_spec, array options)

 

Argument

Contents

aggregate_view_name

A proposed name for the new aggregate view

aggregate_field_spec

A full field spec that indicates the view whose records are aggregated, and the grouping field

 

Option

Type

Contents

Fields

Array

A list of aggregation specifications for the fields, overriding the default aggregation rules. Each aggregation specification is a two-element array containing a field name (string), and an aggregations array. The aggregations array is a list of rules of the same format as arrays returned by GetFieldsAggregations(). It can contain one or more of the arrays {"First"} or {"Dom"}, {"Sum"}, {"Min"}, {"Max"}, {"Avg"}, {"Avg", weight_field}, or {"StdDev"}. This will override the default aggregation rules for the fields specified in this option.

Selection

String

The name of the selection set from which to aggregate.

Additional Groups

Array

Strings with the field specs of the fields upon which to create further subgroups.

 

Returns

A string indicating the actual name of the aggregate view.

 

Notes

Example

// Aggregate county data to the state level

nv = SelfAggregate("States", "Counties.[State Code]", null)

 

Error Codes

Error Type

Meaning

Error

The input aggregate_view_name is null or the aggregate_field_spec is ambiguous

NotFound

The input view or field does not exist

 

See Also

Function

Summary

AggregateTable()

Groups records in a view and computes summary statistics

 

 

©2025 Caliper Corporation www.caliper.com