
    (&h~                     v    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<   dS )	z1Collections of linestrings and related utilities.    N)EmptyPartError)
linestring)BaseMultipartGeometryMultiLineStringc                   <    e Zd ZdZg ZddZed             ZddZdS )	r   aH  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.

    >>> from shapely import MultiLineString
    >>> lines = MultiLineString([[[0, 0], [1, 2]], [[4, 4], [5, 6]]])

    Nc                    |st          j        d          S t          |t                    r|S t	          |d|          }g }|D ]A}t          j        |          }|j        rt          d          |	                    |           Bt          |          dk    rt          j        d          S t          j        |          S )z&Create a new MultiLineString geometry.zMULTILINESTRING EMPTYgeomsz1Can't create MultiLineString with empty componentr   )shapelyfrom_wkt
isinstancer   getattrr   
LineStringis_emptyr   appendlenmultilinestrings)selflinessubsitemlines        [/var/www/html/reinick/venv/lib/python3.11/site-packages/shapely/geometry/multilinestring.py__new__zMultiLineString.__new__&   s     	 #$;<<<// 	Lw.. 	 	D(..D} $G   KKu::??#$;<<<'---    c                 D    dt          d | j        D                       dS )zAReturn a GeoJSON-like mapping interface for this MultiLineString.r   c              3   R   K   | ]"}t          d  |j        D                       V  #dS )c              3      K   | ]}|V  d S N ).0cs     r   	<genexpr>z>MultiLineString.__geo_interface__.<locals>.<genexpr>.<genexpr>C   s"      &;&;Qq&;&;&;&;&;&;r   N)tuplecoords)r    gs     r   r"   z4MultiLineString.__geo_interface__.<locals>.<genexpr>C   s;       P P&;&;!(&;&;&;!;!; P P P P P Pr   )typecoordinates)r#   r	   )r   s    r   __geo_interface__z!MultiLineString.__geo_interface__>   s2     &  P PTZ P P PPP
 
 	
r         ?c                     | j         rdS | j        rdnddd                    fd| j        D                       z   dz   S )	a  Return 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 />Nz#66cc99z#ff3333z<g> c              3   F   K   | ]}|                               V  d S r   )svg)r    popacityscale_factorstroke_colors     r   r"   z&MultiLineString.svg.<locals>.<genexpr>Z   s3      UUQaeeL,@@UUUUUUr   z</g>)r   is_validjoinr	   )r   r0   r1   r/   s    ```r   r-   zMultiLineString.svgF   sn     = 	7(,D999LggUUUUUU$*UUUUUV	
r   r   )r)   NN)	__name__
__module____qualname____doc__	__slots__r   propertyr(   r-   r   r   r   r   r      sh         0 I. . . .0 
 
 X

 
 
 
 
 
r      )r7   r
   shapely.errorsr   shapely.geometryr   shapely.geometry.baser   __all__r   libregistryr   r   r   <module>rA      s    7 7  ) ) ) ) ) ) ' ' ' ' ' ' 7 7 7 7 7 7
Q
 Q
 Q
 Q
 Q
+ Q
 Q
 Q
h * Q   r   