§
    ¤”jœ  ã                   ó\   — d Z ddlmZmZ ddlmZ  G d„ de¦  «        Z G d„ d¦  «        ZdS )	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 Zd ZdZdefdefdefdefgZdS )ÚOGREnvelopez&Represent the OGREnvelope C Structure.ÚMinXÚMaxXÚMinYÚMaxYN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Ú_fields_© ó    úo/var/www/finuniver-perm.ru/html/portfolio/venv/lib/python3.11/site-packages/django/contrib/gis/gdal/envelope.pyr   r      s;   € € € € € Ø,Ð,à	�ÐØ	�ÐØ	�ÐØ	�Ðð	€H€H€Hr   r   c                   óà   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Ze	d„ ¦   «         Z
e	d„ ¦   «         Ze	d	„ ¦   «         Ze	d
„ ¦   «         Ze	d„ ¦   «         Ze	d„ ¦   «         Ze	d„ ¦   «         Ze	d„ ¦   «         ZdS )Ú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          |¦  «        dk    rÊt          |d         t          ¦  «        r|d         | _        nót          |d         t          t
          f¦  «        rZt          |d         ¦  «        dk    r%t          dt          |d         ¦  «        z  ¦  «        ‚|                      |d         ¦  «         nwt          dt          |d         ¦  «        z  ¦  «        ‚t          |¦  «        dk    r |                      d„ |D ¦   «         ¦  «         nt          dt          |¦  «        z  ¦  «        ‚| j
        | j        k    rt          d¦  «        ‚| j        | j        k    rt          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.zEnvelope minimum X > maximum X.zEnvelope 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__zEnvelope.__init__'   s]  € õ ˆt‰9Œ9˜Š>ˆ>Ý˜$˜qœ'¥;Ñ/Ô/ð Rà!% a¤�”�Ý˜D œG¥e­T ]Ñ3Ô3ð 	Rå�t˜A”w‘<”< 1Ò$Ð$Ý'ØBÅSÈÈaÌÁ\Ä\ÑQñô ð ð ×'Ò'¨¨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          |¦  «        dk    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"   r   r)   r+   r*   r,   r$   r!   r   )r-   Úothers     r   Ú__eq__zEnvelope.__eq__H   sß   € õ
 �e�XÑ&Ô&ð 	Xà”˜uœ{Ò*ð 0Ø”Z 5¤;Ò.ð0à”Z 5¤;Ò.ð0ð ”Z 5¤;Ò.ð	õ ˜�uÑ%Ô%ð 	X­#¨e©*¬*¸ª/¨/à”˜u QœxÒ'ð -Ø”Z 5¨¤8Ò+ð-à”Z 5¨¤8Ò+ð-ð ”Z 5¨¤8Ò+ð	õ  Ð VÑWÔWÐWr   c                 ó*   — t          | j        ¦  «        S )z,Return a string representation of the tuple.)Ústrr$   ©r-   s    r   Ú__str__zEnvelope.__str__^   s   € å�4”:‰ŒÐr   c                 ó¼   — t          ¦   «         | _        |d         | j        _        |d         | j        _        |d         | j        _        |d         | j        _        dS )z@Initialize the C OGR Envelope structure from the given sequence.r   r   r1   r2   N)r   r#   r   r
   r	   r   )r-   Úseqs     r   r&   zEnvelope._from_sequenceb   sK   € å$™œˆŒØ! !œfˆŒÔØ! !œfˆŒÔØ! !œfˆŒÔØ! !œfˆŒÔÐÐr   c                 ót  — t          |¦  «        dk    �rt          |d         t          ¦  «        r |                      |d         j        ¦  «        S t          |d         d¦  «        rZt          |d         d¦  «        rD|                      |d         j        |d         j        |d         j        |d         j        ¦  «        S t          |d         t          t          f¦  «        �r!t          |d         ¦  «        dk    rI|                      |d         d         |d         d         |d         d         |d         d         f¦  «        S t          |d         ¦  «        dk    r�|d         \  }}}}|| j	        j
        k     r|| j	        _
        || j	        j        k     r|| j	        _        || j	        j        k    r|| j	        _        || j	        j        k    r|| j	        _        d
S d
S t          dt          |d         ¦  «        z  ¦  «        ‚t          dt!          |d         ¦  «        z  ¦  «        ‚t          |¦  «        dk    r1|                      |d         |d         |d         |d         f¦  «        S t          |¦  «        dk    r|                      |¦  «        S t          d	t          |d         ¦  «        z  ¦  «        ‚)zž
        Modify the envelope to expand to include the boundaries of
        the passed-in 2-tuple (a point), 4-tuple (an extent) or
        envelope.
        r   r   ÚxÚyr1   r   r   r   r    N)r!   r"   r   Úexpand_to_includer$   Úhasattrr<   r=   r%   r#   r   r
   r	   r   r   r'   r(   )r-   r.   ÚminxÚminyÚmaxxÚmaxys         r   r>   zEnvelope.expand_to_includej   sƒ  € õ ˆt‰9Œ9˜Š>‰>Ý˜$˜qœ'¥8Ñ,Ô,ð RØ×-Ò-¨d°1¬g¬mÑ<Ô<Ð<Ý˜˜aœ #Ñ&Ô&ð R­7°4¸´7¸CÑ+@Ô+@ð RØ×-Ò-Ø˜”G”I˜t Aœwœy¨$¨q¬'¬)°T¸!´W´Yñô ð õ ˜D œG¥e­T ]Ñ3Ô3ñ Rå�t˜A”w‘<”< 1Ò$Ð$Ø×1Ò1Ø˜aœ œ T¨!¤W¨Q¤Z°°a´¸´¸TÀ!¼WÀQ¼ZÐHñô ð õ ˜˜aœ‘\”\ QÒ&Ð&Ø/3°A¬wÑ,�T˜4  tØ˜dœnÔ1Ò1Ð1Ø.2˜œÔ+Ø˜dœnÔ1Ò1Ð1Ø.2˜œÔ+Ø˜dœnÔ1Ò1Ð1Ø.2˜œÔ+Ø˜dœnÔ1Ò1Ð1Ø.2˜œÔ+Ð+Ð+ð 2Ð1õ (ØBÅSÈÈaÌÁ\Ä\ÑQñô ð õ  Ð @Å4ÈÈQÌÁ=Ä=Ñ PÑQÔQÐQÝ�‰YŒY˜!Š^ˆ^à×)Ò)¨4°¬7°D¸´G¸TÀ!¼WÀdÈ1ÄgÐ*NÑOÔOÐOÝ�‰YŒY˜!Š^ˆ^à×)Ò)¨$Ñ/Ô/Ð/åÐ EÍÈDÐQRÌGÉÌÑ TÑUÔUÐUr   c                 ó   — | j         j        S )z-Return the value of the minimum X coordinate.)r#   r   r7   s    r   r)   zEnvelope.min_xš   ó   € ð Œ~Ô"Ð"r   c                 ó   — | j         j        S )z-Return the value of the minimum Y coordinate.)r#   r
   r7   s    r   r+   zEnvelope.min_yŸ   rE   r   c                 ó   — | j         j        S )z-Return the value of the maximum X coordinate.)r#   r	   r7   s    r   r*   zEnvelope.max_x¤   rE   r   c                 ó   — | j         j        S )z-Return the value of the maximum Y coordinate.)r#   r   r7   s    r   r,   zEnvelope.max_y©   rE   r   c                 ó   — | j         | j        fS )z"Return the upper-right coordinate.)r*   r,   r7   s    r   ÚurzEnvelope.ur®   ó   € ð ”
˜DœJÐ'Ð'r   c                 ó   — | j         | j        fS )z!Return the lower-left coordinate.)r)   r+   r7   s    r   ÚllzEnvelope.ll³   rK   r   c                 ó6   — | j         | j        | j        | j        fS )z)Return a tuple representing the envelope.)r)   r+   r*   r,   r7   s    r   r$   zEnvelope.tuple¸   s   € ð ”
˜DœJ¨¬
°D´JÐ?Ð?r   c                 ó¨   — d| j         ›d| j        ›d| j         ›d| j        ›d| j        ›d| j        ›d| j        ›d| j        ›d| j         ›d| j        ›d�S )z4Return WKT representing a Polygon for this envelope.z	POLYGON((ú ú,z)))r)   r+   r,   r*   r7   s    r   ÚwktzEnvelope.wkt½   sj   € € ð
 ŒJˆJˆJØŒJˆJˆJØŒJˆJˆJØŒJˆJˆJØŒJˆJˆJØŒJˆJˆJØŒJˆJˆJØŒJˆJˆJØŒJˆJˆJØŒJˆJˆJð
ð 	
r   N)r   r   r   r   r/   r4   r8   r&   r>   Úpropertyr)   r+   r*   r,   rJ   rM   r$   rR   r   r   r   r   r       sO  € € € € € ðð ðCð Cð CðBXð Xð Xð,ð ð ð%ð %ð %ð.Vð .Vð .Vð` ð#ð #ñ „Xð#ð ð#ð #ñ „Xð#ð ð#ð #ñ „Xð#ð ð#ð #ñ „Xð#ð ð(ð (ñ „Xð(ð ð(ð (ñ „Xð(ð ð@ð @ñ „Xð@ð ð
ð 
ñ „Xð
ð 
ð 
r   r   N)r   Úctypesr   r   Údjango.contrib.gis.gdal.errorr   r   r   r   r   r   ú<module>rV      s¡   ððð ð 'Ð &Ð &Ð &Ð &Ð &Ð &Ð &à 7Ð 7Ð 7Ð 7Ð 7Ð 7ðð ð ð ð �)ñ ô ð ðl
ð l
ð l
ð l
ð l
ñ l
ô l
ð l
ð l
ð l
r   