
    h                     ,    S SK Jr  S SKJrJr   SS jrg)    )SpatialReference)DEFAULT_DB_ALIASconnectionsNc                    U=(       d    [         n[        U   n[        UR                  S5      (       d  [	        S5      eUR
                  R                  (       d  [	        S5      eUR                  R                  5       n[        U [        5      (       d  [        U 5      n U R                  c  [	        S5      eU R                  UU=(       d    U R                  U R                  S.nUR                  R                  5        Vs1 s H  oR                  iM     n	nSU	;   a  U R                  US'   SU	;   a  U=(       d    U R                  US'    UR                   R#                  U5      R%                  U R                  S	9  gs  snf ! UR&                   a.    UR                   R#                  U5      R(                  " S
0 UD6   gf = f)a  
Take a GDAL SpatialReference system and add its information to the
`spatial_ref_sys` table of the spatial backend. Doing this enables
database-level spatial transformations for the backend.  Thus, this utility
is useful for adding spatial reference systems not included by default with
the backend:

>>> from django.contrib.gis.utils import add_srs_entry
>>> add_srs_entry(3857)

Keyword Arguments:
 auth_name:
   This keyword may be customized with the value of the `auth_name` field.
   Defaults to 'EPSG'.

 auth_srid:
   This keyword may be customized with the value of the `auth_srid` field.
   Defaults to the SRID determined by GDAL.

 ref_sys_name:
   For SpatiaLite users only, sets the value of the `ref_sys_name` field.
   Defaults to the name determined by GDAL.

 database:
  The name of the database connection to use; the default is the value
  of `django.db.DEFAULT_DB_ALIAS` (at the time of this writing, its value
  is 'default').
spatial_versionz=The `add_srs_entry` utility only works with spatial backends.z4This utility does not support your database backend.NzMSpatial reference requires an SRID to be compatible with the spatial backend.)srid	auth_name	auth_srid	proj4textsrtextref_sys_name)r    )r   r   hasattrops	Exceptionfeaturessupports_add_srs_entryspatial_ref_sys
isinstancer   r   proj4_meta
get_fieldsnamewktobjectsusinggetDoesNotExistcreate)
srsr	   r
   r   database
connectionSpatialRefSyskwargsfsrs_field_namess
             N/var/www/html/env/lib/python3.13/site-packages/django/contrib/gis/utils/srs.pyadd_srs_entryr(      s   > ++HX&J:>>#455WXX55NOONN224M c+,,s#
xx3
 	
 *#((YY	F (5':':'E'E'GH'G!vv'GOH?"77x(!-!9~? 	##H-11sxx1@ I %% ?##H-44>v>?s   E?2F ;GG)EPSGNNN)django.contrib.gis.gdalr   	django.dbr   r   r(   r       r'   <module>r-      s    4 3 HLI?r,   