Skip to main content

Collect

This class represents a geographic aggregate that collects a set of geometries into a single GeometryCollection. It is used within database queries to group multiple spatial features into a unified collection field.

Attributes

AttributeTypeDescription
namestring = "Collect"The internal name of the geographic aggregate function, set to "Collect".
output_field_class[GeometryCollectionField](../../../forms/fields/geometrycollectionfield.md?sid=django_contrib_gis_forms_fields_geometrycollectionfield) = GeometryCollectionFieldThe Django model field class used to represent the aggregated geometry collection result.

Constructor

Signature

def Collect() - > null

Signature

def Collect(
expression: string,
**extra: any
) - > null

Parameters

NameTypeDescription
expressionstringThe field name or expression representing the geometries to be collected.
**extraanyAdditional keyword arguments for the aggregate expression, such as filter or output_field.