a
    J5d:	                     @   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   a/var/www/html/django/DPS/env/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,   (
-