| Server IP : 217.160.0.135 / Your IP : 216.73.217.85 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1074145052 ( 1074145052) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/lib/python3/dist-packages/django/contrib/gis/gdal/__pycache__/ |
Upload File : |
�
�|�e> � �\ � d Z ddlmZmZ ddlmZ G d� de� � Z G d� d� � ZdS ) a�
The GDAL/OGR library uses an Envelope structure to hold the bounding
box information for a geometry. The envelope (bounding box) contains
two pairs of coordinates, one for the lower left coordinate and one
for the upper right coordinate:
+----------o Upper right; (max_x, max_y)
| |
| |
| |
Lower left (min_x, min_y) o----------+
� )� Structure�c_double)�
GDALExceptionc �. � e Zd ZdZdefdefdefdefgZdS )�OGREnvelopez&Represent the OGREnvelope C Structure.�MinX�MaxX�MinY�MaxYN)�__name__�
__module__�__qualname__�__doc__r �_fields_� � �B/usr/lib/python3/dist-packages/django/contrib/gis/gdal/envelope.pyr r s; � � � � � �,�,���"���"���"���"��H�H�Hr r c �� � e Zd ZdZd� Zd� Zd� Zd� Zd� Ze d� � � Z
e d� � � Ze d � � � Ze d
� � � Z
e d� � � Ze d� � � Ze d
� � � Ze d� � � ZdS )�Envelopez�
The Envelope object is a C structure that contains the minimum and
maximum X, Y coordinates for a rectangle bounding box. The naming
of the variables is compatible with the OGR Envelope structure.
c �� � t |� � dk r�t |d t � � r|d | _ n�t |d t t
f� � rZt |d � � dk r%t
dt |d � � z � � �| � |d � � nwt dt |d � � z � � �t |� � dk r | � d� |D � � � � nt
dt |� � z � � �| j
| j k rt
d� � �| j | j
k rt
d � � �d
S )z�
The initialization function may take an OGREnvelope structure, 4-element
tuple or list, or 4 individual arguments.
� r � �(Incorrect number of tuple elements (%d).�Incorrect type of argument: %sc �, � g | ]}t |� � ��S r )�float)�.0�as r �
<listcomp>z%Envelope.__init__.<locals>.<listcomp>: s � � 8� 8� 8�a��q��� 8� 8� 8r �#Incorrect number (%d) of arguments.zEnvelope minimum X > maximum X.zEnvelope minimum Y > maximum Y.N)�len�
isinstancer � _envelope�tuple�listr �_from_sequence� TypeError�type�min_x�max_x�min_y�max_y)�self�argss r �__init__zEnvelope.__init__% s[ � � �t�9�9��>�>��$�q�'�;�/�/�
R�!%�a������D��G�e�T�]�3�3�
R��t�A�w�<�<�1�$�$�'�(R�UX�Y]�^_�Y`�Ua�Ua�(a�b�b�b��'�'��Q��0�0�0�0�� @�4��Q��=�=� P�Q�Q�Q�
��Y�Y�!�^�^�
��� 8� 8�4� 8� 8� 8�9�9�9�9�� E��D� � � Q�R�R�R� �:��
�"�"�� A�B�B�B��:��
�"�"�� A�B�B�B� #�"r c � � t |t � � r@| j |j k o/| j |j k o| j |j k o| j |j k S t |t � � rWt |� � dk rD| j |d k o2| j |d k o!| j |d k o| j |d k S t d� � �)zx
Return True if the envelopes are equivalent; can compare against
other Envelopes and 4-tuples.
r r r � � z4Equivalence testing only works with other Envelopes.) r"