
    _ h                         d Z ddl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)	z,Collections of points and related utilities.    N)EmptyPartError)point)BaseMultipartGeometry
MultiPointc                   4    e Zd ZdZg ZddZed        ZddZy)r   ai  A collection of one or more Points.

    A MultiPoint has zero area and zero length.

    Parameters
    ----------
    points : sequence
        A sequence of Points, or a sequence of (x, y [,z]) numeric coordinate
        pairs or triples, or an array-like of shape (N, 2) or (N, 3).

    Attributes
    ----------
    geoms : sequence
        A sequence of Points

    Examples
    --------
    Construct a MultiPoint containing two Points

    >>> from shapely import MultiPoint, Point
    >>> ob = MultiPoint([[0.0, 0.0], [1.0, 2.0]])
    >>> len(ob.geoms)
    2
    >>> type(ob.geoms[0]) == Point
    True

    Nc                    |t        j                  d      S t        |t              r|S t	        |      dk(  rt        j                  d      S t        |t
        j                        rt        j                  |j                  t
        j                        r]t        j                  |      }|j                  dk(  st        d      t        j                  |      j                         rQt        d      g }|D ]?  }t!        j"                  |      }|j                  rt        d      |j%                  |       A t        j&                  |      S )z!Create a new MultiPoint geometry.zMULTIPOINT EMPTYr      z/Invalid values passed to MultiPoint constructorz,Can't create MultiPoint with empty component)shapelyfrom_wkt
isinstancer   lennpndarray
issubdtypedtypenumberpointsndim
ValueErroris_emptyanyr   r   Pointappendmultipoints)selfr   subsitemps        w/home/developers/rajanand/mypropertyqr-fmb-refixing-v2/venv/lib/python3.12/site-packages/shapely/geometry/multipoint.py__new__zMultiPoint.__new__,   s   > ##$677
+M[A##$677fbjj)bmmFLL")).T>>&)D99> !RSS%))+$%STTD KK%::()WXXA	 ""4((    c                 @    dt        d | j                  D              dS )z<Return a GeoJSON-like mapping interface for this MultiPoint.r   c              3   :   K   | ]  }|j                   d      yw)r   N)coords).0gs     r   	<genexpr>z/MultiPoint.__geo_interface__.<locals>.<genexpr>L   s      A! As   )typecoordinates)tuplegeoms)r   s    r   __geo_interface__zMultiPoint.__geo_interface__G   s#     !  Adjj AA
 	
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 circle elements for the MultiPoint geometry.

        Parameters
        ----------
        scale_factor : float
            Multiplication factor for the SVG circle diameters.  Default is 1.
        fill_color : str, optional
            Hex string for fill 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.6

        z<g />z#66cc99z#ff3333z<g> c              3   D   K   | ]  }|j                          y wN)svg)r%   r   
fill_coloropacityscale_factors     r   r'   z!MultiPoint.svg.<locals>.<genexpr>c   s     S1aeeL*g>Ss    z</g>)r   is_validjoinr+   )r   r4   r2   r3   s    ```r   r1   zMultiPoint.svgO   sN     ==&*mmJggS

SST	
r!   r0   )g      ?NN)	__name__
__module____qualname____doc__	__slots__r    propertyr,   r1    r!   r   r   r      s,    8 I)6 
 

r!      )r:   numpyr   r
   shapely.errorsr   shapely.geometryr   shapely.geometry.baser   __all__r   libregistryr=   r!   r   <module>rF      sD    2   ) " 7.X
& X
v %  Q r!   