
    g                     2    d dl Zd dlmZ d Z G d d      Zy)    N)Pointc                 V    | j                   | j                  d   | j                  d   ffS )Nr      )_address_point)locations    N/var/www/api/v1/venv_getwork_v1/lib/python3.12/site-packages/geopy/location.py_location_tupler
      s*    xq18??13EFFF    c                       e Zd ZdZdZd Zed        Zed        Zed        Z	ed        Z
ed        Zed	        Zd
 Zd Zd Zd Zd Zd Zd Zd Zd Zy)Locationa,  
    Contains a parsed geocoder response. Can be iterated over as
    ``(location<String>, (latitude<float>, longitude<Float))``.
    Or one can access the properties ``address``, ``latitude``,
    ``longitude``, or ``raw``. The last
    is a dictionary of the geocoder's response for this item.
    )r   r   _tuple_rawc                 ~   |t        d      || _        t        |t              r|| _        nmt        |t
              rt        |      | _        nLt        |t        j                  j                        rt        |      | _        nt        dt        |      z        t        |       | _        |t        d      || _        y )Nz`address` must not be Nonez"`point` is of unsupported type: %rz`raw` must not be None)	TypeErrorr   
isinstancer   r   strcollectionsabcSequencetyper
   r   r   )selfaddresspointraws       r	   __init__zLocation.__init__   s    ?899eU#DKs#,DK{778,DK4tE{B  &d+;455	r   c                     | j                   S )z
        Location as a formatted string returned by the geocoder or constructed
        by geopy, depending on the service.

        :rtype: str
        r   r   s    r	   r   zLocation.address*   s     }}r   c                      | j                   d   S )z=
        Location's latitude.

        :rtype: float
        r   r   r   s    r	   latitudezLocation.latitude4        {{1~r   c                      | j                   d   S )z>
        Location's longitude.

        :rtype: float
        r   r!   r   s    r	   	longitudezLocation.longitude=   r#   r   c                      | j                   d   S )a  
        Location's altitude.

        .. note::
            Geocoding services usually don't consider altitude neither in
            requests nor in responses, so almost always the value of this
            property would be zero.

        :rtype: float
           r!   r   s    r	   altitudezLocation.altitudeF   s     {{1~r   c                     | j                   S )z
        :class:`geopy.point.Point` instance representing the location's
        latitude, longitude, and altitude.

        :rtype: :class:`geopy.point.Point`
        r!   r   s    r	   r   zLocation.pointT   s     {{r   c                     | j                   S )z
        Location's raw, unparsed geocoder response. For details on this,
        consult the service's documentation.

        :rtype: dict
        )r   r   s    r	   r   zLocation.raw^   s     yyr   c                      | j                   |   S )zA
        Backwards compatibility with geopy<0.98 tuples.
        )r   )r   indexs     r	   __getitem__zLocation.__getitem__h   s     {{5!!r   c                     | j                   S Nr   r   s    r	   __str__zLocation.__str__n   s    }}r   c           	      p    d| j                   d| j                  d| j                  d| j                  d	S )Nz	Location(z, (z, z)))r   r"   r%   r(   r   s    r	   __repr__zLocation.__repr__q   s%    MM4==$..$--
 	
r   c                 ,    t        | j                        S r/   )iterr   r   s    r	   __iter__zLocation.__iter__v   s    DKK  r   c                 H    | j                   | j                  | j                  fS r/   )r   r   r   r   s    r	   __getstate__zLocation.__getstate__y   s    }}dkk49944r   c                 N    |\  | _         | _        | _        t        |       | _        y r/   )r   r   r   r
   r   )r   states     r	   __setstate__zLocation.__setstate__|   s     05-t{DI%d+r   c                     t        |t              xrO | j                  |j                  k(  xr4 | j                  |j                  k(  xr | j                  |j                  k(  S r/   )r   r   r   r   r   r   others     r	   __eq__zLocation.__eq__   sR    uh' "MMU^^+"KK5<<'" HH		!		
r   c                     | |k(   S r/    r<   s     r	   __ne__zLocation.__ne__   s    EM""r   c                 ,    t        | j                        S r/   )lenr   r   s    r	   __len__zLocation.__len__   s    4;;r   N)__name__
__module____qualname____doc__	__slots__r   propertyr   r"   r%   r(   r   r   r-   r0   r2   r5   r7   r:   r>   rA   rD   r@   r   r	   r   r   
   s     9I*            "

!5,
# r   r   )collections.abcr   geopy.pointr   r
   r   r@   r   r	   <module>rM      s     GB  B r   