§
    eÎjG  ã                   ód   — d dl Z d dlZd dlZd dlmZ d dlmZmZmZ  G d„ de j	        ¦  «        Z
dS )é    N)Ú	polylabel)Ú
LineStringÚPointÚPolygonc                   ó‚   — e Zd Zd„ Zd„ Zd„ Zd„ Zej         	                    e
j        dk     d¬¦  «        d„ ¦   «         Zd	S )
ÚPolylabelTestCasec                 óÀ   — t          g d¢¦  «                             d¦  «        }t          |d¬¦  «        }t          dd¦  «        }|                     |d¦  «        sJ ‚dS )zU
        Finds pole of inaccessibility for a polygon with a tolerance of 10

        )©r   r   )é2   éÈ   )éd   r   )é   r   )iœÿÿÿiìÿÿÿ)ijÿÿÿi8ÿÿÿr   gü©ñÒMbP?)Ú	tolerancegçû©ñÒÝM@g…ëQ¸Õ[@N)r   Úbufferr   r   Úequals_exact)ÚselfÚpolygonÚlabelÚexpecteds       ús/root/private/project/pallet_detection_v2/.venv/lib/python3.11/site-packages/shapely/tests/legacy/test_polylabel.pyÚtest_polylabelz PolylabelTestCase.test_polylabel   so   € õ
 ØPÐPÐPñ
ô 
ç
Š&�‰+Œ+ð 	õ ˜'¨UÐ3Ñ3Ô3ˆÝ˜ Ñ)Ô)ˆØ×$Ò$ U¨DÑ1Ô1Ð1Ð1Ð1Ð1Ð1ó    c                 óš   — t          g d¢¦  «                             d¦  «        }t          |¦  «        }|                     |¦  «        sJ ‚dS )zt
        Finds pole of inaccessibility for a concave polygon and ensures that
        the point is inside.

        ))éô  r   r
   )r   r   )r   r   r   N)r   r   r   Úcontains)r   Úconcave_polygonr   s      r   Útest_concave_polygonz&PolylabelTestCase.test_concave_polygon   sZ   € õ %Ð%MÐ%MÐ%MÑNÔN×UÒUØñ
ô 
ˆõ ˜/Ñ*Ô*ˆØ×'Ò'¨Ñ.Ô.Ð.Ð.Ð.Ð.Ð.r   c                 ó  — t          g d¢¦  «        }t          |¦  «        }t          j        dk    r|j        dd…         dgk    sJ ‚dS t          j        dk    r|j        dd…         dgk    sJ ‚dS |j        dd…         dgk    sJ ‚dS )a  
        The centroid algorithm used is vulnerable to floating point errors
        and can give unexpected results for rectangular polygons. Test
        that this special case is handled correctly.
        https://github.com/mapbox/polylabel/issues/3
        ))çòú'\@@çã6À[L]À)r   çÁ9#J{M]À)çØG§®\@@r!   )r"   r    )é   é   r   N)ç|ò°Pk\@@g¨©ek}L]À©r#   é   r   )r%   gR¸…ëL]À)r%   güÆ×žYM]À)r   r   ÚshapelyÚgeos_versionÚcoords©r   r   r   s      r   Útest_rectangle_special_casez-PolylabelTestCase.test_rectangle_special_case#   s¾   € õ ðð ð ñ
ô 
ˆõ ˜'Ñ"Ô"ˆÝÔ :Ò-Ð-à”<   ”?Ð'?Ð&@Ò@Ð@Ð@Ð@Ð@Ð@ÝÔ! ZÒ/Ð/à”<   ”?Ð'?Ð&@Ò@Ð@Ð@Ð@Ð@Ð@ð ”<   ”?Ð'?Ð&@Ò@Ð@Ð@Ð@Ð@Ð@r   c                 óÎ   — t          g d¢g d¢g¬¦  «        }t          |d¦  «        }|j        t          j        d¦  «        k    sJ ‚|j        t          j        d¦  «        k    sJ ‚dS )z
        Finds pole of inaccessibility for a polygon with a hole
        https://github.com/shapely/shapely/issues/817
        )r
   )é
   r   )r.   r.   )r   r.   r
   )©é   r0   )é   r0   )r1   r1   )r0   r1   r/   )ÚshellÚholesgš™™™™™©?g      @N)r   r   ÚxÚpytestÚapproxÚyr+   s      r   Útest_polygon_with_holez(PolylabelTestCase.test_polygon_with_hole=   s~   € õ
 Ø>Ð>Ð>Ø;Ð;Ð;Ð<ð
ñ 
ô 
ˆõ ˜' 4Ñ(Ô(ˆØŒw�&œ-¨Ñ0Ô0Ò0Ð0Ð0Ð0ØŒw�&œ-¨Ñ0Ô0Ò0Ð0Ð0Ð0Ð0Ð0r   r&   zFails with GEOS < 3.12)Úreasonc                 óÈ   — t          j        d¦  «        }t          |¦  «        }|j        t	          j        d¦  «        k    sJ ‚|j        t	          j        d¦  «        k    sJ ‚d S )NzžPOLYGON ((536520.0679737709 5438764.374763639, 536520.0679737704 5438764.374763602, 536520.0679737709 5438764.374763642, 536520.0679737709 5438764.374763639))g`åÐ"�_ Ag   K¿TA)r(   Úfrom_wktr   r4   r5   r6   r7   r+   s      r   Útest_polygon_infinite_loopz,PolylabelTestCase.test_polygon_infinite_loopJ   sk   € õ Ô"ð mñ
ô 
ˆõ ˜'Ñ"Ô"ˆØŒw�&œ-¨
Ñ3Ô3Ò3Ð3Ð3Ð3ØŒw�&œ-¨Ñ4Ô4Ò4Ð4Ð4Ð4Ð4Ð4r   N)Ú__name__Ú
__module__Ú__qualname__r   r   r,   r8   r5   ÚmarkÚskipifr(   r)   r<   © r   r   r   r   
   s–   € € € € € ð
2ð 
2ð 
2ð
/ð 
/ð 
/ðAð Að Að41ð 1ð 1ð „[×ÒØÔ˜zÒ)Ð2Jð ñ ô ð5ð 5ñô ð5ð 5ð 5r   r   )Úunittestr5   r(   Úshapely.algorithms.polylabelr   Úshapely.geometryr   r   r   ÚTestCaser   rB   r   r   ú<module>rG      s‘   ðØ €€€à €€€à €€€Ø 2Ð 2Ð 2Ð 2Ð 2Ð 2Ø 7Ð 7Ð 7Ð 7Ð 7Ð 7Ð 7Ð 7Ð 7Ð 7ðK5ð K5ð K5ð K5ð K5˜Ô)ñ K5ô K5ð K5ð K5ð K5r   