OwlCyberSecurity - MANAGER
Edit File: collections.cpython-39.pyc
a jH�fd � @ s� d Z ddlmZ ddlmZmZ ddlmZ ddl m Z mZ ddlm Z ddlmZ G dd � d e�ZG d d� de�ZG dd � d ee�ZG dd� de�Ze ee eeeefe_dS )zy This module houses the Geometry Collection objects: GeometryCollection, MultiPoint, MultiLineString, and MultiPolygon � )� prototypes)�GEOSGeometry�LinearGeometryMixin)�GEOM_PTR)� LinearRing� LineString)�Point)�Polygonc sx e Zd ZdZ� fdd�Zdd� Zdd� Zdd � Zd d� Zdd � Z dd� Z ejZ ejZedd� �Zedd� �ZeZ� ZS )�GeometryCollection� c sd t |�dkr.t|d ttf�r(|d }q2|}n|}| �|� | �t |�|�}t� j|fi |�� dS )zEInitialize a Geometry Collection from a sequence of Geometry objects.� r N)�len� isinstance�tuple�listZ_check_allowed�_create_collection�super�__init__)�self�args�kwargsZ init_geomsZ collection�� __class__� �e/home/gouroczh/virtualenv/test/3.9/lib/python3.9/site-packages/django/contrib/gis/geos/collections.pyr s zGeometryCollection.__init__c c s t t| ��D ]}| | V qdS )z-Iterate over each Geometry in the Collection.N)�ranger )r �ir r r �__iter__% s zGeometryCollection.__iter__c C s | j S )z3Return the number of geometries in this Collection.)Znum_geom�r r r r �__len__* s zGeometryCollection.__len__c C s&