Skip to main content

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

AttributeTypeDescription
namestring = Extent3DThe internal name of the aggregate function used for SQL generation.
is_extentstring = 3DA flag indicating that this aggregate represents a three-dimensional spatial bounding box.

Constructor

Signature

def Extent3D(
expression: Any,
**extra: dict
) - > null

Parameters

NameTypeDescription
expressionAnyThe SQL expression or field to aggregate.
**extradictAdditional 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

NameTypeDescription
expression[Expression](../../../../../db/models/expressions/expression.md?sid=django_db_models_expressions_expression)The field or expression representing the 3D geometries to be aggregated.
extradictAdditional 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

NameTypeDescription
valueAnyThe 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.
connectionDatabaseConnectionThe current database connection providing backend-specific conversion operations.

Returns

TypeDescription
tupleA tuple representing the 3D bounding box coordinates (xmin, ymin, zmin, xmax, ymax, zmax).