Ë
    ~ìqjG  ã                   óf   — 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
y)é    N)Ú	polylabel)Ú
LineStringÚPointÚPolygonc                   ó„   — e Zd Zd„ Zd„ Zd„ Zd„ Zej                  j                  e
j                  dk  d¬«      d„ «       Zy	)
ÚPolylabelTestCasec                 ó–   — t        g d¢«      j                  d«      }t        |d¬«      }t        dd«      }|j	                  |d«      sJ ‚y)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       ú_/var/www/html/truck-me/venv/lib/python3.12/site-packages/shapely/tests/legacy/test_polylabel.pyÚtest_polylabelz PolylabelTestCase.test_polylabel   sM   € ô
 ÚPó
ç
‰&�‹+ð 	ô ˜'¨UÔ3ˆÜ˜ Ó)ˆØ×$Ñ$ U¨DÔ1Ð1Ñ1ó    c                 óx   — t        g d¢«      j                  d«      }t        |«      }|j                  |«      sJ ‚y)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   s=   € ô %Ò%MÓN×UÑUØó
ˆô ˜/Ó*ˆØ×'Ñ'¨Ô.Ð.Ñ.r   c                 ó  — t        g d¢«      }t        |«      }t        j                  dk\  r|j                  dd dgk(  sJ ‚yt        j                  dk\  r|j                  dd dgk(  sJ ‚y|j                  dd dgk(  sJ ‚y)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 ‚y)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‰wœ&Ÿ-™-¨Ó0Ò0Ð0Ð0Ø�w‰wœ&Ÿ-™-¨Ó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 ‚y )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   s\   € ô ×"Ñ"ð mó
ˆô ˜'Ó"ˆØ�w‰wœ&Ÿ-™-¨
Ó3Ò3Ð3Ð3Ø�w‰wœ&Ÿ-™-¨Ó4Ò4Ð4Ñ4r   N)Ú__name__Ú
__module__Ú__qualname__r   r   r,   r8   r5   ÚmarkÚskipifr(   r)   r<   © r   r   r   r   
   sP   „ ò
2ò
/òAò41ð ‡[�[×ÑØ×Ñ˜zÑ)Ð2Jð ó ñ5óñ5r   r   )Úunittestr5   r(   Úshapely.algorithms.polylabelr   Úshapely.geometryr   r   r   ÚTestCaser   rB   r   r   ú<module>rG      s+   ðÛ ã ã Ý 2ß 7Ñ 7ôK5˜×)Ñ)õ K5r   