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
| Attribute | Type | Description |
|---|---|---|
| name | string = "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) = GeometryCollectionField | The 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
| Name | Type | Description |
|---|---|---|
| expression | string | The field name or expression representing the geometries to be collected. |
| **extra | any | Additional keyword arguments for the aggregate expression, such as filter or output_field. |