o
    Jf?                     @   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 )GeometryCollectionaN  
    A collection of one or more geometries that may contain more than one type
    of geometry.

    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 LineString, Point
    >>> p = Point(51, -1)
    >>> l = LineString([(52, -1), (49, 2)])
    >>> gc = GeometryCollection([p, l])
    Nc                 C   s:   |st dS t|trt|dr|j}n|g}t |S )NzGEOMETRYCOLLECTION EMPTYgeoms)shapelyfrom_wkt
isinstancer   hasattrr   geometrycollections)selfr    r   g/home/deployuser/azure_apps/autowriter/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 )Nr   )type
geometries)r   append__geo_interface__dict)r   r   geomr   r   r   r   2   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
    2