
    h                     Z    S SK Jr  S SKJr  S SKJr  S SKJr  S SK	J
r
Jr   " S S\5      rg)	    )c_void_p)GDALBase)GDALException)ds)force_bytes	force_strc            
       l    \ rS rSrSrSSSSSSSSSS.	rS rS	 r\S
 5       r	\S 5       r
\S 5       rSrg)Driver	   z
Wrap a GDAL/OGR Data Source Driver.
For more information, see the C API documentation:
https://gdal.org/api/vector_c_api.html
https://gdal.org/api/raster_c_api.html
zESRI ShapefileTIGERGTiffJPEG)	esrishpshapetigerz
tiger/linetifftifjpegjpgc                 (   [        U[        5      (       aw  U R                  5         UR                  5       U R                  ;   a  U R                  UR                  5          nOUn[        [        R                  " [        U5      5      5      nOk[        U[        5      (       a'  U R                  5         [        R                  " U5      nO/[        U[
        5      (       a  UnO[        S[        U5      -  5      eU(       d  [        SU-  5      eX0l        g)zD
Initialize an GDAL/OGR driver on either a string or integer input.
z/Unrecognized input type for GDAL/OGR Driver: %sz1Could not initialize GDAL/OGR Driver on input: %sN)
isinstancestrensure_registeredlower_aliasr   capiget_driver_by_namer   int
get_driverr   typeptr)selfdr_inputnamedrivers       P/var/www/html/env/lib/python3.13/site-packages/django/contrib/gis/gdal/driver.py__init__Driver.__init__#   s     h$$""$ ~~4;;.{{8>>#34 d55k$6GHIF#&&""$__X.F(++FADNR 
 ChN      c                     U R                   $ )N)r%   r#   s    r'   __str__Driver.__str__E   s    yyr*   c                 d    [         R                  " 5       (       d  [         R                  " 5         gg)z2
Attempt to register all the data source drivers.
N)r   get_driver_countregister_allclss    r'   r   Driver.ensure_registeredH   s$     $$&& 'r*   c                 ,    [         R                  " 5       $ )z?
Return the number of GDAL/OGR data source drivers registered.
)r   r0   r2   s    r'   driver_countDriver.driver_countR   s    
 $$&&r*   c                 T    [        [        R                  " U R                  5      5      $ )z1
Return description/name string for this driver.
)r   r   get_driver_descriptionr"   r,   s    r'   r%   Driver.nameY   s    
 44TXX>??r*   )r"   N)__name__
__module____qualname____firstlineno____doc__r   r(   r-   classmethodr   r6   propertyr%   __static_attributes__ r*   r'   r
   r
   	   st     !!F D     ' ' @ @r*   r
   N)ctypesr   django.contrib.gis.gdal.baser   django.contrib.gis.gdal.errorr   "django.contrib.gis.gdal.prototypesr   r   django.utils.encodingr   r   r
   rC   r*   r'   <module>rI      s$     1 7 9 8U@X U@r*   