File: //lib/python3/dist-packages/django/contrib/gis/geos/__pycache__/point.cpython-310.pyc
o
�a� � @ sP d dl mZ d dlmZ d dlmZ d dlmZ d dl m
Z
G dd� de
�ZdS ) � )�c_uint)�gdal)�
prototypes)�
GEOSException)�GEOSGeometryc s� e Zd ZdZdZdZd'� fdd� Z� fdd�Z� fd d
�Z� fdd�Z e
d
d� �Ze
dd� �Zdd� Z
dd� Zdd� Zdd� Zdd� ZeZedd� �Zejdd� �Zedd� �Zejd d� �Zed!d"� �Zejd#d"� �Zed$d%� �Zejd&d%� �ZeZ� ZS )(�Point� � TNc s� |du rg }n.t |ttf�r|}n$t |ttf�r1t |ttf�r1t |ttf�r,|||g}n ||g}ntd��| �t|�|�}t� j ||d� dS )a
The Point object may be initialized with either a tuple, or individual
parameters.
For example:
>>> p = Point((5, 23)) # 2D point, passed in as a tuple
>>> p = Point(5, 23, 8) # 3D point, passed in with individual parameters
Nz2Invalid parameters given for Point initialization.)�srid)
�
isinstance�tuple�list�float�int� TypeError�
_create_point�len�super�__init__)�self�x�y�zr
�coords�point�� __class__� �?/usr/lib/python3/dist-packages/django/contrib/gis/geos/point.pyr s
zPoint.__init__c s | j rd S t� �� S �N)�emptyr �_to_pickle_wkb�r r r r r! + � zPoint._to_pickle_wkbc s |d u r| � � S t� �|�S r )�
_create_emptyr �_from_pickle_wkb)r �wkbr r r r% . � zPoint._from_pickle_wkbc s | j r tjj�� S t� �� S r )r r �
geometriesr r$ r �_ogr_ptrr"