o
    Jf:	                     @   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   q/home/deployuser/azure_apps/autowriter/venv/lib/python3.10/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   >   t t t }W d    n1 sw   Y  |jsJ d S r   )pytestwarnsFutureWarningr   is_emptyselfgr   r   r   test_empty_class      zTestEmptiness.test_empty_classc                 C   r   r   )r   r   r   r   r   r   r   r   r   test_empty_base   r   zTestEmptiness.test_empty_basec                 C      t  jsJ d S r   )r   r   r   r   r   r   test_empty_point#      zTestEmptiness.test_empty_pointc                 C   r   r   )r   r   r    r   r   r   test_empty_multipoint&   r"   z#TestEmptiness.test_empty_multipointc                 C   r   r   )r   r   r    r   r   r   test_empty_geometry_collection)   r"   z,TestEmptiness.test_empty_geometry_collectionc                 C   <   t  jsJ t d jsJ t g jsJ t t jsJ d S r   )r   r   r   r    r   r   r   test_empty_linestring,      z#TestEmptiness.test_empty_linestringc                 C      t g jsJ d S r   )r   r   r    r   r   r   test_empty_multilinestring2      z(TestEmptiness.test_empty_multilinestringc                 C   r%   r   )r	   r   r   r    r   r   r   test_empty_polygon5   r'   z TestEmptiness.test_empty_polygonc                 C   r(   r   )r   r   r    r   r   r   test_empty_multipolygon;   r*   z%TestEmptiness.test_empty_multipolygonc                 C   r%   r   )r   r   r   r    r   r   r   test_empty_linear_ring>   r'   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)geomsarrr   r   r   test_numpy_object_arrayE   s   r7   c                  C   s$   t  } t| }t|}|jsJ d S r   )r   r
   r   r   )empty_mp
empty_json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   s    z-test_empty_geometry_bounds.<locals>.<genexpr>N)lenboundsall)r<   r   r   r   test_empty_geometry_boundsR   s   rF   )r>   numpyr2   r   shapelyr   r   r   r   r   r   r   r	   shapely.geometryr
   r   shapely.geometry.baser   r   r   r   r7   r;   markparametrizerF   r   r   r   r   <module>   s.    (
-