Ë
    ~ìqjØ  ã                   ó(   — d Z ddlmZ  G d„ d«      Zy)zCoordinate sequence utilities.é    )Úarrayc                   ó@   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd	d„Ze	d„ «       Z
y)
ÚCoordinateSequencea.  Access to coordinate tuples from the parent geometry's coordinate sequence.

    Examples
    --------
    >>> from shapely.wkt import loads
    >>> g = loads('POINT (0.0 0.0)')
    >>> list(g.coords)
    [(0.0, 0.0)]
    >>> g = loads('POINT M (1 2 4)')
    >>> g.coords[:]
    [(1.0, 2.0, 4.0)]

    c                 ó   — || _         y)zŒInitialize the CoordinateSequence.

        Parameters
        ----------
        coords : array
            The coordinate array.

        N)Ú_coords)ÚselfÚcoordss     úJ/var/www/html/truck-me/venv/lib/python3.12/site-packages/shapely/coords.pyÚ__init__zCoordinateSequence.__init__   s   € ð ˆ�ó    c                 ó4   — | j                   j                  d   S )z•Return the length of the CoordinateSequence.

        Returns
        -------
        int
            The length of the CoordinateSequence.

        r   )r   Úshape)r   s    r
   Ú__len__zCoordinateSequence.__len__    s   € ð �|‰|×!Ñ! !Ñ$Ð$r   c              #   ó˜   K  — t        | j                  «       «      D ]*  }t        | j                  |   j	                  «       «      –— Œ, y­w)z$Iterate over the CoordinateSequence.N)Úranger   Útupler   Útolist)r   Úis     r
   Ú__iter__zCoordinateSequence.__iter__+   s<   è ø€ ä�t—|‘|“~Ó&ò 	2ˆAÜ˜Ÿ™ Q™×.Ñ.Ó0Ó1Ó1ñ	2ùs   ‚AA
c                 óÎ  — | j                  «       }t        |t        «      rK||z   dk  s||k\  rt        d«      ‚|dk  r||z   }n|}t	        | j
                  |   j                  «       «      S t        |t        «      r`g }|j                  |«      \  }}}t        |||«      D ]7  }|j                  t	        | j
                  |   j                  «       «      «       Œ9 |S t        d«      ‚)a  Get the item at the specified index or slice.

        Parameters
        ----------
        key : int or slice
            The index or slice.

        Returns
        -------
        tuple or list
            The item at the specified index or slice.

        r   zindex out of rangezkey must be an index or slice)r   Ú
isinstanceÚintÚ
IndexErrorr   r   r   ÚsliceÚindicesr   ÚappendÚ	TypeError)r   ÚkeyÚmr   ÚresÚstartÚstopÚstrides           r
   Ú__getitem__zCoordinateSequence.__getitem__0   sÕ   € ð �L‰L‹NˆÜ�cœ3ÔØ�Q‰w˜Š{˜c QšhÜ Ð!5Ó6Ð6Ø�QŠwØ˜‘G‘à�Ü˜Ÿ™ a™×/Ñ/Ó1Ó2Ð2Ü˜œUÔ#ØˆCØ"%§+¡+¨a£.ÑˆE�4˜Ü˜5 $¨Ó/ò <�Ø—
‘
œ5 §¡¨a¡×!7Ñ!7Ó!9Ó:Õ;ð<àˆJäÐ;Ó<Ð<r   Nc                 ót   — |du rt        d«      ‚|du r| j                  j                  «       S | j                  S )a  Return a copy of the coordinate array.

        Parameters
        ----------
        dtype : data-type, optional
            The desired data-type for the array.
        copy : bool, optional
            If None (default) or True, a copy of the array is always returned.
            If False, a ValueError is raised as this is not supported.

        Returns
        -------
        array
            The coordinate array.

        Raises
        ------
        ValueError
            If `copy=False` is specified.

        Fz7`copy=False` isn't supported. A copy is always created.T)Ú
ValueErrorr   Úcopy)r   Údtyper'   s      r
   Ú	__array__zCoordinateSequence.__array__P   s;   € ð, �5‰=ÜÐVÓWÐWØ�T‰\Ø—<‘<×$Ñ$Ó&Ð&à—<‘<Ðr   c                 ó   — | j                  «       }t        d«      }t        d«      }t        |«      D ]G  }| j                  |   j	                  «       }|j                  |d   «       |j                  |d   «       ŒI ||fS )zX and Y arrays.Údr   é   )r   r   r   r   r   r   )r   r   ÚxÚyr   Úxys         r
   r/   zCoordinateSequence.xym   ss   € ð �L‰L‹NˆÜ�#‹JˆÜ�#‹JˆÜ�q“ò 	ˆAØ—‘˜a‘×'Ñ'Ó)ˆBØ�H‰H�R˜‘UŒOØ�H‰H�R˜‘U�Oð	ð �!ˆtˆr   )NN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r$   r)   Úpropertyr/   © r   r
   r   r      s5   „ ñò	ò	%ò2ò
=ó@ ð: ñ	ó ñ	r   r   N)r3   r   r   r5   r   r
   ú<module>r6      s   ðÙ $å ÷qò qr   