File: //lib/python3/dist-packages/django/contrib/gis/db/models/__pycache__/aggregates.cpython-310.pyc
o
�a � @ s� d dl mZmZmZmZ d dlmZmZ d dlm Z g d�Z
G dd� de�ZG dd� de�ZG d d
� d
e�Z
G dd� de�ZG d
d� de�ZG dd� de�ZdS )� )�ExtentField�GeometryCollectionField�
GeometryField�LineStringField)� Aggregate�Value)�cached_property)�Collect�Extent�Extent3D�MakeLine�Unionc sH e Zd ZdZdZedd� �Zd� fdd� Zdd� Zd
� fd
d� Z � Z
S )�GeoAggregateNFc C s | � | jd jj�S )Nr )�output_field_class�source_expressions�output_field�srid)�self� r �I/usr/lib/python3/dist-packages/django/contrib/gis/db/models/aggregates.pyr s zGeoAggregate.output_fieldc s4 |j �| � t� j||fd|p|j �| j�i|��S )N�function)�ops�check_expression_support�super�as_sql�spatial_aggregate_name�name)r �compiler�
connectionr �
extra_context�� __class__r r r s ���zGeoAggregate.as_sqlc K sp | j s.| j�d�pt| dd�}| �� }|�g | �� �t|��� d}|j||fd|i|��S | j||fi |��S )N� toleranceg�������?z*%(function)s(SDOAGGRTYPE(%(expressions)s))�template) � is_extent�extra�get�getattr�copy�set_source_expressions�get_source_expressionsr r )r r r r r"