
    rbi`                         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
dS )zC
This module contains the structures related to areas of interest.
    )	dataclass)
NamedTupleUnion)is_nullT)frozenc                   B    e Zd ZU dZeed<   eed<   eed<   eed<   d ZdS )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          d S Nz#NaN or None values are not allowed.)r   r
   r   r   r   
ValueErrorselfs    Z/var/www/html/mdtn/previsions/meteo_cartes/venv/lib/python3.11/site-packages/pyproj/aoi.py__post_init__zAreaOfInterest.__post_init__   ss    D())	Dt,--	D t+,,	D t,--		D BCCC	D 	D    N)__name__
__module____qualname____doc__float__annotations__r    r   r   r	   r	      sf           D D D D 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dS )	AreaOfUsezb
    .. versionadded:: 2.0.0

    Area of Use for CRS, CoordinateOperation, or a Transformer.
    westsoutheastnorthNnamereturnc                 6    | 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     y$*di;;r   c                 &    d| j          d| j         S )Nz- name: z
- bounds: )r#   r&   r   s    r   __str__zAreaOfUse.__str__G   s    >$)>>>>>r   )r   r   r   r   r   r   r#   strpropertytupler&   r(   r   r   r   r   r   )   s           KKKLLL
KKKLLLD#*	<eUE589 	< 	< 	< X	<? ? ? ? ? ? ?r   r   c                       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dS )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          d S r   )r   r   r    r!   r"   r   r   s    r   r   zBBox.__post_init__^   so    DI	Dtz""	D ty!!	D tz""		D BCCC	D 	Dr   otherr$   c                     | j         |j        k     o/|j         | j        k     o| j        |j        k     o|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   sJ     I
" )
TY&)
U[() dj(		
r   c                     |j         | j         k    o/|j        | j        k    o|j        | j        k    o|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   sJ     J$)# *
di'*tz)* tz)		
r   N)r   r   r   r   r   r   r   r   r   boolr3   r5   r   r   r   r-   r-   K   s           KKKLLL
KKKLLLD D 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 D D D D:? ? ? ? ?
 ? ? ?D ?
 ?
 ?
 ?
 ?
 ?
 ?
 ?
 ?
 ?
r   