o
    Jfb                     @   sB   d dl Z d dlZd dlZd dlmZmZmZ G dd de jZdS )    N)
LineStringMultiLineStringPointc                   @   sl   e Zd Zdd Zdd Zdd Zdd Zd	d
 Zdd Zdd Z	dd Z
dd Zdd Zdd Zdd ZdS )LinearReferencingTestCasec                 C   sJ   t dd| _tddg| _tddg| _tt| jjt| jjg| _d S )N   )r   r   )   r   )   r   )r      )	r   pointr   line1line2r   listcoords	multilineself r   x/home/deployuser/azure_apps/autowriter/venv/lib/python3.10/site-packages/shapely/tests/legacy/test_linear_referencing.pysetUp
   s   
zLinearReferencingTestCase.setUpc                 C   4   | j | jdksJ | j j| jdddksJ d S N      ?T
normalized      ?)r   projectr
   r   r   r   r   test_line1_project      z,LinearReferencingTestCase.test_line1_projectc                 C   r   r   )r   line_locate_pointr
   r   r   r   r   test_alias_project   r   z,LinearReferencingTestCase.test_alias_projectc                 C   s<   | j | jdksJ | j j| jddtddksJ d S )Nr   Tr   gQUUU?   )r   r   r
   pytestapproxr   r   r   r   test_line2_project   s   z,LinearReferencingTestCase.test_line2_projectc                 C   r   )Nr   Tr   g      ?)r   r   r
   r   r   r   r   test_multiline_project    r   z0LinearReferencingTestCase.test_multiline_projectc                 C   sJ   t jtjdd | jd| j W d    d S 1 sw   Y  d S )NIllegalArgumentException)matchr   )r!   raisesshapelyGEOSExceptionr
   bufferr   r   r   r   r   test_not_supported_project$   s   "z4LinearReferencingTestCase.test_not_supported_projectc                 C   s   | j tdddksJ d S )Ni        )r   r   r   r   r   r   r   test_not_on_line_project(   s   z2LinearReferencingTestCase.test_not_on_line_projectc                 C   |   | j dtddsJ | j dtddsJ | j jdddtdds,J | j jdddtdds<J d S 	Nr   r,   g      g      ?Tr   r   r   r   interpolateequalsr   r   r   r   r   test_line1_interpolate,   s    $z0LinearReferencingTestCase.test_line1_interpolatec                 C   r.   r/   )r   line_interpolate_pointr2   r   r   r   r   r   test_alias_interpolate2   s   z0LinearReferencingTestCase.test_alias_interpolatec                 C   s@   | j dtddsJ | j jdddtddsJ d S )Nr         @Tr   r   )r   r1   r2   r   r   r   r   r   test_line2_interpolate<      $z0LinearReferencingTestCase.test_line2_interpolatec                 C   s@   | j dtddsJ | j jdddtddsJ d S )Nr   r   Tr   r6          @)r   r1   r2   r   r   r   r   r   test_multiline_interpolate@   r8   z4LinearReferencingTestCase.test_multiline_interpolatec                 C   s<   | j dtddsJ | j dtddsJ d S )Nir,   i  r9   r0   r   r   r   r   test_line_ends_interpolateD   s    z4LinearReferencingTestCase.test_line_ends_interpolateN)__name__
__module____qualname__r   r   r   r#   r$   r+   r-   r3   r5   r7   r:   r;   r   r   r   r   r   	   s    
r   )	unittestr!   r(   shapely.geometryr   r   r   TestCaser   r   r   r   r   <module>   s
    