
     h`                         d Z ddlmZ ddlmZmZ ddlmZ  ed       G d d             Z G d	 d
e      Z	e G d d             Z
y)zC
This module contains the structures related to areas of interest.
    )	dataclass)
NamedTupleUnion)is_nullT)frozenc                   @    e Zd ZU dZeed<   eed<   eed<   eed<   d Zy)AreaOfInterestz|
    .. versionadded:: 2.3.0

    This is the area of interest for:

    - Transformations
    - Querying for CRS data.
    west_lon_degreesouth_lat_degreeeast_lon_degreenorth_lat_degreec                     t        | j                        s?t        | j                        s*t        | j                        st        | j                        rt        d      y Nz#NaN or None values are not allowed.)r   r
   r   r   r   
ValueErrorselfs    f/home/developers/rajanand/mypropertyqr-fmb-refixing-v2/venv/lib/python3.12/site-packages/pyproj/aoi.py__post_init__zAreaOfInterest.__post_init__   sK    D(()t,,-t++,t,,-BCC .    N)__name__
__module____qualname____doc__float__annotations__r    r   r   r	   r	      s'     Dr   r	   c                   ~    e Zd ZU dZeed<   eed<   eed<   eed<   dZedz  ed<   ede	eeeef   fd	       Z
defd
Zy)	AreaOfUsezb
    .. versionadded:: 2.0.0

    Area of Use for CRS, CoordinateOperation, or a Transformer.
    westsoutheastnorthNnamereturnc                 ^    | j                   | j                  | j                  | j                  fS )z
        The bounds of the area of use.

        Returns
        -------
        tuple[float, float, float, float]
            west, south, east, and north bounds.
        )r   r    r!   r"   r   s    r   boundszAreaOfUse.bounds;   s#     yy$**dii;;r   c                 :    d| j                    d| j                   S )Nz- name: z
- bounds: )r#   r&   r   s    r   __str__zAreaOfUse.__str__G   s    $))L>>r   )r   r   r   r   r   r   r#   strpropertytupler&   r(   r   r   r   r   r   )   s^     KL
KLD#*	<eUE589 	< 	<? ?r   r   c                   t    e Zd ZU dZeed<   eed<   eed<   eed<   d Zded ef   de	fd	Z
ded ef   de	fd
Zy)BBoxzs
    Bounding box to check if data intersects/contains other
    bounding boxes.

    .. versionadded:: 3.0.0

    r   r    r!   r"   c                     t        | j                        s?t        | j                        s*t        | j                        st        | j                        rt        d      y r   )r   r   r    r!   r"   r   r   s    r   r   zBBox.__post_init__^   sC    DIItzz"tyy!tzz"BCC #r   otherr$   c                     | j                   |j                  k  xrO |j                   | j                  k  xr4 | j                  |j                  k  xr |j                  | j                  k  S )z
        Parameters
        ----------
        other: BBox
            The other BBox to use to check.

        Returns
        -------
        bool:
            True if this BBox intersects the other bbox.
        r   r!   r    r"   r   r/   s     r   
intersectszBBox.intersectsg   sZ     II

" )

TYY&)

U[[() djj(		
r   c                     |j                   | j                   k\  xrO |j                  | j                  k  xr4 |j                  | j                  k\  xr |j                  | j                  k  S )z
        Parameters
        ----------
        other: Union["BBox", AreaOfUse]
            The other BBox to use to check.

        Returns
        -------
        bool:
            True if this BBox contains the other bbox.
        r1   r2   s     r   containszBBox.containsz   sZ     JJ$))# *

dii'*tzz)* tzz)		
r   N)r   r   r   r   r   r   r   r   r   boolr3   r5   r   r   r   r-   r-   K   s]     KL
KLD
fi&7 8 
T 
&
eFI$56 
4 
r   r-   N)r   dataclassesr   typingr   r   pyproj.utilsr   r	   r   r-   r   r   r   <module>r:      s\    " $   $D D D:?
 ?D ?
 ?
 ?
r   