§
    eÎjØ  ã                   ó0   — d Z ddlmZ  G d„ d¦  «        ZdS )zCoordinate sequence utilities.é    )Úarrayc                   óH   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd	d„Ze	d„ ¦   «         Z
dS )
Ú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                 ó   — || _         dS )zŒInitialize the CoordinateSequence.

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

        N)Ú_coords)ÚselfÚcoordss     ú^/root/private/project/pallet_detection_v2/.venv/lib/python3.11/site-packages/shapely/coords.pyÚ__init__zCoordinateSequence.__init__   s   € ð ˆŒˆˆó    c                 ó&   — | 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          |                      ¦   «         ¦  «        D ]0}t          | j        |                              ¦   «         ¦  «        V — Œ1dS )z$Iterate over the CoordinateSequence.N)Úranger   Útupler   Útolist)r   Úis     r
   Ú__iter__zCoordinateSequence.__iter__+   sX   è è € å�t—|’|‘~”~Ñ&Ô&ð 	2ð 	2ˆAÝ˜œ Qœ×.Ò.Ñ0Ô0Ñ1Ô1Ð1Ð1Ð1Ð1ð	2ð 	2r   c                 ó,  — |                       ¦   «         }t          |t          ¦  «        rX||z   dk     s||k    rt          d¦  «        ‚|dk     r||z   }n|}t	          | j        |                              ¦   «         ¦  «        S t          |t          ¦  «        rpg }|                     |¦  «        \  }}}t          |||¦  «        D ]A}| 
                    t	          | j        |                              ¦   «         ¦  «        ¦  «         ŒB|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ŒNˆÝ�c�3ÑÔð 	=Ø�Q‰w˜Š{ˆ{˜c Qšh˜hÝ Ð!5Ñ6Ô6Ð6Ø�QŠwˆwØ˜‘G��à�Ý˜œ aœ×/Ò/Ñ1Ô1Ñ2Ô2Ð2Ý˜�UÑ#Ô#ð 	=ØˆCØ"%§+¢+¨a¡.¤.ÑˆE�4˜Ý˜5 $¨Ñ/Ô/ð <ð <�Ø—
’
�5 ¤¨a¤×!7Ò!7Ñ!9Ô!9Ñ:Ô:Ñ;Ô;Ð;Ð;ØˆJåÐ;Ñ<Ô<Ð<r   Nc                 óp   — |du rt          d¦  «        ‚|du r| 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   sA   € ð, �5ˆ=ˆ=ÝÐVÑWÔWÐWØ�Tˆ\ˆ\Ø”<×$Ò$Ñ&Ô&Ð&à”<Ðr   c                 ó<  — |                       ¦   «         }t          d¦  «        }t          d¦  «        }t          |¦  «        D ]W}| j        |                              ¦   «         }|                     |d         ¦  «         |                     |d         ¦  «         ŒX||fS )zX and Y arrays.Údr   é   )r   r   r   r   r   r   )r   r   ÚxÚyr   Úxys         r
   r/   zCoordinateSequence.xym   s„   € ð �LŠL‰NŒNˆÝ�#‰JŒJˆÝ�#‰JŒJˆÝ�q‘”ð 	ð 	ˆAØ”˜a”×'Ò'Ñ)Ô)ˆBØ�HŠH�R˜”U‰OŒOˆOØ�HŠH�R˜”U‰OŒOˆOˆOØ�!ˆtˆr   )NN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r$   r)   Úpropertyr/   © r   r
   r   r      sŠ   € € € € € ðð ð	ð 	ð 	ð	%ð 	%ð 	%ð2ð 2ð 2ð
=ð =ð =ð@ ð  ð  ð  ð: ð	ð 	ñ „Xð	ð 	ð 	r   r   N)r3   r   r   r5   r   r
   ú<module>r6      sY   ðØ $Ð $à Ð Ð Ð Ð Ð ðqð qð qð qð qñ qô qð qð qð qr   