a
    ßÁd:	  ã                   @   sÀ   d dl Z d dlZd dlZd dlmZmZmZmZm	Z	m
Z
mZmZ d dlmZmZ d dlmZmZ dd„ ZG dd„ dƒZd	d
„ Zdd„ Zej deƒ eƒ eƒ e	ƒ eƒ e
ƒ eƒ eƒ g¡dd„ ƒZdS )é    N)ÚGeometryCollectionÚ
LinearRingÚ
LineStringÚMultiLineStringÚ
MultiPointÚMultiPolygonÚPointÚPolygon)ÚmappingÚshape)ÚBaseGeometryÚEmptyGeometryc                   C   s   t g ƒS ©N)Úiter© r   r   úh/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/shapely/tests/geometry/test_emptiness.pyÚempty_generator   s    r   c                   @   s\   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S )ÚTestEmptinessc                 C   s>   t  t¡� tƒ }W d   ƒ n1 s&0    Y  |js:J ‚d S r   )ÚpytestÚwarnsÚFutureWarningr   Úis_empty©ÚselfÚgr   r   r   Útest_empty_class   s    $zTestEmptiness.test_empty_classc                 C   s>   t  t¡� tƒ }W d   ƒ n1 s&0    Y  |js:J ‚d S r   )r   r   r   r   r   r   r   r   r   Útest_empty_base   s    $zTestEmptiness.test_empty_basec                 C   s   t ƒ jsJ ‚d S r   )r   r   ©r   r   r   r   Útest_empty_point#   s    zTestEmptiness.test_empty_pointc                 C   s   t ƒ jsJ ‚d S r   )r   r   r   r   r   r   Útest_empty_multipoint&   s    z#TestEmptiness.test_empty_multipointc                 C   s   t ƒ jsJ ‚d S r   )r   r   r   r   r   r   Útest_empty_geometry_collection)   s    z,TestEmptiness.test_empty_geometry_collectionc                 C   s<   t ƒ jsJ ‚t d ƒjsJ ‚t g ƒjs(J ‚t tƒ ƒjs8J ‚d S r   )r   r   r   r   r   r   r   Útest_empty_linestring,   s    z#TestEmptiness.test_empty_linestringc                 C   s   t g ƒjsJ ‚d S r   )r   r   r   r   r   r   Útest_empty_multilinestring2   s    z(TestEmptiness.test_empty_multilinestringc                 C   s<   t ƒ jsJ ‚t d ƒjsJ ‚t g ƒjs(J ‚t tƒ ƒjs8J ‚d S r   )r	   r   r   r   r   r   r   Útest_empty_polygon5   s    z TestEmptiness.test_empty_polygonc                 C   s   t g ƒjsJ ‚d S r   )r   r   r   r   r   r   Útest_empty_multipolygon;   s    z%TestEmptiness.test_empty_multipolygonc                 C   s<   t ƒ jsJ ‚t d ƒjsJ ‚t g ƒjs(J ‚t tƒ ƒjs8J ‚d S r   )r   r   r   r   r   r   r   Útest_empty_linear_ring>   s    z$TestEmptiness.test_empty_linear_ringN)Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r    r!   r"   r#   r$   r%   r   r   r   r   r      s   r   c                  C   s(   t ƒ tƒ g} t dt¡}| |d d …< d S )Né   )r   r   ÚnpÚemptyÚobject)ZgeomsZarrr   r   r   Útest_numpy_object_arrayE   s    r-   c                  C   s$   t ƒ } t| ƒ}t|ƒ}|js J ‚d S r   )r   r
   r   r   )Zempty_mpZ
empty_jsonZempty_shaper   r   r   Útest_shape_emptyK   s    r.   Úgeomc                 C   s.   t | jƒdksJ ‚tdd„ | jD ƒƒs*J ‚dS )z2The bounds of an empty geometry is a tuple of NaNsé   c                 s   s   | ]}t  |¡V  qd S r   )ÚmathÚisnan)Ú.0Úvr   r   r   Ú	<genexpr>b   ó    z-test_empty_geometry_bounds.<locals>.<genexpr>N)ÚlenZboundsÚall)r/   r   r   r   Útest_empty_geometry_boundsR   s    r9   )r1   Únumpyr*   r   Zshapelyr   r   r   r   r   r   r   r	   Zshapely.geometryr
   r   Zshapely.geometry.baser   r   r   r   r-   r.   ÚmarkZparametrizer9   r   r   r   r   Ú<module>   s,   (
-øþ