o
    h                     @   s<   d Z ddlZddlmZmZ G dd deZeejjd< dS )z%Multi-part collections of geometries.    N)BaseGeometryBaseMultipartGeometryc                   @   s*   e Zd ZdZg ZdddZedd ZdS )GeometryCollectionaG  Collection of one or more geometries that can be of different types.

    Parameters
    ----------
    geoms : list
        A list of shapely geometry instances, which may be of varying geometry
        types.

    Attributes
    ----------
    geoms : sequence
        A sequence of Shapely geometry instances

    Examples
    --------
    Create a GeometryCollection with a Point and a LineString

    >>> from shapely import GeometryCollection, LineString, Point
    >>> p = Point(51, -1)
    >>> l = LineString([(52, -1), (49, 2)])
    >>> gc = GeometryCollection([p, l])

    Nc                 C   sL   t |trt|dr|j}n|g}n|du st|dkr!tdS t|S )z Create a new GeometryCollection.geomsNr   zGEOMETRYCOLLECTION EMPTY)
isinstancer   hasattrr   lenshapelyfrom_wktgeometrycollections)selfr    r   V/var/www/html/scripts/venv/lib/python3.10/site-packages/shapely/geometry/collection.py__new__"   s   



zGeometryCollection.__new__c                 C   s(   g }| j D ]}||j qtd|dS )z9Return a GeoJSON-like mapping of the geometry collection.r   )type
geometries)r   append__geo_interface__dict)r   r   geomr   r   r   r   1   s   
z$GeometryCollection.__geo_interface__)N)__name__
__module____qualname____doc__	__slots__r   propertyr   r   r   r   r   r      s    
r      )r   r	   shapely.geometry.baser   r   r   libregistryr   r   r   r   <module>   s
    3