
    jn                     0    S SK Jr  S SKJr   " S S5      rg)    )gdal)cached_propertyc                      \ rS rSrSr\S 5       r\S 5       r\S 5       r	\S 5       r
\S 5       r\S 5       r\S	 5       r\S
 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\SS j5       rS rSrg)SpatialRefSysMixin   zr
The SpatialRefSysMixin is a class used by the database-dependent
SpatialRefSys objects to reduce redundant code.
c           
      @    [         R                  " U R                  5      $ ! [         a  nUn SnAOSnAff = f [         R                  " U R                  5      $ ! [         a  nUn SnAOSnAff = f[        SU R                   SU SU R                   SU 35      e)z(
Return a GDAL SpatialReference object.
Nz3Could not get OSR SpatialReference.
Error for WKT 'z': z
Error for PROJ.4 ')r   SpatialReferencewkt	Exception	proj4text)selfe	wkt_errorproj4_errors       b/var/www/html/KUNJ/venv/lib/python3.13/site-packages/django/contrib/gis/db/backends/base/models.pysrsSpatialRefSysMixin.srs   s    
	((22 	I		((88 	K	 "hhZs9+ 6!!% 0K=B
 	
s'   " 
838A 
A2&A--A2c                 .    U R                   R                  $ )zg
Return a tuple of the ellipsoid parameters:
(semimajor axis, semiminor axis, and inverse flattening).
)r   	ellipsoidr   s    r   r   SpatialRefSysMixin.ellipsoid    s     xx!!!    c                 .    U R                   R                  $ )zReturn the projection name.)r   namer   s    r   r   SpatialRefSysMixin.name(   s     xx}}r   c                      U R                   S   $ )z4Return the spheroid name for this spatial reference.spheroidr   r   s    r   r   SpatialRefSysMixin.spheroid-   s     xx
##r   c                      U R                   S   $ )z,Return the datum for this spatial reference.datumr   r   s    r   r!   SpatialRefSysMixin.datum2   s     xx  r   c                 .    U R                   R                  $ )z$Is this Spatial Reference projected?)r   	projectedr   s    r   r$   SpatialRefSysMixin.projected7   s     xx!!!r   c                 .    U R                   R                  $ )z Is this Spatial Reference local?)r   localr   s    r   r'   SpatialRefSysMixin.local<   s     xx~~r   c                 .    U R                   R                  $ )z%Is this Spatial Reference geographic?)r   
geographicr   s    r   r*   SpatialRefSysMixin.geographicA   s     xx"""r   c                 .    U R                   R                  $ )zReturn the linear units name.)r   linear_namer   s    r   r-   SpatialRefSysMixin.linear_nameF   s     xx###r   c                 .    U R                   R                  $ )zReturn the linear units.)r   linear_unitsr   s    r   r0   SpatialRefSysMixin.linear_unitsK        xx$$$r   c                 .    U R                   R                  $ )z%Return the name of the angular units.)r   angular_namer   s    r   r4   SpatialRefSysMixin.angular_nameP   r2   r   c                 .    U R                   R                  $ )zReturn the angular units.)r   angular_unitsr   s    r   r7    SpatialRefSysMixin.angular_unitsU   s     xx%%%r   c                     U R                   (       d  U R                  (       a  U R                  U R                  4$ U R                  (       a  U R
                  U R                  4$ g)z)Return a tuple of the units and the name.)NN)r$   r'   r0   r-   r*   r7   r4   r   s    r   unitsSpatialRefSysMixin.unitsZ   sI     >>TZZ%%t'7'788__&&(9(9::r   c                 B    [         R                  " U5      R                  $ )zg
Return a tuple of (unit_value, unit_name) for the given WKT without
using any of the database fields.
)r   r	   r:   )clsr
   s     r   	get_unitsSpatialRefSysMixin.get_unitsd   s     $$S)///r   c                     [         R                  " U5      nUR                  nUS   nU(       d  XT4$ [        U5      S:X  a
  US   US   pvOUu  pgSU< SU< SU< S3$ )	zt
Class method used by GeometryField on initialization to
retrieve the `SPHEROID[..]` parameters from the given WKT.
r      r      z
SPHEROID["z",,])r   r	   r   len)r=   r
   stringr   sphere_paramssphere_nameradius
flattenings           r   get_spheroidSpatialRefSysMixin.get_spheroidl   sh     ##C(*o-- =!Q&%21%5}Q7G
%2"-8&*MMr   c                 ,    [        U R                  5      $ )z7
Return the string representation, a 'pretty' OGC WKT.
)strr   r   s    r   __str__SpatialRefSysMixin.__str__   s     488}r    N)T)__name__
__module____qualname____firstlineno____doc__r   r   propertyr   r   r   r!   r$   r'   r*   r-   r0   r4   r7   r:   classmethodr>   rK   rO   __static_attributes__rQ   r   r   r   r      s:   
 
 
( " "   $ $ ! ! " "   # # $ $ % % % % & &     0 0 N N&r   r   N)django.contrib.gisr   django.utils.functionalr   r   rQ   r   r   <module>r\      s    # 3 r   