o
    Îj<  ã                   @   s°   d Z ddlZddlmZ ddlmZmZ dd„ Z	dd„ Z
d	d
„ Zdd„ Zdd„ Zdd„ Zdd„ Zejjdddd„ ƒZejjdddd„ ƒZdd„ Zdd„ Zdd„ Zd d!„ ZdS )"z
Tests for GEOSClipByRect based on unit tests from libgeos.

There are some expected differences due to Shapely's handling of empty
geometries.
é    N)Úclip_by_rect)ÚdumpsÚloadsc                  C   ó0   t dƒ} t| ddddƒ}t|dddksJ ‚dS )zPoint outsidezPOINT (0 0)é
   é   r   ©Zrounding_precisionúGEOMETRYCOLLECTION EMPTYN©Úload_wktr   Údump_wkt©Úgeom1Úgeom2© r   úg/var/www/html/Deteccion_Ine/venv/lib/python3.10/site-packages/shapely/tests/legacy/test_clip_by_rect.pyÚtest_point_outside   ó   r   c                  C   ó0   t dƒ} t| ddddƒ}t|dddksJ ‚dS )zPoint insidezPOINT (15 15)r   r   r   r   Nr
   r   r   r   r   Útest_point_inside   r   r   c                  C   r   )zPoint on boundaryzPOINT (15 10)r   r   r   r   r	   Nr
   r   r   r   r   Útest_point_on_boundary   r   r   c                  C   r   )zLine outsidezLINESTRING (0 0, -5 5)r   r   r   r   r	   Nr
   r   r   r   r   Útest_line_outside#   r   r   c                  C   r   )zLine insidezLINESTRING (15 15, 16 15)r   r   r   r   Nr
   r   r   r   r   Útest_line_inside*   r   r   c                  C   r   )zLine on boundaryz LINESTRING (10 15, 10 10, 15 10)r   r   r   r   r	   Nr
   r   r   r   r   Útest_line_on_boundary1   r   r   c                  C   r   )zLine splitting rectanglezLINESTRING (10 5, 25 20)r   r   r   r   zLINESTRING (15 10, 20 15)Nr
   r   r   r   r   Útest_line_splitting_rectangle8   r   r   zTODO issue to CCW)Úreasonc                  C   r   )z/Polygon shell (CCW) fully on rectangle boundaryú-POLYGON ((10 10, 20 10, 20 20, 10 20, 10 10))r   r   r   r   Nr
   r   r   r   r   Ú2test_polygon_shell_ccw_fully_on_rectangle_boundary?   ó
   
ÿr   zTODO issue to CWc                  C   r   )z.Polygon shell (CW) fully on rectangle boundaryz-POLYGON ((10 10, 10 20, 20 20, 20 10, 10 10))r   r   r   r   r   Nr
   r   r   r   r   Ú1test_polygon_shell_cc_fully_on_rectangle_boundaryJ   r   r   c                  C   r   )z.Polygon hole (CCW) fully on rectangle boundaryúLPOLYGON ((0 0, 0 30, 30 30, 30 0, 0 0), (10 10, 20 10, 20 20, 10 20, 10 10))r   r   r   r   r	   Nr
   r   r   r   r   Ú,polygon_hole_ccw_fully_on_rectangle_boundaryU   ó
   ÿr!   c                  C   r   )z-Polygon hole (CW) fully on rectangle boundaryzLPOLYGON ((0 0, 0 30, 30 30, 30 0, 0 0), (10 10, 10 20, 20 20, 20 10, 10 10))r   r   r   r   r	   Nr
   r   r   r   r   Ú+polygon_hole_cw_fully_on_rectangle_boundary^   r"   r#   c                  C   s4   d} t | ƒ}t|ddddƒ}t|dd| ksJ ‚dS )zPolygon fully within rectanglezLPOLYGON ((1 1, 1 30, 30 30, 30 1, 1 1), (10 10, 20 10, 20 20, 10 20, 10 10))r   é(   r   Nr
   ©Zwktr   r   r   r   r   Úpolygon_fully_within_rectangleg   s   r&   c                  C   s4   d} t | ƒ}t|ddddƒ}t|dddksJ ‚dS )zPolygon overlapping rectangler    é   é   r   r   z5POLYGON ((5 5, 5 15, 10 15, 10 10, 15 10, 15 5, 5 5))Nr
   r%   r   r   r   Úpolygon_overlapping_rectangleo   s   
ÿr)   )Ú__doc__ZpytestZshapely.opsr   Zshapely.wktr   r   r   r   r   r   r   r   r   r   r   ÚmarkZxfailr   r   r!   r#   r&   r)   r   r   r   r   Ú<module>   s&    



		