
    ekiJ                        S SK r S SKrS SKrS SKJrJrJrJr  S SKJ	r	  S SK
Jr  S SKJr  \ R                  " S5      r S SKJr  \R$                  r\(       a  SrO?\R0                  S:X  a  / S	QrO*\R0                  S
:X  a  / SQrO\" S\R0                  -  5      e\(       a  \ H  r\	" \5      r\c  M    O   \c  \" SSR5                  \5      -  5      e\" \5      r\R0                  S:X  a  S SKJr  \" \5      rS r\" S5      r\/\l         \\l!        S r"S r#S r$\$" 5       r%\" S\\\5      r&S r'\&" \'5      r'S r(\(" S\&/\&5      r)\)" \'5        g! \\\\4 a    Sr GNf = f)    N)CDLL	CFUNCTYPEc_char_pc_int)find_library)GDALException)ImproperlyConfiguredzdjango.contrib.gis)settingsnt)gdal311gdal310gdal309gdal308gdal307gdal306gdal305gdal304gdal303gdal302gdal301posix)gdalGDALz
gdal3.11.0z
gdal3.10.0z	gdal3.9.0z	gdal3.8.0z	gdal3.7.0z	gdal3.6.0z	gdal3.5.0z	gdal3.4.0z	gdal3.3.0z	gdal3.2.0z	gdal3.1.0zGDAL is unsupported on OS "%s".zzCould not find the GDAL library (tried "%s"). Is GDAL installed? If it is, try setting GDAL_LIBRARY_PATH in your settings.z", ")WinDLLc                 N    [         R                  S:X  a	  [        U    $ [        U    $ )zR
Return the correct STDCALL function for certain OSR routines on Win32
platforms.
r   )osnamelwingdallgdal)funcs    d/var/www/events.demo-site.click/venv/lib/python3.13/site-packages/django/contrib/gis/gdal/libgdal.pystd_callr"   U   s#    
 
ww$~T{    GDALVersionInfoc                      [        S5      $ )z0Return only the GDAL version number information.s   RELEASE_NAME_version_info r#   r!   gdal_versionr)   h   s    ))r#   c                      [        S5      $ )z)Return the full GDAL version information.r#   r&   r(   r#   r!   gdal_full_versionr+   m   s    r#   c                      [        5       n [        R                  " SU 5      nU(       d  [        SU -  5      eUR	                  5       u  p#n[        U5      [        U5      U=(       a    [        U5      4$ )Ns7   ^(?P<major>\d+)\.(?P<minor>\d+)(?:\.(?P<subminor>\d+))?z(Could not parse GDAL version string "%s")r)   rematchr   groupsint)vermmajorminorsubminors        r!   gdal_version_infor6   r   s\    
.C
LcRAFLMMXXZE(JE
H$>X??r#   c                 0    [         R                  SX5        g )NzGDAL_ERROR %d: %s)loggererror)error_classerror_numbermessages      r!   err_handlerr=      s    
LL$l<r#   c                 4    [        U 5      nXl        X#l        U$ )N)r"   argtypesrestype)r   argsr@   r    s       r!   functionrB      s    D>DMLKr#   CPLSetErrorHandler)*loggingr   r-   ctypesr   r   r   r   ctypes.utilr   django.contrib.gis.gdal.errorr   django.core.exceptionsr	   	getLoggerr8   django.confr
   GDAL_LIBRARY_PATHlib_pathAttributeErrorImportErrorOSError	lib_namesr   lib_namejoinr   r   r   r"   r'   r?   r@   r)   r+   r6   GDAL_VERSIONCPLErrorHandlerr=   rB   set_error_handlerr(   r#   r!   <module>rV      s    	 	 3 3 $ 7 7			/	0$))H IWW_I WWI  @277J
KK ) 
 
	D
++i
 	!  	X 77d?hH *+"   *

@ !" D%9= k* 1O3DoV  +  	%97C Hs   E E E 