
    Og
                         d Z ddlZddlmZ ddlmZ ddlmZ dgZ G d de      Z	e	ej                  j                  d<   y)	z1Collections of linestrings and related utilities
    N)EmptyPartError)
linestring)BaseMultipartGeometryMultiLineStringc                   4    e Zd ZdZg ZddZed        ZddZy)r   a   
    A collection of one or more LineStrings.

    A MultiLineString has non-zero length and zero area.

    Parameters
    ----------
    lines : sequence
        A sequence LineStrings, or a sequence of line-like coordinate
        sequences or array-likes (see accepted input for LineString).

    Attributes
    ----------
    geoms : sequence
        A sequence of LineStrings

    Examples
    --------
    Construct a MultiLineString containing two LineStrings.

    >>> lines = MultiLineString([[[0, 0], [1, 2]], [[4, 4], [5, 6]]])
    Nc                    |st        j                  d      S t        |t              r|S t	        |d|      }t        |      }g }t        |      D ]B  }t        j                  ||         }|j                  rt        d      |j                  |       D t        |      dk(  rt        j                  d      S t        j                  |      S )NzMULTILINESTRING EMPTYgeomsz1Can't create MultiLineString with empty componentr   )shapelyfrom_wkt
isinstancer   getattrlenranger   
LineStringis_emptyr   appendmultilinestrings)selflinesmsubsilines         e/var/www/html/public_html/myphp/venv/lib/python3.12/site-packages/shapely/geometry/multilinestring.py__new__zMultiLineString.__new__&   s     ##$;<</Lw.Jq 	A((q2D}}$G  KK	 u:?##$;<<''--    c                 @    dt        d | j                  D              dS )Nr   c              3   T   K   | ]   }t        d  |j                  D               " yw)c              3       K   | ]  }|  y wN ).0cs     r   	<genexpr>z>MultiLineString.__geo_interface__.<locals>.<genexpr>.<genexpr>B   s     &;Qq&;s   N)tuplecoords)r"   gs     r   r$   z4MultiLineString.__geo_interface__.<locals>.<genexpr>B   s      P&;!((&;!; Ps   &()typecoordinates)r%   r	   )r   s    r   __geo_interface__z!MultiLineString.__geo_interface__>   s#     &  PTZZ PP
 	
r   c                     | j                   ry| j                  rdndddj                  fd| j                  D              z   dz   S )a  Returns a group of SVG polyline elements for the LineString geometry.

        Parameters
        ==========
        scale_factor : float
            Multiplication factor for the SVG stroke-width.  Default is 1.
        stroke_color : str, optional
            Hex string for stroke color. Default is to use "#66cc99" if
            geometry is valid, and "#ff3333" if invalid.
        opacity : float
            Float number between 0 and 1 for color opacity. Default value is 0.8
        z<g />z#66cc99z#ff3333z<g> c              3   D   K   | ]  }|j                          y wr    )svg)r"   popacityscale_factorstroke_colors     r   r$   z&MultiLineString.svg.<locals>.<genexpr>X   s     UQaeeL,@Us    z</g>)r   is_validjoinr	   )r   r1   r2   r0   s    ```r   r.   zMultiLineString.svgE   sN     ==(,99LggU$**UUV	
r   r    )g      ?NN)	__name__
__module____qualname____doc__	__slots__r   propertyr*   r.   r!   r   r   r   r      s,    . I.0 
 

r      )r8   r
   shapely.errorsr   shapely.geometryr   shapely.geometry.baser   __all__r   libregistryr!   r   r   <module>rB      sF     ) ' 7
N
+ N
b *  Q r   