o
    Ch                     @   s,   d dl mZ d dlmZ G dd deZdS )    )GDALBase)rasterc                   @   s*   e Zd ZdZedd Zejdd ZdS )GDALRasterBasez@
    Attributes that exist on both GDALRaster and GDALBand.
    c                 C   s   dg}t | j}|r$d}|| }|r$||  |d7 }|| }|st | i }|D ];}t | j|dkr9dn| }|sAq-i }d}|| }|rb| d\}	}
|
||	< |d7 }|| }|sK|||pgd< q-|S )z
        Return the metadata for this raster or band. The return value is a
        nested dictionary, where the first-level key is the metadata domain and
        the second-level is the metadata item names and values for that domain.
        DEFAULTr      N=)	capiget_ds_metadata_domain_list_ptrappenddecodefree_dslget_ds_metadataencodesplit)selfdomain_list	meta_listcounterdomainresultdatadomain_metaitemkeyval r   u/var/www/html/myvaluetrips/my_value_trip_new/venv/lib/python3.10/site-packages/django/contrib/gis/gdal/raster/base.pymetadata
   s<   	
zGDALRasterBase.metadatac                 C   s^   |  D ](\}}|dkrdn| }|  D ]\}}t| j| |r'| nd| qqdS )zo
        Set the metadata. Update only the domains that are contained in the
        value dictionary.
        r   N)itemsr   r   set_ds_metadata_itemr
   )r   valuer   r   	meta_name
meta_valuer   r   r   r   <   s   N)__name__
__module____qualname____doc__propertyr   setterr   r   r   r   r      s    
1r   N)django.contrib.gis.gdal.baser   "django.contrib.gis.gdal.prototypesr   r   r   r   r   r   r   <module>   s    