
    g)                     2    d dl mZ d dlmZ  G d de      Zy)   )GEOSBase)preparedc                   |    e Zd ZdZej
                  Zej                  Zd Z	d Z
d Zd Zd Zd Zd Zd	 Zd
 Zd Zy)PreparedGeometryz
    A geometry that is prepared for performing certain operations.
    At the moment this includes the contains covers, and intersects
    operations.
    c                     || _         ddlm} t        ||      st        t        j                  |j                        | _        y )Nr   )GEOSGeometry)
_base_geomgeometryr   
isinstance	TypeErrorcapigeos_prepareptr)selfgeomr   s      x/var/www/python.vincentserveurtest.ovh/public_html/venv/lib/python3.12/site-packages/django/contrib/gis/geos/prepared.py__init__zPreparedGeometry.__init__   s3     *$-O$$TXX.    c                 V    t        j                  | j                  |j                        S N)r   prepared_containsr   r   others     r   containszPreparedGeometry.contains       %%dhh		::r   c                 V    t        j                  | j                  |j                        S r   )r   prepared_contains_properlyr   r   s     r   contains_properlyz"PreparedGeometry.contains_properly   s    ..txxCCr   c                 V    t        j                  | j                  |j                        S r   )r   prepared_coversr   r   s     r   coverszPreparedGeometry.covers        ##DHHeii88r   c                 V    t        j                  | j                  |j                        S r   )r   prepared_intersectsr   r   s     r   
intersectszPreparedGeometry.intersects#   s    ''%))<<r   c                 V    t        j                  | j                  |j                        S r   )r   prepared_crossesr   r   s     r   crosseszPreparedGeometry.crosses&       $$TXXuyy99r   c                 V    t        j                  | j                  |j                        S r   )r   prepared_disjointr   r   s     r   disjointzPreparedGeometry.disjoint)   r   r   c                 V    t        j                  | j                  |j                        S r   )r   prepared_overlapsr   r   s     r   overlapszPreparedGeometry.overlaps,   r   r   c                 V    t        j                  | j                  |j                        S r   )r   prepared_touchesr   r   s     r   toucheszPreparedGeometry.touches/   r)   r   c                 V    t        j                  | j                  |j                        S r   )r   prepared_withinr   r   s     r   withinzPreparedGeometry.within2   r"   r   N)__name__
__module____qualname____doc__r   PREPGEOM_PTRptr_typeprepared_destroy
destructorr   r   r   r!   r%   r(   r,   r/   r2   r5    r   r   r   r      sR       H&&J	/;D9=:;;:9r   r   N)baser   
prototypesr   r   r   r>   r   r   <module>rA      s     (.9x .9r   