Extent3D
This class represents a 3D extent aggregate function used for calculating the three-dimensional bounding box of a geometry field. It initializes with a specific output field for 3D extents and provides a mechanism to convert database results into appropriate spatial coordinate structures.
Attributes
| Attribute | Type | Description |
|---|---|---|
| name | string = Extent3D | The internal name of the aggregate function used for SQL generation. |
| is_extent | string = 3D | A flag indicating that this aggregate represents a three-dimensional spatial bounding box. |
Constructor
Signature
def Extent3D(
expression: Any,
**extra: dict
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| expression | Any | The SQL expression or field to aggregate. |
| **extra | dict | Additional keyword arguments for the aggregate configuration. |
Signature
def Extent3D(
expression: [Expression](../../../../../db/models/expressions/expression.md?sid=django_db_models_expressions_expression),
extra: dict
)
Parameters
| Name | Type | Description |
|---|---|---|
| expression | [Expression](../../../../../db/models/expressions/expression.md?sid=django_db_models_expressions_expression) | The field or expression representing the 3D geometries to be aggregated. |
| extra | dict | Additional keyword arguments passed to the GeoAggregate base class. |
Methods
convert_value()
@classmethod
def convert_value(
value: Any,
expression: [Expression](../../../../../db/models/expressions/expression.md?sid=django_db_models_expressions_expression),
connection: DatabaseConnection
) - > tuple
Converts the raw database value into a format suitable for 3D extent representation.
Parameters
| Name | Type | Description |
|---|---|---|
| value | Any | The raw value returned from the database backend. |
| expression | [Expression](../../../../../db/models/expressions/expression.md?sid=django_db_models_expressions_expression) | The expression object that triggered the conversion. |
| connection | DatabaseConnection | The current database connection providing backend-specific conversion operations. |
Returns
| Type | Description |
|---|---|
tuple | A tuple representing the 3D bounding box coordinates (xmin, ymin, zmin, xmax, ymax, zmax). |