
    _ h~                         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   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                 j   |st        j                  d      S t        |t              r|S t	        |d|      }g }|D ]?  }t        j                  |      }|j                  rt        d      |j                  |       A t        |      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        |/home/developers/rajanand/mypropertyqr-fmb-refixing-v2/venv/lib/python3.12/site-packages/shapely/geometry/multilinestring.py__new__zMultiLineString.__new__&   s     ##$;<</Lw. 	D((.D}}$G  KK	 u:?##$;<<''--    c                 @    dt        d | j                  D              dS )zAReturn a GeoJSON-like mapping interface for this MultiLineString.r   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>C   s     &;Qq&;s   N)tuplecoords)r    gs     r   r"   z4MultiLineString.__geo_interface__.<locals>.<genexpr>C   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  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 />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>Z   s     UQaeeL,@Us    z</g>)r   is_validjoinr	   )r   r/   r0   r.   s    ```r   r,   zMultiLineString.svgF   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,    0 I.0 
 

r      )r6   r
   shapely.errorsr   shapely.geometryr   shapely.geometry.baser   __all__r   libregistryr   r   r   <module>r@      sB    7  ) ' 7
Q
+ Q
h *  Q r   