
    (ph                     f    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
  S SKJrJr   " S S\5      rg	)
    )c_void_p)GDALBase)GDALException)ds)raster)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      (       a  U R                  5         UR                  5       U R                  ;   a  U R                  UR                  5          nOUn[
        [        4 H/  n[        UR                  [        U5      5      5      nU(       d  M/    O   O[        U[        5      (       a>  U R                  5         [
        [        4 H  nUR                  U5      nU(       d  M    O2   O/[        U[        5      (       a  UnO[        S[        U5      -  5      eW(       d  [        SU-  5      eX@l        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_aliasvcapircapir   get_driver_by_namer   int
get_driverr   typeptr)selfdr_inputnameifacedrivers        Q/var/www/html/venv/lib/python3.13/site-packages/django/contrib/gis/gdal/driver.py__init__Driver.__init__$   s    h$$""$ ~~4;;.{{8>>#34  !%":":;t;L"MN6 ( #&&""$))(36 ( (++FADNR 
 ChN      c                     U R                   $ )N)r'   r%   s    r*   __str__Driver.__str__L   s    yyr-   c                     [         R                  " 5       (       d  [         R                  " 5         [        R                  " 5       (       d  [        R                  " 5         gg)z2
Attempt to register all the data source drivers.
N)r   get_driver_countregister_allr   clss    r*   r   Driver.ensure_registeredO   s?     %%'' %%''  (r-   c                 X    [         R                  " 5       [        R                  " 5       -   $ )z?
Return the number of GDAL/OGR data source drivers registered.
)r   r3   r   r5   s    r*   driver_countDriver.driver_count[   s!    
 %%'%*@*@*BBBr-   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.nameb   s    
 55dhh?@@r-   )r$   N)__name__
__module____qualname____firstlineno____doc__r   r+   r0   classmethodr   r9   propertyr'   __static_attributes__ r-   r*   r   r   
   sv     !!F&P 	! 	! C C A Ar-   r   N)ctypesr   django.contrib.gis.gdal.baser   django.contrib.gis.gdal.errorr   "django.contrib.gis.gdal.prototypesr   r   r   r   django.utils.encodingr   r	   r   rF   r-   r*   <module>rL      s'     1 7 : > 8]AX ]Ar-   