File manager - Edit - /usr/local/CyberPanel/lib/python3.10/site-packages/django/contrib/gis/db/backends/base/__pycache__/models.cpython-310.pyc
Back
o �h� � @ s d dl mZ G dd� d�ZdS )� )�gdalc @ s� e Zd ZdZedd� �Zedd� �Zedd� �Zedd � �Zed d� �Z edd � �Z edd� �Zedd� �Zedd� �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 C s� t | d�r | j�� S zt�| j�| _| jW S ty) } z|}W Y d}~nd}~ww zt�| j�| _| jW S tyI } z|}W Y d}~nd}~ww td| 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 �`/usr/local/CyberPanel/lib/python3.10/site-packages/django/contrib/gis/db/backends/base/models.pyr s* ������zSpatialRefSysMixin.srsc C � | j jS )z Return a tuple of the ellipsoid parameters: (semimajor axis, semiminor axis, and inverse flattening). )r � ellipsoid�r r r r r ( s zSpatialRefSysMixin.ellipsoidc C r )zReturn the projection name.)r �namer r r r r 0 � zSpatialRefSysMixin.namec C � | j d S )z4Return the spheroid name for this spatial reference.�spheroid�r r r r r r 5 � zSpatialRefSysMixin.spheroidc C r )z,Return the datum for this spatial reference.�datumr r r r r r : r zSpatialRefSysMixin.datumc C r )z$Is this Spatial Reference projected?)r � projectedr r r r r ? r zSpatialRefSysMixin.projectedc C r )z Is this Spatial Reference local?)r �localr r r r r D r zSpatialRefSysMixin.localc C r )z%Is this Spatial Reference geographic?)r � geographicr r r r r I r zSpatialRefSysMixin.geographicc C r )zReturn the linear units name.)r �linear_namer r r r r N r zSpatialRefSysMixin.linear_namec C r )zReturn the linear units.)r �linear_unitsr r r r r S r zSpatialRefSysMixin.linear_unitsc C r )z%Return the name of the angular units.)r �angular_namer r r r r X r zSpatialRefSysMixin.angular_namec C r )zReturn the angular units.)r � angular_unitsr r r r r! ] r z SpatialRefSysMixin.angular_unitsc C s. | j s| jr| j| jfS | jr| j| jfS dS )z)Return a tuple of the units and the name.)NN)r r r r r r! r r r r r �unitsb s zSpatialRefSysMixin.unitsc C s t �|�jS )z Return a tuple of (unit_value, unit_name) for the given WKT without using any of the database fields. )r r r"