Server : Apache System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64 User : dh_edsupp ( 6597262) PHP Version : 8.2.26 Disable Function : NONE Directory : /lib/python3/dist-packages/django/contrib/gis/gdal/raster/__pycache__/ |
Upload File : |
o 3�a7 � @ s� d dl mZmZmZmZ d dlmZ d dlmZ d dl mZ d dlm Z d dlmZ ddlmZmZmZmZ G d d � d e�ZG dd� de�Zd S )� )�byref�c_double�c_int�c_void_p)� GDALException)�raster)�GDALRasterBase)�numpy)� force_str� )�GDAL_COLOR_TYPES�GDAL_INTEGER_TYPES�GDAL_PIXEL_TYPES�GDAL_TO_CTYPESc @ s� e Zd ZdZdd� Zdd� Zedd� �Zedd � �Zed d� �Z edd � �Z dZd#dd�Zedd� �Z edd� �Zedd� �Zedd� �Zedd� �Zejdd� �Zd$dd�Zd$dd�Zd%d!d"�Zd S )&�GDALBandzQ Wrap a GDAL raster band, needs to be obtained from a GDALRaster object. c C s || _ t�|j|�| _d S �N)�source�capi�get_ds_raster_band�_ptr)�selfr �index� r �E/usr/lib/python3/dist-packages/django/contrib/gis/gdal/raster/band.py�__init__ s zGDALBand.__init__c C s | j �� d| _dS )z� Call the flush method on the Band's parent raster and force a refresh of the statistics attribute when requested the next time. TN)r �_flush�_stats_refresh�r r r r r s zGDALBand._flushc C s t t�| j��S )z< Return the description string of the band. )r r �get_band_descriptionr r r r r �description s zGDALBand.descriptionc C � t �| j�S )z7 Width (X axis) in pixels of the band. )r �get_band_xsizer r r r r �width% � zGDALBand.widthc C r )z8 Height (Y axis) in pixels of the band. )r �get_band_ysizer r r r r �height, r# zGDALBand.heightc C s | j | j S )zA Return the total number of pixels in this band. )r"