https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/django/contrib/gis/db/backends/base/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/django/contrib/gis/db/backends/base/__pycache__/models.cpython-310.pyc
o

���_z�@sddlmZGdd�d�ZdS)�)�gdalc@s�eZdZdZedd��Zedd��Zedd��Zedd	��Zed
d��Z	edd
��Z
edd��Zedd��Zedd��Z
edd��Zedd��Zedd��Zedd��Zedd��Zed$dd ��Zd!d"�Zd#S)%�SpatialRefSysMixinz~
    The SpatialRefSysMixin is a class used by the database-dependent
    SpatialRefSys objects to reduce redundant code.
    c
Cs�t|d�r
|j��Szt�|j�|_|jWSty)}z|}WYd}~nd}~wwzt�|j�|_|jWStyI}z|}WYd}~nd}~wwtd|j|f��)z8
        Return a GDAL SpatialReference object.
        �_srsNz9Could not get OSR SpatialReference from WKT: %s
Error:
%s)	�hasattrr�cloner�SpatialReference�wkt�srs�	Exception�	proj4text)�self�e�msg�r�L/usr/lib/python3/dist-packages/django/contrib/gis/db/backends/base/models.pyr		s"

����zSpatialRefSysMixin.srscC�|jjS)z
        Return a tuple of the ellipsoid parameters:
        (semimajor axis, semiminor axis, and inverse flattening).
        )r	�	ellipsoid�rrrrr$szSpatialRefSysMixin.ellipsoidcCr)zReturn the projection name.)r	�namerrrrr,�zSpatialRefSysMixin.namecC�
|jdS)z4Return the spheroid name for this spatial reference.�spheroid�r	rrrrr1�
zSpatialRefSysMixin.spheroidcCr)z,Return the datum for this spatial reference.�datumrrrrrr6rzSpatialRefSysMixin.datumcCr)z$Is this Spatial Reference projected?)r	�	projectedrrrrr;rzSpatialRefSysMixin.projectedcCr)z Is this Spatial Reference local?)r	�localrrrrr@rzSpatialRefSysMixin.localcCr)z%Is this Spatial Reference geographic?)r	�
geographicrrrrrErzSpatialRefSysMixin.geographiccCr)zReturn the linear units name.)r	�linear_namerrrrrJrzSpatialRefSysMixin.linear_namecCr)zReturn the linear units.)r	�linear_unitsrrrrrOrzSpatialRefSysMixin.linear_unitscCr)z%Return the name of the angular units.)r	�angular_namerrrrr TrzSpatialRefSysMixin.angular_namecCr)zReturn the angular units.)r	�
angular_unitsrrrrr!Yrz SpatialRefSysMixin.angular_unitscCs.|js|jr|j|jfS|jr|j|jfSdS)z)Return a tuple of the units and the name.)NN)rrrrrr!r rrrr�units^s
zSpatialRefSysMixin.unitscCst�|�jS)z
        Return a tuple of (unit_value, unit_name) for the given WKT without
        using any of the database fields.
        )rrr")�clsrrrr�	get_unitshszSpatialRefSysMixin.get_unitsTcCsZt�|�}|j}|d}|s||fSt|�dkr"|d|d}}n|\}}d|||fS)z�
        Class method used by GeometryField on initialization to
        retrieve the `SPHEROID[..]` parameters from the given WKT.
        r�r�zSPHEROID["%s",%s,%s])rrr�len)r#r�stringr	�
sphere_params�sphere_name�radius�
flatteningrrr�get_spheroidps
zSpatialRefSysMixin.get_spheroidcCs
t|j�S)zG
        Return the string representation, a 'pretty' OGC WKT.
        )�strr	rrrr�__str__�s
zSpatialRefSysMixin.__str__N)T)�__name__�
__module__�__qualname__�__doc__�propertyr	rrrrrrrrrr r!r"�classmethodr$r-r/rrrrrsB












	
rN)�django.contrib.gisrrrrrr�<module>s

https://t.me/RX1948 - 2025