
    9i	                     X    S SK rS SKrS SKJrJr  S SKJrJr  S r	S r
S rS rS rS	 rg)
    N)PointPolygon)PreparedGeometryprepc                      [        / SQ5      n [        U 5      nUR                  [        SS5      5      (       d   eUR                  [        SS5      5      (       a   eg Nr   r      r   r   r   r   r         ?      ?)r   r   containsr   polygonps     b/var/www/html/land-doc-ocr/venv/lib/python3.13/site-packages/shapely/tests/legacy/test_prepared.pytest_prepared_geometryr      sP    67G!A::eCo&&&&zz%S/*****    c                      [        / SQ5      n [        U 5      nUR                  [        SS5      5      (       d   eUR                  [        SS5      5      (       a   eg r   )r   r   r   r   r   s     r   	test_prepr      sO    67GWA::eCo&&&&zz%S/*****r   c                      [        [        SS5      R                  S5      5      n [        R                  " [
        5         [        SS5      R                  U 5        S S S 5        g ! , (       d  f       g = fNg              ?)r   r   bufferpytestraises	TypeErrorunionr   s    r   test_op_not_allowedr#      sI    sC//45A	y	!c3a  
"	!	!   A$$
A2c                      [        [        SS5      R                  S5      5      n [        R                  " [
        5         [        SS5      R                  U 5        S S S 5        g ! , (       d  f       g = fr   )r   r   r   r   r   r    r   r"   s    r   test_predicate_not_allowedr&      sI    sC//45A	y	!c3  # 
"	!	!r$   c                  V   [        / SQ5      n [        / SQ5      n[        SS5      n[        5       n[        U 5      nXU4 GHR  n[        R                  " SS9   U R                  U5      UR                  U5      :X  d   eU R                  U5      UR                  U5      :X  d   eU R                  U5      UR                  U5      :X  d   eU R                  U5      UR                  U5      :X  d   eU R                  U5      UR                  U5      :X  d   eU R                  U5      UR                  U5      :X  d   eU R                  U5      UR                  U5      :X  d   eU R                  U5      UR                  U5      :X  d   e S S S 5        GMU     g ! , (       d  f       GMh  = f)N)r
   r   r   r   r
   )r   r   )r   r   )r   r   r(   r   ignore)invalid)r   r   r   nperrstatedisjointtouches
intersectscrosseswithinr   contains_properlyoverlaps)polygon1polygon2point2polygon_emptyprepared_polygon1geom2s         r   test_prepared_predicatesr:   "   s   ?@HGHH3_FIM(2M2[[*$$U+/@/I/I%/PPPP##E*.?.G.G.NNNN&&u-1B1M1Me1TTTT##E*.?.G.G.NNNN??5)->-E-Ee-LLLL$$U+/@/I/I%/PPPP--"44U;< < < $$U+/@/I/I%/PPPP +* 3**s   D1F
F(	c                      [        / SQ5      n [        U 5      n[        U5      n[        U[        5      (       d   eUR                  U L d   e[        U5      n[        U[        5      (       d   eUR                  U L d   eg )Nr	   )r   r   
isinstancer   context)r   preparedresults      r   test_prepare_already_preparedr@   7   su    67GG}H(^Ff.////>>W$$$h'Ff.////>>W$$$r   )numpyr+   r   shapely.geometryr   r   shapely.preparedr   r   r   r   r#   r&   r:   r@    r   r   <module>rE      s0      + 3++!$Q*
%r   