| Server IP : 217.160.0.135 / Your IP : 216.73.217.85 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1074145052 ( 1074145052) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /lib/python3/dist-packages/django/contrib/gis/__pycache__/ |
Upload File : |
�
�|�e&/ � � � d Z ddlmZ ddlmZ g d�ZeeefZdZ d� Z
e G d� d� � � � Z G d � d
e� � Z G d� de� � Z
eZe
Zd
S )a
Distance and Area objects to allow for sensible and convenient calculation
and conversions.
Authors: Robert Coup, Justin Bronn, Riccardo Di Virgilio
Inspired by GeoPy (https://github.com/geopy/geopy)
and Geoff Biggs' PhD work on dimensioned units for robotics.
� )�Decimal)�total_ordering)�A�Area�D�Distance�sq_c �H � | j t k r| j n| j j S �N)� __class__�type�__name__)�objs �</usr/lib/python3/dist-packages/django/contrib/gis/measure.py�pretty_namer / s � ��=�D�0�0�3�<�<�c�m�6L�L� c �� � e Zd ZdZi Zi Zi Zdd�Zd� Zd� Z e
ee � � Zd� Zd� Z
d� Zd� Zd � Zd
� Zd� Zd� Zd
� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zed� � � ZdS )�MeasureBaseNc � � | � |� � \ }| _ t | | j |� � |rt |t
� � r|| _ d S d S d S r )�
default_units�
_default_unit�setattr�
STANDARD_UNIT�
isinstance�str)�self�default_unit�kwargs�values r �__init__zMeasureBase.__init__: sm � �$(�$6�$6�v�$>�$>�!��t�!���d�(�%�0�0�0�� .�J�|�S�9�9� .�!-�D���� .� .� .� .r c �, � t | | j � � S r )�getattrr �r s r �
_get_standardzMeasureBase._get_standard@ s � ��t�T�/�0�0�0r c �2 � t | | j |� � d S r )r r )r r s r �
_set_standardzMeasureBase._set_standardC s � ���d�(�%�0�0�0�0�0r c �b � || j v r| j | j | z S t d|z � � �)N�Unknown unit type: %s)�UNITS�standard�AttributeError)r �names r �__getattr__zMeasureBase.__getattr__H s7 � ��4�:����=�4�:�d�#3�3�3� �!8�4�!?�@�@�@r c �b � t | � � �d| j �dt | | j � � �d�S )N�(�=�))r r r"