| Server IP : 217.160.0.135 / Your IP : 216.73.217.85 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1074145052 ( 1074145052) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/lib/python3/dist-packages/django/contrib/gis/geos/__pycache__/ |
Upload File : |
�
�|�e � �b � d dl mZmZ d dlmZ d dlmZ d dlm Z d dl
mZ G d� de� � ZdS ) � )�byref�c_uint)�
prototypes)�GEOSGeometry)�GEOM_PTR)�
LinearRingc � � � e Zd ZdZ� fd�Zd� Zd� Zed� � � Zd� Z d� Z
dd �Zd
� Zd� Z
d� Zej Zej Zed
� � � Zd� Zd� Z eee� � ZeZed� � � ZeZed� � � Z� xZS )�Polygon� c �� �� |s0 t � � j | � dd� � fi |�� dS |^}}t |� � }|dk rgt |d t
t f� � rE|d sd}d}n8t |d d t � � r|d }t |� � }| � |dz |g|�� � } t � � j |fi |�� dS )a�
Initialize on an exterior ring and a sequence of holes (both
instances may be either LinearRing instances, or a tuple/list
that may be constructed into a LinearRing).
Examples of initialization, where shell, hole1, and hole2 are
valid LinearRing geometries:
>>> from django.contrib.gis.geos import LinearRing, Polygon
>>> shell = hole1 = hole2 = LinearRing()
>>> poly = Polygon(shell, hole1, hole2)
>>> poly = Polygon(shell, (hole1, hole2))
>>> # Example where a tuple parameters are used:
>>> poly = Polygon(((0, 0), (0, 10), (10, 10), (0, 10), (0, 0)),
... ((4, 4), (4, 6), (6, 6), (6, 4), (4, 4)))
r Nr � )�super�__init__�_create_polygon�len�
isinstance�tuple�listr )�self�args�kwargs�ext_ring�
init_holes�n_holes�polygon� __class__s ��A/usr/lib/python3/dist-packages/django/contrib/gis/geos/polygon.pyr zPolygon.__init__ s �� �"