Ë
    Ã?Æi½N  ã                   óî   — U d Z ddlmZ ddlZddlZdgZdZdZdZe	e
d<    G d	„ d
e«      Z G d„ de«      Z G d„ de«      Zd„ Zde	fd„Z G d„ d edd«      «      Z edddddd«      Z	 defd„Zdefd„Zy)z…Affine transformation matrices

The Affine package is derived from Casey Duncan's Planar package. See the
copyright statement below.
é    )Ú
namedtupleNÚAffinezSean Gilliesz2.4.0gñhãˆµøä>ÚEPSILONc                   ó   — e Zd Zy)ÚAffineErrorN)Ú__name__Ú
__module__Ú__qualname__© ó    úV/var/www/html/myprovider/mon_projet_qr/lib/python3.12/site-packages/affine/__init__.pyr   r   /   s   „ Ør   r   c                   ó   — e Zd ZdZy)ÚTransformNotInvertibleErrorz#The transform could not be invertedN©r   r	   r
   Ú__doc__r   r   r   r   r   3   s   „ Ú-r   r   c                   ó   — e Zd ZdZy)ÚUndefinedRotationErrorz;The rotation angle could not be computed for this transformNr   r   r   r   r   r   7   s   „ ÚEr   r   c                 ój   ‡ — ‰ j                   }‰ j                  }|fˆ fd„	}||_        t        ||¬«      S )zŒSpecial property decorator that caches the computed
    property value in the object's instance dict the first
    time it is accessed.
    c                 ót   •— 	 | j                   |   S # t        $ r  ‰| «      x| j                   |<   }|cY S w xY w©N)Ú__dict__ÚKeyError)ÚselfÚnameÚvalueÚfuncs      €r   Úgetterzcached_property.<locals>.getterC   sB   ø€ ð	Ø—=‘= Ñ&Ð&øÜò 	Ù*.¨t«*Ð4ˆD�M‰M˜$Ñ %ØŠLð	ús   ƒ ’"7¶7)Údoc)r   r   Ú	func_nameÚproperty)r   r   r   r   s   `   r   Úcached_propertyr!   ;   s6   ø€ ð
 �=‰=€DØ
�,‰,€Càõ ð €FÔÜ�F Ô$Ð$r   Údegc                 ó®   — | dz  } | dk(  ry| dk(  ry| dk(  ryt        j                  | «      }t        j                  |«      t        j                  |«      fS )z�Return the cosine and sin for the given angle in degrees.

    With special-case handling of multiples of 90 for perfect right
    angles.
    g     €v@g     €V@)ç        ç      ð?g     €f@)ç      ð¿r   g     àp@)r   r&   )ÚmathÚradiansÚcosÚsin)r"   Úrads     r   Úcos_sin_degr,   N   sT   € ð �‰+€CØ
ˆd‚{ØØ	�ŠØØ	�ŠØÜ
�,‰,�sÓ
€CÜ�8‰8�C‹=œ$Ÿ(™( 3›-Ð'Ð'r   c                   óš  — e Zd ZdZeZ	 	 	 d5dededededededed	ed
efd„Zededededededefd„«       Z	ed„ «       Z
ededefd„«       Zed„ «       Zed6dedefd„«       Zed7defd„«       Zed„ «       Zdefd„Zdefd„Zd„ Zd„ Zedefd„«       Zedefd„«       Zedefd „«       Zed!„ «       Zedefd"„«       Zedefd#„«       Zedefd$„«       Zedefd%„«       Zedefd&„«       Z edefd'„«       Z!edefd(„«       Z"edefd)„«       Z#ed*„ «       Z$efd+edefd,„Z%defd-„Z&e&xZ'xZ(Z)d.„ Z*e*Z+d/„ Z,d0„ Z-d1„ Z.d8d2„Z/d3„ Z0e1jd                  Z2d4„ Z3y)9r   aÐ  Two dimensional affine transform for 2D linear mapping.

    Parameters
    ----------
    a, b, c, d, e, f : float
        Coefficients of an augmented affine transformation matrix

        | x' |   | a  b  c | | x |
        | y' | = | d  e  f | | y |
        | 1  |   | 0  0  1 | | 1 |

        `a`, `b`, and `c` are the elements of the first row of the
        matrix. `d`, `e`, and `f` are the elements of the second row.

    Attributes
    ----------
    a, b, c, d, e, f, g, h, i : float
        The coefficients of the 3x3 augmented affine transformation
        matrix

        | x' |   | a  b  c | | x |
        | y' | = | d  e  f | | y |
        | 1  |   | g  h  i | | 1 |

        `g`, `h`, and `i` are always 0, 0, and 1.

    The Affine package is derived from Casey Duncan's Planar package.
    See the copyright statement below.  Parallel lines are preserved by
    these transforms. Affine transforms can perform any combination of
    translations, scales/flips, shears, and rotations.  Class methods
    are provided to conveniently compose transforms from these
    operations.

    Internally the transform is stored as a 3x3 transformation matrix.
    The transform may be constructed directly by specifying the first
    two rows of matrix values as 6 floats. Since the matrix is an affine
    transform, the last row is always ``(0, 0, 1)``.

    N.B.: multiplication of a transform and an (x, y) vector *always*
    returns the column vector that is the matrix multiplication product
    of the transform and (x, y) as a column vector, no matter which is
    on the left or right side. This is obviously not the case for
    matrices and vectors in general, but provides a convenience for
    users of this class.

    ÚaÚbÚcÚdÚeÚfÚgÚhÚic
                 óv   — t         j                  | |dz  |dz  |dz  |dz  |dz  |dz  |dz  |dz  |	dz  f	«      S )z§Create a new object

        Parameters
        ----------
        a, b, c, d, e, f : float
            Elements of an augmented affine transformation matrix.
        r%   ©ÚtupleÚ__new__)
Úclsr.   r/   r0   r1   r2   r3   r4   r5   r6   s
             r   r:   zAffine.__new__‘   s\   € ô& �}‰}Øà�C‘Ø�C‘Ø�C‘Ø�C‘Ø�C‘Ø�C‘Ø�C‘Ø�C‘Ø�C‘ð
ó
ð 	
r   c           	      ó0   — | j                  | ||||||«      S )z“Use same coefficient order as GDAL's GetGeoTransform().

        :param c, a, b, f, d, e: 6 floats ordered by GDAL.
        :rtype: Affine
        )r:   )r;   r0   r.   r/   r3   r1   r2   s          r   Ú	from_gdalzAffine.from_gdal³   s   € ð �{‰{˜3  1 a¨¨A¨qÓ1Ð1r   c                 ó   — t         S )z?Return the identity transform.

        :rtype: Affine
        )Úidentity)r;   s    r   r?   zAffine.identity¼   s	   € ô ˆr   ÚxoffÚyoffc                 ó@   — t         j                  | dd|dd|dddf	«      S )zàCreate a translation transform from an offset vector.

        :param xoff: Translation x offset.
        :type xoff: float
        :param yoff: Translation y offset.
        :type yoff: float
        :rtype: Affine
        r%   r$   r8   )r;   r@   rA   s      r   ÚtranslationzAffine.translationÄ   s(   € ô �}‰}˜S 3¨¨T°3¸¸TÀ3ÈÈSÐ"QÓRÐRr   c                 óˆ   — t        |«      dk(  rt        |d   «      x}}n|\  }}t        j                  | |ddd|ddddf	«      S )a3  Create a scaling transform from a scalar or vector.

        :param scaling: The scaling factor. A scalar value will
            scale in both dimensions equally. A vector scaling
            value scales the dimensions independently.
        :type scaling: float or sequence
        :rtype: Affine
        é   r   r$   r%   )ÚlenÚfloatr9   r:   )r;   ÚscalingÚsxÚsys       r   ÚscalezAffine.scaleÐ   sP   € ô ˆw‹<˜1ÒÜ˜G A™JÓ'Ð'ˆB‘à‰FˆB�Ü�}‰}˜S 2 s¨C°°b¸#¸sÀCÈÐ"MÓNÐNr   Úx_angleÚy_anglec                 óà   — t        j                  t        j                  |«      «      }t        j                  t        j                  |«      «      }t        j	                  | d|d|dddddf	«      S )a  Create a shear transform along one or both axes.

        :param x_angle: Shear angle in degrees parallel to the x-axis.
        :type x_angle: float
        :param y_angle: Shear angle in degrees parallel to the y-axis.
        :type y_angle: float
        :rtype: Affine
        r%   r$   )r'   Útanr(   r9   r:   )r;   rL   rM   ÚmxÚmys        r   ÚshearzAffine.shearà   sV   € ô �X‰X”d—l‘l 7Ó+Ó,ˆÜ�X‰X”d—l‘l 7Ó+Ó,ˆÜ�}‰}˜S 3¨¨C°°S¸#¸sÀCÈÐ"MÓNÐNr   NÚanglec                 óÜ   — t        |«      \  }}|€ t        j                  | || d||ddddf	«      S |\  }}t        j                  | || |||z  z
  ||z  z   |||||z  z
  ||z  z
  dddf	«      S )a½  Create a rotation transform at the specified angle.

        A pivot point other than the coordinate system origin may be
        optionally specified.

        :param angle: Rotation angle in degrees, counter-clockwise
            about the pivot point.
        :type angle: float
        :param pivot: Point to rotate about, if omitted the rotation is
            about the origin.
        :type pivot: sequence
        :rtype: Affine
        r$   r%   )r,   r9   r:   )r;   rS   ÚpivotÚcaÚsaÚpxÚpys          r   ÚrotationzAffine.rotationî   sž   € ô ˜UÓ#‰ˆˆBØˆ=Ü—=‘=  r¨B¨3°°R¸¸SÀ#ÀsÈCÐ&PÓQÐQà‰FˆB�Ü—=‘=ØàØ�CØ˜˜b™‘L 2¨¡7Ñ*ØØØ˜˜b™‘L 2¨¡7Ñ*ØØØð
óð r   c                 ó.   — t         j                  | d«      S )z£Create the permutation transform

        For 2x2 matrices, there is only one permutation matrix that is
        not the identity.

        :rtype: Affine
        )	r$   r%   r$   r%   r$   r$   r$   r$   r%   r8   )r;   rH   s     r   ÚpermutationzAffine.permutation  s   € ô �}‰}˜SÐ"OÓPÐPr   Úreturnc                 ó   — d| z  S )zConcise string representation.z;|% .2f,% .2f,% .2f|
|% .2f,% .2f,% .2f|
|% .2f,% .2f,% .2f|r   ©r   s    r   Ú__str__zAffine.__str__  s   € ð RØñð 	r   c                 ó   — d| dd z  S )zPrecise string representation.z%Affine(%r, %r, %r,
       %r, %r, %r)Né   r   r_   s    r   Ú__repr__zAffine.__repr__#  s   € à;¸tÀBÀQ¸xÑGÐGr   c                 óŠ   — | j                   | j                  | j                  | j                  | j                  | j
                  fS )zZReturn same coefficient order as GDAL's SetGeoTransform().

        :rtype: tuple
        )r0   r.   r/   r3   r1   r2   r_   s    r   Úto_gdalzAffine.to_gdal'  s/   € ð
 —‘˜Ÿ™ §¡¨¯©°·±¸¿¹Ð?Ð?r   c                 óŠ   — | j                   | j                  | j                  | j                  | j                  | j
                  fS )zÏReturn an affine transformation matrix compatible with shapely

        Shapely's affinity module expects an affine transformation matrix
        in (a,b,d,e,xoff,yoff) order.

        :rtype: tuple
        )r.   r/   r1   r2   r@   rA   r_   s    r   Ú
to_shapelyzAffine.to_shapely.  s/   € ð —‘˜Ÿ™ §¡¨¯©°·	±	¸4¿9¹9ÐEÐEr   c                 ó   — | j                   S )zAlias for 'c')r0   r_   s    r   r@   zAffine.xoff8  ó   € ð �v‰vˆr   c                 ó   — | j                   S )zAlias for 'f')r3   r_   s    r   rA   zAffine.yoff=  ri   r   c           	      ó0   — | \	  }}}}}}}}}	||z  ||z  z
  S )z›The determinant of the transform matrix.

        This value is equal to the area scaling factor when the
        transform is applied to a shape.
        r   ©
r   r.   r/   r0   r1   r2   r3   r4   r5   r6   s
             r   ÚdeterminantzAffine.determinantB  s.   € ð %)Ñ!ˆˆ1ˆa��A�q˜!˜Q Ø�1‰u�q˜1‘u‰}Ðr   c           	      óH  — | \	  }}}}}}}}}|dz  |dz  z   |dz  z   |dz  z   }||z  ||z  z
  dz  }|dz  dz  |z
  }|dk  rd}t        j                  |dz  t        j                  |«      z   «      }	t        j                  |dz  t        j                  |«      z
  «      }
|	|
fS )zÃThe absolute scaling factors of the transformation.

        This tuple represents the absolute value of the scaling factors of the
        transformation, sorted from bigger to smaller.
        é   é   gê-�™—q=r   )r'   Úsqrt)r   r.   r/   Ú_r1   r2   ÚtraceÚdetÚdeltaÚl1Úl2s              r   Ú_scalingzAffine._scalingL  s¾   € ð %)Ñ!ˆˆ1ˆa��A�q˜!˜Q ð
 �Q‘˜˜a™‘ ! q¡&Ñ(¨1°©6Ñ1ˆØ�1‰u�q˜1‘u‰} Ñ"ˆà˜‘
˜Q‘ Ñ$ˆØ�5Š=ØˆEä�Y‰Y�u˜q‘y¤4§9¡9¨UÓ#3Ñ3Ó4ˆÜ�Y‰Y�u˜q‘y¤4§9¡9¨UÓ#3Ñ3Ó4ˆØ�2ˆvˆr   c                 ób   — | j                   \  }}t        j                  |dz  |dz  z
  «      |z  S )záThe eccentricity of the affine transformation.

        This value represents the eccentricity of an ellipse under
        this affine transformation.

        Raises NotImplementedError for improper transformations.
        ro   )rx   r'   rq   )r   rv   rw   s      r   ÚeccentricityzAffine.eccentricityc  s2   € ð —‘‰ˆˆBÜ�y‰y˜˜q™ 2¨¡7Ñ*Ó+¨bÑ0Ð0r   c           	      óÜ   — | \	  }}}}}}}}}| j                   s| j                  rC| j                  \  }}||z  ||z  }}t        j                  ||«      dz  t        j
                  z  S t        ‚)aK  The rotation angle in degrees of the affine transformation.

        This is the rotation angle in degrees of the affine transformation,
        assuming it is in the form M = R S, where R is a rotation and S is a
        scaling.

        Raises UndefinedRotationError for improper and degenerate
        transformations.
        é´   )Ú	is_properÚis_degeneraterx   r'   Úatan2Úpir   )	r   r.   r/   rr   r0   r1   rv   ÚyÚxs	            r   Úrotation_anglezAffine.rotation_angleo  sn   € ð %)Ñ!ˆˆ1ˆa��A�q˜!˜Q Ø�>Š>˜T×/Ò/Ø—M‘M‰EˆB�Ø�r‘6˜1˜r™6ˆqˆAÜ—:‘:˜a Ó# cÑ)¬D¯G©GÑ3Ð3ä(Ð(r   c                 óV   — | t         u xs  | j                  t         | j                  «      S )z[True if this transform equals the identity matrix,
        within rounding limits.
        )r?   Úalmost_equalsÚ	precisionr_   s    r   Úis_identityzAffine.is_identity‚  s%   € ð
 ”xÐÒO 4×#5Ñ#5´hÀÇÁÓ#OÐOr   c           	      óæ   — | \	  }}}}}}}}}	t        |«      | j                  k  xr t        |«      | j                  k  xs2 t        |«      | j                  k  xr t        |«      | j                  k  S )z¦True if the transform is rectilinear.

        i.e., whether a shape would remain axis-aligned, within rounding
        limits, after applying the transform.
        ©Úabsr†   rl   s
             r   Úis_rectilinearzAffine.is_rectilinear‰  sj   € ð %)Ñ!ˆˆ1ˆa��A�q˜!˜Q Ü�A“˜Ÿ™Ñ'ÒC¬C°«F°T·^±^Ñ,Cò 
Ü�‹F�T—^‘^Ñ#Ò?¬¨A«°·±Ñ(?ð	
r   c           	      ó\   — | \	  }}}}}}}}}	t        ||z  ||z  z   «      | j                  k  S )záTrue if the transform is conformal.

        i.e., if angles between points are preserved after applying the
        transform, within rounding limits.  This implies that the
        transform has no effective shear.
        r‰   rl   s
             r   Úis_conformalzAffine.is_conformal•  s<   € ð %)Ñ!ˆˆ1ˆa��A�q˜!˜Q Ü�1�q‘5˜1˜q™5‘=Ó! D§N¡NÑ2Ð2r   c           	      óÊ   — | \	  }}}}}}}}}	| j                   xrJ t        d||z  ||z  z   z
  «      | j                  k  xr$ t        d||z  ||z  z   z
  «      | j                  k  S )ay  True if the transform is orthonormal.

        Which means that the transform represents a rigid motion, which
        has no effective scaling or shear. Mathematically, this means
        that the axis vectors of the transform matrix are perpendicular
        and unit-length.  Applying an orthonormal transform to a shape
        always results in a congruent shape.
        r%   )r�   rŠ   r†   rl   s
             r   Úis_orthonormalzAffine.is_orthonormal   sx   € ð %)Ñ!ˆˆ1ˆa��A�q˜!˜Q à×Ñò <Ü�C˜1˜q™5 1 q¡5™=Ñ)Ó*¨T¯^©^Ñ;ò<ä�C˜1˜q™5 1 q¡5™=Ñ)Ó*¨T¯^©^Ñ;ð	
r   c                 ó    — | j                   dk(  S )z±True if this transform is degenerate.

        Which means that it will collapse a shape to an effective area
        of zero. Degenerate transforms cannot be inverted.
        r$   ©rm   r_   s    r   r~   zAffine.is_degenerate±  s   € ð ×Ñ 3Ñ&Ð&r   c                 ó    — | j                   dkD  S )zdTrue if this transform is proper.

        Which means that it does not include reflection.
        r$   r‘   r_   s    r   r}   zAffine.is_properº  s   € ð ×Ñ #Ñ%Ð%r   c           	      ó0   — | \	  }}}}}}}}}||f||f||ffS )z6The values of the transform as three 2D column vectorsr   )r   r.   r/   r0   r1   r2   r3   rr   s           r   Úcolumn_vectorszAffine.column_vectorsÂ  s5   € ð %)Ñ!ˆˆ1ˆa��A�q˜!˜Q Ø�1ˆv˜˜1�v  1˜vÐ%Ð%r   r†   c                 óD   — dD ]  }t        | |   ||   z
  «      |k\  sŒ y y)a
  Compare transforms for approximate equality.

        :param other: Transform being compared.
        :type other: Affine
        :return: True if absolute difference between each element
            of each respective transform matrix < ``self.precision``.
        )r   rE   ro   é   rp   é   FT)rŠ   )r   Úotherr†   r6   s       r   r…   zAffine.almost_equalsÈ  s5   € ð $ò 	ˆAÜ�4˜‘7˜U 1™XÑ%Ó&¨)Ó3Ùð	ð r   c                 ó   — t         S r   )ÚNotImplemented©r   r˜   s     r   Ú__gt__zAffine.__gt__Õ  s   € ÜÐr   c                 ó   — t        d«      ‚)NzOperation not supported)Ú	TypeErrorr›   s     r   Ú__add__zAffine.__add__Þ  s   € ÜÐ1Ó2Ð2r   c                 ó–  — | \	  }}}}}}}}}t        |t        «      rq|\	  }	}
}}}}}}}t        j                  | j                  ||	z  ||z  z   ||
z  ||z  z   ||z  ||z  z   |z   ||	z  ||z  z   ||
z  ||z  z   ||z  ||z  z   |z   dddf	«      S 	 |\  }}||z  ||z  z   |z   ||z  ||z  z   |z   fS # t
        t        f$ r	 t        cY S w xY w)a¨  Multiplication

        Apply the transform using matrix multiplication, creating
        a resulting object of the same type.  A transform may be applied
        to another transform, a vector, vector array, or shape.

        :param other: The object to transform.
        :type other: Affine, :class:`~planar.Vec2`,
            :class:`~planar.Vec2Array`, :class:`~planar.Shape`
        :rtype: Same as ``other``
        r$   r%   )Ú
isinstancer   r9   r:   Ú	__class__Ú
ValueErrorrž   rš   )r   r˜   rW   ÚsbÚscÚsdÚseÚsfrr   ÚoaÚobÚocÚodÚoeÚofÚvxÚvys                    r   Ú__mul__zAffine.__mul__ã  s%  € ð +/Ñ'ˆˆB��B˜˜B  1 aÜ�eœVÔ$Ø.3Ñ+ˆB��B˜˜B  A q¨!Ü—=‘=Ø—‘à˜‘G˜b 2™gÑ%Ø˜‘G˜b 2™gÑ%Ø˜‘G˜b 2™gÑ%¨Ñ*Ø˜‘G˜b 2™gÑ%Ø˜‘G˜b 2™gÑ%Ø˜‘G˜b 2™gÑ%¨Ñ*ØØØð
óð ð&Ø‘��BØ˜R™ " r¡'Ñ)¨BÑ.°°R±¸"¸r¹'Ñ0AÀBÑ0FÐGÐGøÜ¤	Ð*ò &Ü%Ò%ð&ús   Â B0 Â0CÃCc                 ó€   — t        j                  dt        d¬«       t        |t        «      rJ ‚| j                  |«      S )a|  Right hand multiplication

        .. deprecated:: 2.3.0
            Right multiplication will be prohibited in version 3.0. This method
            will raise AffineError.

        Notes
        -----
        We should not be called if other is an affine instance This is
        just a guarantee, since we would potentially return the wrong
        answer in that case.
        z6Right multiplication will be prohibited in version 3.0ro   )Ú
stacklevel)ÚwarningsÚwarnÚDeprecationWarningr¡   r   r±   r›   s     r   Ú__rmul__zAffine.__rmul__  s:   € ô 	�‰ØDÜØõ	
ô
 ˜e¤VÔ,Ð,Ð,Ø�|‰|˜EÓ"Ð"r   c                 óp   — t        |t        «      st        |t        «      r| j                  |«      S t        S r   )r¡   r   r9   r±   rš   r›   s     r   Ú__imul__zAffine.__imul__  s*   € Ü�eœVÔ$¬
°5¼%Ô(@Ø—<‘< Ó&Ð&ä!Ð!r   c           	      ó¬   — | t         urL| t         k7  rB| \	  }}}}}}}}}t        |«      D ]'  \  }	\  }
}|
|z  ||z  z   |z   |
|z  ||z  z   |z   f||	<   Œ) yyy)zÚTransform a sequence of points or vectors in place.

        :param seq: Mutable sequence of :class:`~planar.Vec2` to be
            transformed.
        :returns: None, the input sequence is mutated in place.
        N)r?   Ú	enumerate)r   ÚseqrW   r¤   r¥   r¦   r§   r¨   rr   r6   r‚   r�   s               r   Ú
itransformzAffine.itransform"  s€   € ð ”xÑ D¬HÒ$4Ø.2Ñ+ˆB��B˜˜B  A q¨!Ü& s›^ò F‘	�‘6�A�qØ˜b™& 1 r¡6™/¨BÑ.°°B±¸¸R¹±À"Ñ0DÐE��A’ñFð %5Ðr   c                 ó  — | j                   rt        d«      ‚d| j                  z  }| \	  }}}}}}}}}||z  }	| |z  }
| |z  }||z  }t        j	                  | j
                  |	|
| |	z  ||
z  z
  ||| |z  ||z  z
  dddf	«      S )z…Return the inverse transform.

        :raises: :except:`TransformNotInvertible` if the transform
            is degenerate.
        z"Cannot invert degenerate transformr%   r$   )r~   r   rm   r9   r:   r¢   )r   ÚidetrW   r¤   r¥   r¦   r§   r¨   rr   ÚraÚrbÚrdÚres                r   Ú
__invert__zAffine.__invert__.  sµ   € ð ×ÒÜ-Ð.RÓSÐSØ�T×%Ñ%Ñ%ˆØ*.Ñ'ˆˆB��B˜˜B  1 aØ�$‰YˆØˆS�4‰ZˆØˆS�4‰ZˆØ�$‰YˆÜ�}‰}Ø�N‰NØ��b�S˜2‘X  R¡Ñ'¨¨R°"°°r±¸BÀ¹GÑ1CÀSÈ#ÈsÐSó
ð 	
r   c                 óŠ   — | j                   | j                  | j                  | j                  | j                  | j
                  fS )a  Pickle protocol support

        Notes
        -----
        Normal unpickling creates a situation where __new__ receives all
        9 elements rather than the 6 that are required for the
        constructor.  This method ensures that only the 6 are provided.
        )r.   r/   r0   r1   r2   r3   r_   s    r   Ú__getnewargs__zAffine.__getnewargs__C  s/   € ð �v‰v�t—v‘v˜tŸv™v t§v¡v¨t¯v©v°t·v±vÐ=Ð=r   )r$   r$   r%   )r   r   r   )r]   N)4r   r	   r
   r   r   r†   rG   r:   Úclassmethodr=   r?   rC   rK   rR   rZ   r\   Ústrr`   rc   re   rg   r    r@   rA   r!   rm   rx   rz   rƒ   Úboolr‡   r‹   r�   r�   r~   r}   r”   r…   rœ   Ú__ge__Ú__lt__Ú__le__rŸ   Ú__iadd__r±   r·   r¹   r½   rÄ   r9   Ú__hash__rÆ   r   r   r   r   r   _   sD  „ ñ-ð^ €Ið ØØñ 
àð 
ð ð 
ð ð	 
ð
 ð 
ð ð 
ð ð 
ð ð 
ð ð 
ð ó 
ðD ð2˜%ð 2 Eð 2¨eð 2¸ð 2À%ð 2ÈEò 2ó ð2ð ñó ðð ð	S˜uð 	S¨Eò 	Só ð	Sð ñOó ðOð ñO˜Eð O°ò Oó ðOð ñ ˜Uò  ó ð ðD ñ	Qó ð	Qð˜ó ðH˜#ó Hò@òFð ð�eò ó ðð ð�eò ó ðð ð˜Uò ó ðð ñó ðð, ð	1˜eò 	1ó ð	1ð ð) ò )ó ð)ð$ ðP˜Tò Pó ðPð ð	
 ò 	
ó ð	
ð ð3˜dò 3ó ð3ð ð
 ò 
ó ð
ð  ð'˜tò 'ó ð'ð ð&˜4ò &ó ð&ð ñ&ó ð&ð
 7>ñ ¨eð À$ó ð˜tó ð  &Ð%€FÐ%ˆV�fò3ð €Hò"&òH#ò*"ó
Fò
ð& �~‰~€Hó	>r   )	r.   r/   r0   r1   r2   r3   r4   r5   r6   rE   Úsc                 ó2  — t        | d«      st        d«      ‚| j                  «       }t        |«      dk7  rt	        dt        |«      z  «      ‚d„ |D «       \  }}}}}}t
        j                  t        ||||||dddg	«      }|t        j                  dd«      z  S )	zêReturns Affine from the contents of a world file string.

    This method also translates the coefficients from center- to
    corner-based coordinates.

    :param s: str with 6 floats ordered in a world file.
    :rtype: Affine
    ÚsplitzCannot split input stringrb   z!Expected 6 coefficients, found %dc              3   ó2   K  — | ]  }t        |«      –— Œ y ­wr   )rG   )Ú.0r‚   s     r   ú	<genexpr>zloadsw.<locals>.<genexpr>c  s   è ø€ Ò1 Qœ˜aŸÑ1ùs   ‚r$   r%   g      à¿)	Úhasattrrž   rÑ   rF   r£   r9   r:   r   rC   )	rÏ   Úcoeffsr.   r1   r/   r2   r0   r3   Úcenters	            r   ÚloadswrØ   U  s˜   € ô �1�gÔÜÐ3Ó4Ð4Ø�W‰W‹Y€FÜ
ˆ6ƒ{�aÒÜÐ<¼sÀ6»{ÑJÓKÐKÙ1¨&Ô1Ñ€A€qˆ!ˆQ��1Ü�]‰]œ6 A q¨!¨Q°°1°c¸3ÀÐ#DÓE€FØ”F×&Ñ& t¨TÓ2Ñ2Ð2r   r]   c                 ó‚   ‡— | t         j                  dd«      z  Šdj                  ˆfd„t        d«      D «       «      dz   S )z•Return string for a world file.

    This method also translates the coefficients from corner- to
    center-based coordinates.

    :rtype: str
    g      à?ú
c              3   óH   •K  — | ]  }t        t        ‰|«      «      –— Œ y ­wr   )ÚreprÚgetattr)rÓ   r‚   r×   s     €r   rÔ   zdumpsw.<locals>.<genexpr>q  s   øè ø€ ÒF°!”Tœ' &¨!Ó,×-ÑFùs   ƒ"Úadbecf)r   rC   ÚjoinÚlist)Úobjr×   s    @r   Údumpswrâ   h  s:   ø€ ð ”6×%Ñ% c¨3Ó/Ñ/€FØ�9‰9ÓF´t¸H³~ÔFÓFÈÑMÐMr   )r   Úcollectionsr   r'   r´   Ú__all__Ú
__author__Ú__version__r   rG   Ú__annotations__Ú	Exceptionr   r   r   r!   r,   r   r?   rÈ   rØ   râ   r   r   r   ú<module>ré      s´   ðòõD #Û Û ð ˆ*€Ø€
Ø€à€ˆÓ ô	�)ô 	ô. +ô .ôF˜[ô Fò%ð&(�Uó (ô"m>‰Z˜Ð"OÓPô m>ñ` �!�Q˜˜1˜a Ó#€Ø ð
3ˆcó 3ð&	N�3ô 	Nr   