
    (&h/	                     >    d Z ddlmZ ddlZ G d d          Zd ZdS )z.Support for GEOS prepared geometry operations.    PicklingErrorNc                   T    e Zd ZdZd Zd Zd Zd Zd Zd Z	d Z
d	 Zd
 Zd Zd ZdS )PreparedGeometryaU  A geometry prepared for efficient comparison to a set of other geometries.

    Examples
    --------
    >>> from shapely.prepared import prep
    >>> from shapely.geometry import Point, Polygon
    >>> triangle = Polygon([(0.0, 0.0), (1.0, 1.0), (1.0, -1.0)])
    >>> p = prep(triangle)
    >>> p.intersects(Point(0.5, 0.5))
    True

    c                     t          |t                    r|j        | _        nt          j        |           || _        d| _        dS )z@Prepare a geometry for efficient comparison to other geometries.TN)
isinstancer   contextshapelyprepareprepared)selfr	   s     K/var/www/html/reinick/venv/lib/python3.11/site-packages/shapely/prepared.py__init__zPreparedGeometry.__init__   sB    g/00 	#"?DLLOG$$$"DL    c                 6    | j                             |          S )z;Return True if the geometry contains the other, else False.)r	   containsr   others     r   r   zPreparedGeometry.contains       |$$U+++r   c                 6    | j                             |          S )zDReturn True if the geometry properly contains the other, else False.)r	   contains_properlyr   s     r   r   z"PreparedGeometry.contains_properly#   s    |--e444r   c                 6    | j                             |          S )z9Return True if the geometry covers the other, else False.)r	   coversr   s     r   r   zPreparedGeometry.covers'       |""5)))r   c                 6    | j                             |          S )z0Return True if the geometries cross, else False.)r	   crossesr   s     r   r   zPreparedGeometry.crosses+       |##E***r   c                 6    | j                             |          S )z3Return True if geometries are disjoint, else False.)r	   disjointr   s     r   r   zPreparedGeometry.disjoint/   r   r   c                 6    | j                             |          S )z0Return True if geometries intersect, else False.)r	   
intersectsr   s     r   r!   zPreparedGeometry.intersects3   s    |&&u---r   c                 6    | j                             |          S )z.Return True if geometries overlap, else False.)r	   overlapsr   s     r   r#   zPreparedGeometry.overlaps7   r   r   c                 6    | j                             |          S )z,Return True if geometries touch, else False.)r	   touchesr   s     r   r%   zPreparedGeometry.touches;   r   r   c                 6    | j                             |          S )z8Return True if geometry is within the other, else False.)r	   withinr   s     r   r'   zPreparedGeometry.within?   r   r   c                      t          d          )zPickling is not supported.z&Prepared geometries cannot be pickled.r   )r   s    r   
__reduce__zPreparedGeometry.__reduce__C   s    DEEEr   N)__name__
__module____qualname____doc__r   r   r   r   r   r   r!   r#   r%   r'   r)    r   r   r   r      s           , , ,5 5 5* * *+ + +, , ,. . ., , ,+ + +* * *F F F F Fr   r   c                      t          |           S )z.Create and return a prepared geometric object.)r   )obs    r   prepr1   H   s    Br   )r-   pickler   r
   r   r1   r.   r   r   <module>r3      sp    4 4             =F =F =F =F =F =F =F =F@         r   