Ë
    ~ìqjÓ  ã                   ó†   — d dl Z d dlZd dlZd dlmZ d dlmZ d dlmZmZm	Z	m
Z
mZ d dlmZ  G d„ de j                  «      Zy)é    N)Úgeos_version)ÚTopologicalError)ÚGeometryCollectionÚ
LineStringÚ
MultiPointÚPointÚPolygon)Úloadsc                   ó*   — e Zd Zd„ Zd„ Zd„ Zd„ Zd„ Zy)ÚOperationsTestCasec                 ó8  — t        dd«      }|j                  dk(  sJ ‚|j                  dk(  sJ ‚|j                  t        dd«      «      t	        j
                  d«      k(  sJ ‚t        |j                  t         «      sJ ‚|j                  t        dd«      «      j                  sJ ‚t        |j                  d«      t        «      sJ ‚t        |j                  dd¬«      t        «      sJ ‚t        d«      }t        d	«      }|j                  dd
¬«      }|j                  |d«      sJ ‚t        d«      }t        d«      }|j                  dd¬«      }|j                  |d«      sJ ‚t        |j                  t         «      sJ ‚t        |j!                  t        dd«      «      t         «      sJ ‚t        |j#                  t        dd«      «      t$        «      sJ ‚t        |j&                  t(        «      sJ ‚t        |j+                  t        dd«      «      t$        «      sJ ‚t        |j-                  «       t         «      sJ ‚t        |j/                  «       t         «      sJ ‚|j-                  «       |j/                  «       k(  sJ ‚t        |j0                  t         «      sJ ‚y )Ng        g      ð¿gÍ;fž ö?éÿÿÿÿg      $@é    )Ú	quad_segszRPOLYGON ((120 120, 140 199, 160 200, 180 199, 220 120, 122 122, 121 121, 120 120))z@POLYGON ((120 120, 140 199, 160 200, 180 199, 220 120, 120 120))F)Úpreserve_topologygü©ñÒMbP?ziPOLYGON ((80 200, 240 200, 240 60, 80 60, 80 200),(120 120, 220 120, 180 199, 160 200, 140 199, 120 120))Té   )r   ÚareaÚlengthÚdistanceÚpytestÚapproxÚ
isinstanceÚenvelopeÚintersectionÚis_emptyÚbufferr	   r
   ÚsimplifyÚequals_exactÚconvex_hullÚ
differenceÚsymmetric_differencer   Úboundaryr   ÚunionÚrepresentative_pointÚpoint_on_surfaceÚcentroid)ÚselfÚpointÚpÚexpectedÚss        ú`/var/www/html/truck-me/venv/lib/python3.12/site-packages/shapely/tests/legacy/test_operations.pyÚtest_operationsz"OperationsTestCase.test_operations   sW  € Ü�c˜3“ˆð �z‰z˜SÒ Ð Ð Ø�|‰|˜sÒ"Ð"Ð"Ø�~‰~œe D¨$Ó/Ó0´F·M±MÐBTÓ4UÒUÐUÐUô
 ˜%Ÿ.™.¬%Ô0Ð0Ð0ð ×!Ñ!¤%¨¨B£-Ó0×9Ò9Ð9Ð9ô ˜%Ÿ,™, tÓ,¬gÔ6Ð6Ð6Ü˜%Ÿ,™, t°r˜,Ó:¼GÔDÐDÐDô ðó
ˆô ØNó
ˆð �J‰J�t¨uˆJÓ5ˆØ�~‰~˜h¨Ô.Ð.Ð.äðFó
ˆô ðFó
ˆð �J‰J�t¨tˆJÓ4ˆØ�~‰~˜h¨Ô.Ð.Ð.ô ˜%×+Ñ+¬UÔ3Ð3Ð3ô ˜%×*Ñ*¬5°°Q«<Ó8¼%Ô@Ð@Ð@ä˜%×4Ñ4´U¸2¸q³\ÓBÄJÔOÐOÐOô ˜%Ÿ.™.Ô*<Ô=Ð=Ð=ô ˜%Ÿ+™+¤e¨B°£lÓ3´ZÔ@Ð@Ð@ä˜%×4Ñ4Ó6¼Ô>Ð>Ð>Ü˜%×0Ñ0Ó2´EÔ:Ð:Ð:Ø×)Ñ)Ó+¨u×/EÑ/EÓ/GÒGÐGÐGä˜%Ÿ.™.¬%Ô0Ð0Ñ0ó    c                 óh  — t        dd«      j                  t        dd«      «      dk(  sJ ‚t        d«      }|j                  rJ ‚t        dk  rDt        j                  t        t        j                  f«      5  |j                  |«       d d d «       y |j                  |«      dk(  sJ ‚y # 1 sw Y   y xY w)Nr   r   Ú	FF0FFF0F2zUPOLYGON ((40 100, 80 100, 80 60, 40 60, 40 100), (60 60, 80 60, 80 40, 60 40, 60 60)))é   é   r   Ú	2FFF1FFF2)
r   Úrelater
   Úis_validr   r   Úraisesr   ÚshapelyÚGEOSException)r'   Úinvalid_polygons     r,   Útest_relatezOperationsTestCase.test_relateK   s¬   € ä�Q˜‹{×!Ñ!¤%¨¨B£-Ó0°KÒ?Ð?Ð?ô  ð3ó
ˆð #×+Ò+Ð+Ð+Ü˜*Ò$Ü—‘Ô 0´'×2GÑ2GÐHÓIñ 8Ø×&Ñ& Ô7÷8ð 8ð #×)Ñ)¨/Ó:¸kÒIÐIÑI÷8ð 8ús   Á6B(Â(B1c                 ó˜   — t        dd«      }t        g d¢«      }|j                  |«      }||j                  t        dd«      «      k(  sJ ‚y )Nr   ))é   r   )r<   é   )r1   r=   r1   r=   )r   r   Úhausdorff_distancer   )r'   r(   Úliner   s       r,   Útest_hausdorff_distancez*OperationsTestCase.test_hausdorff_distance[   sE   € Ü�a˜“ˆÜÒ2Ó3ˆà×+Ñ+¨DÓ1ˆØ˜5Ÿ>™>¬%°°1«+Ó6Ò6Ð6Ñ6r.   c                 óz  — t        ddg«      }t        dd«      }|j                  dd¬«      }||k(  sJ ‚t        d«      }|j                  sJ ‚|j                  dd¬«      }|j                  sJ ‚t        d	«      }t        j                  t        d
¬«      5  |j                  dd¬«       d d d «       y # 1 sw Y   y xY w)N)r   r   )r   r<   r   g      ø?g      à?T)Ú
normalizedzLINESTRING EMPTYzPOLYGON EMPTYzincorrect geometry type)Úmatch)r   r   Úinterpolater
   r   r   r6   Ú	TypeError)r'   Ú	test_lineÚknown_pointÚinterpolated_pointÚ
empty_lineÚpolygons         r,   Útest_interpolatez#OperationsTestCase.test_interpolateb   sÄ   € ä ¨Ð/Ó0ˆ	Ü˜A˜s“mˆØ&×2Ñ2°3À4Ð2ÓHÐØ! [Ò0Ð0Ð0ô Ð-Ó.ˆ
Ø×"Ò"Ð"Ð"Ø'×3Ñ3°CÀDÐ3ÓIÐØ!×*Ò*Ð*Ð*ô ˜Ó(ˆÜ�]‰]œ9Ð,EÔFñ 	6Ø×Ñ °ÐÔ5÷	6÷ 	6ñ 	6ús   ÂB1Â1B:c                 ó¤   — t        dd«      }|j                  «       }||k(  sJ ‚t        d«      }|j                  «       }t        d«      }||k(  sJ ‚y )Nr   z(MULTILINESTRING ((1 1, 0 0), (1 1, 1 2))z(MULTILINESTRING ((1 1, 1 2), (0 0, 1 1)))r   Ú	normalizer
   )r'   r(   Úresultr?   r*   s        r,   Útest_normalizez!OperationsTestCase.test_normalizet   sU   € Ü�a˜“ˆØ—‘Ó"ˆØ˜ŠÐˆäÐ?Ó@ˆØ—‘Ó!ˆÜÐCÓDˆØ˜Ò!Ð!Ñ!r.   N)Ú__name__Ú
__module__Ú__qualname__r-   r:   r@   rK   rO   © r.   r,   r   r      s   „ ò<1ò|Jò 7ò6ó$"r.   r   )Úunittestr   r7   r   Úshapely.errorsr   Úshapely.geometryr   r   r   r   r	   Úshapely.wktr
   ÚTestCaser   rS   r.   r,   ú<module>rY      s1   ðÛ ã ã Ý  Ý +ß WÕ WÝ ôp"˜×*Ñ*õ p"r.   