| 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 : /lib/python3/dist-packages/django/contrib/gis/gdal/__pycache__/ |
Upload File : |
�
�|�eP! � � � d dl mZmZ d dlmZ d dlmZmZ d dlm Z m
Z
d dlmZ d dl
mZ d dlmZ d dlmZ d d lmZmZmZ d d
lmZ d dlmZmZ G d� d
e� � ZdS )� )�byref�c_double)�GDALBase)�Envelope�OGREnvelope)�
GDALException�SRSException)�Feature)�
OGRFieldTypes)�OGRGeometry)�OGRGeomType)�ds�geom�srs)�SpatialReference)�force_bytes� force_strc �L � e Zd ZdZd� Zd� Zd� Zd� Zd� Zd� Z e
d� � � Ze
d � � � Ze
dd�� � Z
e
d� � � Ze
d
� � � Ze
d� � � Ze
d� � � Ze
d� � � Ze
d� � � Ze
d� � � Zd� Zd� Z e
ee� � Zd� Zdd�Zd� ZdS )�LayerzSA class that wraps an OGR Layer, needs to be instantiated from a DataSource object.c � � |st d� � �|| _ || _ t j | j � � | _ | � d� � | _ dS )a7
Initialize on an OGR C pointer to the Layer and the `DataSource` object
that owns this layer. The `DataSource` object is required so that a
reference to it is kept with this Layer. This prevents garbage
collection of the `DataSource` while this Layer is still active.
z*Cannot create Layer, invalid pointer givens
RandomReadN) r �ptr�_ds�capi�get_layer_defn�_ptr�_ldefn�test_capability�_random_read)�self� layer_ptrr s �?/usr/lib/python3/dist-packages/django/contrib/gis/gdal/layer.py�__init__zLayer.__init__ sZ � � � N�� L�M�M�M��������)�$�)�4�4��� �0�0��?�?����� c �@ � � t |t � � r*|dk rt d� � �� � |� � S t |t � � r;|� � j � � \ }}}� fd�t |||� � D � � S t d� � �)z'Get the Feature at the specified index.r z/Negative indices are not allowed on OGR Layers.c �: �� g | ]}�� |� � ��S � )�
_make_feature)�.0�fidr s �r! �
<listcomp>z%Layer.__getitem__.<locals>.<listcomp>3 s'