
    \i                     (    S r SSKJr   " S S5      rg)zCoordinate sequence utilities.    )arrayc                   J    \ rS rSrSrS rS rS rS rSS jr	\
S	 5       rS
rg)CoordinateSequence   a  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                     Xl         g)zdInitialize the CoordinateSequence.

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

N_coords)selfcoordss     Q/var/www/html/kml_chatgpt/mouzaenv/lib/python3.13/site-packages/shapely/coords.py__init__CoordinateSequence.__init__   s	         c                 4    U R                   R                  S   $ )zmReturn the length of the CoordinateSequence.

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

r   )r	   shape)r
   s    r   __len__CoordinateSequence.__len__    s     ||!!!$$r   c              #      #    [        U R                  5       5       H+  n[        U R                  U   R	                  5       5      v   M-     g7f)z$Iterate over the CoordinateSequence.N)ranger   tupler	   tolist)r
   is     r   __iter__CoordinateSequence.__iter__+   s6     t||~&AQ..011 's   A
Ac                    U R                  5       n[        U[        5      (       aK  X-   S:  d  X:  a  [        S5      eUS:  a  X!-   nOUn[	        U R
                  U   R                  5       5      $ [        U[        5      (       a`  / nUR                  U5      u  pVn[        XVU5       H8  nUR                  [	        U R
                  U   R                  5       5      5        M:     U$ [        S5      e)zGet 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__CoordinateSequence.__getitem__0   s     LLNc3w{ch !566QwGa//122U##C"%++a.E5/

5a!7!7!9:; 0J;<<r   Nc                 x    USL a  [        S5      eUSL a  U R                  R                  5       $ U R                  $ )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__CoordinateSequence.__array__P   s;    , 5=VWWT\<<$$&&<<r   c                    U R                  5       n[        S5      n[        S5      n[        U5       HH  nU R                  U   R	                  5       nUR                  US   5        UR                  US   5        MJ     X#4$ )zX and Y arrays.dr      )r   r   r   r	   r   r!   )r
   r$   xyr   xys         r   r6   CoordinateSequence.xym   sl     LLN#J#JqAa'')BHHRUOHHRUO  tr   r   )NN)__name__
__module____qualname____firstlineno____doc__r   r   r   r)   r/   propertyr6   __static_attributes__ r   r   r   r      s5    		%2
=@ : 	 	r   r   N)r<   r   r   r?   r   r   <module>r@      s    $ q qr   