
    hj                       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	 d dl
Z
d dl
m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 d dlmZ d dlmZmZ d dlmZmZmZ d d	l m!Z! d dl"Z"d d
l#m$Z$ d dl%m&Z&m'Z'm(Z( d dl)m*Z* d dl+m,Z,m-Z-m.Z. d Z/ G d d      Z0y)    N)	DataFrameIndex
MultiIndexSeriesconcat)wkt)
LinearRing
LineStringMultiLineString
MultiPointMultiPolygonPointPolygonbox)GeometryCollection)unary_union)GeoDataFrame	GeoSeries)GEOS_GE_312
HAS_PYPROJSHAPELY_GE_21)GeoPandasBase)assert_geodataframe_equal)assert_geoseries_equalgeom_almost_equalsgeom_equals)assert_array_equal)assert_frame_equalassert_index_equalassert_series_equalc                     t        j                  |       } t        j                  |      }| j                  |j                  k(  sJ t        | |g|i | y N)np
asanyarraydtyper   )abargskwargss       T/var/www/html/immo/lib/python3.12/site-packages/geopandas/tests/test_geom_methods.pyassert_array_dtype_equalr+   !   sH    
aA
aA77aggq!-d-f-    c                   <   e Zd Zd Zd ZddZd Zd Zd ZddZ	e
j                  j                  e d	
      d        Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Ze
j                  j                  e d	
      d        Zd Zd Zd Z d Z!d Z"d  Z#d! Z$e
j                  j                  e%jL                  d"k  d#
      d$        Z'd% Z(e
j                  j                  e d	
      d&        Z)d' Z*d( Z+d) Z,d* Z-d+ Z.d, Z/d- Z0d. Z1e
j                  j                  e d	
      d/        Z2d0 Z3e
j                  j                  e%jL                  d"k  d1
      d2        Z4d3 Z5d4 Z6d5 Z7d6 Z8d7 Z9d8 Z:d9 Z;d: Z<d; Z=d< Z>e
j                  j                  e?xr e@ d=
      d>        ZAe
j                  j                  e?xr e@ d=
      d?        ZBd@ ZCdA ZDdB ZEdC ZFdD ZGdE ZHe
j                  j                  e@ dF
      e
j                  j                  e%jL                  dGk  dH
      dI               ZIdJ ZJe
j                  j                  e@ dF
      dK        ZKdL ZLdM ZMdN ZNe
j                  j                  e d	
      dO        ZOdP ZPe
j                  j                  e@ dQ
      dR        ZQdS ZRe
j                  j                  dTdUdV eTdWdXgdXdYgg      fdZdV eUg d[      fdZd eV       fg      e
j                  j                  e@ dQ
      d\               ZWe
j                  j                  e@d]
      d^        ZXd_ ZYe
j                  j                  e%jL                  d"k  d#
      d`        ZZda Z[db Z\e
j                  j                  e%jL                  dck  dd
      de        Z]e
j                  j                  e%jL                  dck  dd
      e
j                  j                  dfg dgdhfg didjfg      dk               Z^dl Z_e
j                  j                  e@ dF
      dm        Z`dn Zado Zbdp Zcdq Zddr Zeds Zfdt Zgdu Zhdv Zidw Zjdx Zkdy Zle
j                  j                  e d	
      dz        Zmd{ Znd| Zod} Zpd~ Zqd Zrd Zsd Ztd Zud Zvd Zwd Zxd Zyd Zze
j                  j                  e d	
      d        Z{d Z|d Z}e
j                  j                  e?xr e@ d=
      d        Z~d Zd Zd Zd Ze
j                  j                  e@ dF
      d        Zd Zd Ze
j                  j                  dddg      d        Ze
j                  j                  dddg      d        Ze
j                  j                  dddg      d        Zd Zd Ze
j                  j                  dg d      d        Ze
j                  j                  dg d      d        Ze
j                  j                  dg d      d        Zd Zd Zd Zd Ze
j                  j                  dddg      d        Zd Zd Zd Ze
j                  j                  e@ dF
      d        Zd Zd Zd Zd Ze
j                  j                  e@ dF
      d        Ze
j                  j                  dg d      d        Zd Ze
j                  j                  dg d      d        Zd Zd Zd Zd Zd Ze
j                  j                  e%jL                  dck  dd
      e
j                  j                  d e eg d             e eg d            f e eVg d             e eVg d            fg      d               Zd Zd ZdÄ ZdĄ Zdń ZdƄ Ze
j                  j                  e%jL                  dck  dd
      dǄ        Ze
j                  j                  e%jL                  dck  dȬ
      dɄ        Ze
j                  j                  e%jL                  dk  dˬ
      d̄        Zd̈́ Zd΄ Zy)TestGeomMethodsc                    t        g d      | _        t        g d      | _        t        g d      | _        t        g d      | _        t        g d      | _        t        g d      | _        t        g d      | _        t        g d      | _        t        g d	      | _	        t        g d
      | _
        t        g d      | _        t        | j                  j                  | j                  j                  g      | _        t        dd      | _        t        ddd      | _        t#        | j                  | j                  | j                  | j                  | j                  | j                  d g      | _        t#        | j                  | j                  g      | _        t#        | j                  | j                  g      | _        t#        | j                  | j                  g      | _        t#        | j                  | j                  | j
                  g      | _        d| j*                  _        t#        | j                  | j                  g      | _        d| j0                  _        t#        | j                  | j                   g      | _        t#        | j                  | j                  t               g      | _        t#        | j                  d g      | _        | j&                  j9                         | _        ddg| j:                  _        | j(                  j9                         | _        ddg| j>                  _        t        ddd      | _         t        ddd      | _!        t#        | j@                  | jB                  gd      | _"        t        dd      | _#        t#        | j@                  | jB                  | jF                  gd      | _$        tK        jL                  d      | _'        t#        | j@                  | jB                  | jF                  | jN                  gd      | _(        tS        g d      | _*        tS        g d      | _+        t#        | jT                  | jV                  g      | _,        t#        | j                  | j                  g      | _-        t#        | j                  | j                  g      | _.        t#        | j                  | j                  g      | _/        t#        g       | _0        t#        d d g      | _1        t#        te        g       te        g       g      | _3        t               | _4        t#        | j$                  tk        dd            | _6        t#        | j                  | j                  g      | _7        tS        ddg      | _8        tS        d d!g      | _9        t#        | jp                  | jr                  g      | _:        tw        | j&                  d"d#gd$d%gd&      | _<        tw        | j&                  d'dgd(d)gd*      | _=        tw        | j*                  d'dgd(d)gd*      | _>        tw        | j,                  g d+g d,d*      | _?        t#        | j                  | j                   | jN                  | j                  | j                  | jh                  | jT                  g      | _@        t        j                  d-d-gd-d-gd.d.gd"d.gd"d"gd.d.gd"d"gd#d#gd/d/gd"d"gd.d.gd.d"gd"d"gg      | _C        t        j                  d-d-t        j                  gg d0d.d.t        j                  gd"d.t        j                  gd"d"t        j                  gd.d.t        j                  gg d1g d2g d3g d1d.d.t        j                  gd.d"t        j                  gd"d"t        j                  gg      | _E        t#        tk        d4      D cg c]  }| j                   c}      | _F        tS        g d5      | _G        tS        g d6      | _H        t#        | j                  g      | _I        t#        | j                  g      | _J        t#        tS        ddg      tS        dd g      tS        d dg      tS        dd!g      tS        d!dg      tS        d7d8g      tS        d9d:g      t        d;d;      gdtk        d<d=      >      | _K        tS        g d5      | _G        tS        g d6      | _H        t#        | j                  g      | _I        t#        | j                  g      | _J        t#        t        d?d@gd@dAgg      t        d?d@gdBdAgg      t               t        dd!gddCgg      t        d;d;      gdtk        d<dD      >      | _M        y c c}w )EN)r   r      r   r2   r2   r0   r3   r   r2      r      r   r:   r2   )r2   r2   r2   r8   r8   r8   r:   r:   r:   )r=   r<   r>   r0   r1   r3   r5   )r<   r=   r>      rA   rA   )r0   r9   r:   r:   r   r8   )r7   r9   rB   r8   r:   )r7   r7   r9   r9   ))      ?rE   )      ?rE   )rF   rF   )rE   rF      z	epsg:4326ABC&SR):_D@S>@YڂR ~:XD@.n<?@crs  zPOINT EMPTYr0   r5   r3   r2      indexr0   r3   r5   r1         ?       @geopandas)geometrycol0col1rA   randstring)r\   col3col4)rA   rG      )r_   r`   rZ         @              @)rd   rd   rd   )rX   rX   rX   )rY   rY   rY   )rf   rf   rf   r:   ))d   r   r0   )r   rg   )rG   rG   )rG   rg   )rg   rG   rh   )rc   rc   )      ?)ri   r8   r   r8   
   rR   rW   rC   r   rk   rG   rk   r      r9      )Nr   t1t2t3tztz1sqsqzt4t5t6inner_sqboundarynested_squaresr   p0p3dr   g0g1g2g3gzrR   g4g_3dnana_nonecopya1rW   a2esbsol	landmarkspt2dlandmarks_mixedr   loadspt_emptylandmarks_mixed_emptyr
   l1l2g5g6g7g8emptyall_noner   all_geometry_collection_empty
empty_polyrangeg9g10l3l4crossed_linesr   gdf1gdf2gdf3gdfzg11r#   arrayexpected_2dnanexpected_3dsquaresl5l6g12g13linesr   g14self_s     r*   setup_methodzTestGeomMethods.setup_method)   s   232323;<<=:;GH:;:;:;D
 &dgg&6&69O9O8PQ1+Aq>##

 TWWdgg./TWWdgg./TWWdgg./TWWdhh9:!TWWdgg./!tww12	TWWdggwy9: $''41'',,.c
'',,.c
7G47G4"DHHdhh#7[I(G,	($((DHHdii)HdS		-0%.XXtxxDMM:&
" 56=>TWWdgg./TWWdgg./TWWdgg./TWWdgg./r]
!4,/-6#%7%;<.
* ")DGG5A;7dggtww/0 ff-.ff-.&'9: !3*uh>OP
	 !1a&68:LM
	 !1a&68:LM
	 !)=VW
	 

 88c
c
c
c
c
c
c
c
c
c
c
c
c

" 88c266"c266"c266"c266"c266"c266"c266"c266"
" !58!<a$''!<=9:9:dggY'dggY'FF+,FF+,FF+,FF+,FF+,FF+,Ix01a	 2,

 9:9:dggY'dggY'&'!2Wg4F GH&'!2Wg4F GH!&&!1FF3C DEa 1+

3 "=s   7e(c                 8    t         }| j                  ||||       y)z,Tests for 'area', 'length', 'is_valid', etc.N)r    _test_unary)r   opexpectedr&   fcmps        r*   _test_unary_realz TestGeomMethods._test_unary_real   s    "Xq$/r,   Fc                 d    t        |t              rt        }nd }| j                  |||||       y )Nc                 *    | j                  |      sJ y r"   )equalsr&   r'   s     r*   r   z5TestGeomMethods._test_unary_topological.<locals>.fcmp   s    xx{"{r,   method)
isinstancer   r   r   )r   r   r   r&   r   r   s         r*   _test_unary_topologicalz'TestGeomMethods._test_unary_topological   s1    h.)D# 	Xq$v>r,   c           	          t        |t              rt        }nd }t        |t              rd}nd} | j                  |||||d|g|i | y)z?Tests for 'intersection', 'union', 'symmetric_difference', etc.c                      t        | |      sJ y r"   )r   r   s     r*   r   z6TestGeomMethods._test_binary_topological.<locals>.fcmp   s    "1a(((r,   TFN)r   r   r   _binary_op_test)	r   r   r   r&   r'   r(   r)   r   right_dfs	            r*   _test_binary_topologicalz(TestGeomMethods._test_binary_topological   sS    h.)D) a'HHR1atXWWPVWr,   c           	      H    t         } | j                  |||||ddg|i | y )NTF)r    r   )r   r   r   r&   r'   r(   r)   r   s           r*   _test_binary_realz!TestGeomMethods._test_binary_real   s-    "R1atUTTTVTr,   c                 2   d }
 t        ||      |g|i |	} |||       |r' |
|      } t        ||      |g|i |	} |||       |rJ |
|      } t        ||      |g|i |	} |||       |r  t        |      |g|i |	} |||       yyy)a^  
        This is a helper to call a function on GeoSeries and GeoDataFrame
        arguments. For example, 'intersection' is a member of both GeoSeries
        and GeoDataFrame and can take either GeoSeries or GeoDataFrame inputs.
        This function has the ability to test all four combinations of input
        types.

        Parameters
        ----------

        expected : str
            The operation to be tested. e.g., 'intersection'
        left: GeoSeries
        right: GeoSeries
        fcmp: function
            Called with the result of the operation and expected. It should
            assert if the result is incorrect
        left_df: bool
            If the left input should also be called with a GeoDataFrame
        right_df: bool
            Indicates whether the right input should be called with a
            GeoDataFrame

        c                     t        |       }t        j                  d | }t        |      }t	        | j
                  ||d| j                  | j                        S )N)r\   r^   col2rW   rR   )lenr`   ascii_lowercaser   r   valuesrW   rR   )snr^   r   s       r*   	_make_gdfz2TestGeomMethods._binary_op_test.<locals>._make_gdf  sO    AA))"1-D8DXXtTBggEE r,   N)getattr)r   r   r   leftrightr   left_dfr   r(   r)   r   resultgdf_left	gdf_rights                 r*   r   zTestGeomMethods._binary_op_test   s    8		 #r"5:4:6:VX H*WXr*5B4B6BF"!%(I&WT2&yB4B6BF".2.yJ4J6JVX&  r,   c                     |r t        ||             }nt        ||      } |||       | j                  j                  |      }|r t        ||             }nt        ||      } |||       y r"   )r   r   set_geometry)r   r   r   r&   r   r   r   gdfs           r*   r   zTestGeomMethods._test_unary1  sj    #WQ^%FQ^FVX ii$$Q'%WS"%'FS"%FVXr,   zpyproj not available)reasonc                    | j                   j                         j                  d d      }t        j                  t
              5  | j                  d| j                   | j                   |       d d d        y # 1 sw Y   y xY w)NT)allow_overrideintersection)r   r   set_crspytestwarnsUserWarningr   )r   	no_crs_g3s     r*   test_crs_warningz TestGeomMethods.test_crs_warningA  sd     GGLLN**4*E	\\+& 	W)).$''477IV	W 	W 	Ws   )A77B c                    t        j                  t        d      5  | j                  j	                  | j
                  d        d d d        t        j                  d      5 }| j                  j	                  | j
                  d       | j                  j	                  | j
                  d       t        |      dk(  sJ 	 d d d        y # 1 sw Y   xY w# 1 sw Y   y xY w)N:The indices of the left and right GeoSeries' are not equalmatchalignTrecordFr   )	r   r   r   r   r   r   warningscatch_warningsr   )r   r   s     r*   test_alignment_warningz&TestGeomMethods.test_alignment_warningH  s    \\N
 	6 GG   5		6 $$D1 	$VGG   5GG   6v;!###		$ 	$	6 	6	$ 	$s   (C"ACCC c                    | j                  d| j                  | j                  | j                         | j                  d| j                  | j                  | j
                  d       t        | j                  j                  | j                  d      dk(        sJ t        | j                  j                  | j                  d      dk(        sJ y )Nr   Tr   rU   Frq   )
r   rr   r   r   r   r   r   r   r   r   r   s    r*   test_intersectionz!TestGeomMethods.test_intersectionU  s    %%ndggtwwP%%DMM477DJJd 	& 	
 477''t'<ABBB477''u'=BCCCr,   c                      | j                   d| j                  | j                  g| j                  j                     | j                   d| j
                  | j                  g| j                  j                    y )Nclip_by_rect)r   r   r   rw   boundsr   rt   r   s    r*   test_clip_by_rectz!TestGeomMethods.test_clip_by_rect^  sd    %%%DGGTXX	
04	
 	&%%D>>	
JN''..	
r,   c                 <   | j                  d| j                  | j                  | j                         t	        | j
                  j                  | j                  d      dk(        sJ t	        | j
                  j                  | j                  d      dk(        sJ y )NunionTr   rU   Frq   )r   rw   r   r   r   r   r   r   r   s    r*   test_union_seriesz!TestGeomMethods.test_union_seriesg  sr    %%gtwwI477===5:;;;477===6!;<<<r,   c                 h    | j                  d| j                  | j                  | j                         y )Nr   )r   rw   r   rs   r   s    r*   test_union_polygonz"TestGeomMethods.test_union_polygonm  s"    %%gtwwIr,   c                 <   | j                  d| j                  | j                  | j                         t	        | j
                  j                  | j                  d      dk(        sJ t	        | j
                  j                  | j                  d      dk(        sJ y )Nsymmetric_differenceTr   rU   Frq   )r   rw   r   r   r   r   r  r   r   s    r*    test_symmetric_difference_seriesz0TestGeomMethods.test_symmetric_difference_seriesp  s|    %%&<dggtwwPTPWPWX477//t/DIJJJ477//u/EJKKKr,   c                     t        t               | j                  g| j                  j                        }| j                  d|| j                  | j                         y )NrQ   r  )r   r   rw   r   rR   r   rr   r   r   s     r*   test_symmetric_difference_polyz.TestGeomMethods.test_symmetric_difference_polyv  sB    02DGG<$''++N%%"Hdggtww	
r,   c                 f   t        t               | j                  g      }| j                  d|| j                  | j
                         t        | j                  j                  | j                  d      dk(        sJ t        | j                  j                  | j                  d      dk(        sJ y )N
differenceTr   rU   Frq   )
r   r   rs   r   r   r   r   r   r
  r   r  s     r*   test_difference_seriesz&TestGeomMethods.test_difference_series|  s    02DGG<=%%lHdggtwwO477%%dggT%:a?@@@477%%dggU%;q@AAAr,   c                     t        | j                  | j                  g      }| j                  d|| j                  | j                         y )Nr
  )r   rr   r   r   rs   r  s     r*   test_difference_polyz$TestGeomMethods.test_difference_poly  s5    dggtww/0%%lHdggtwwOr,   c                    t        t        ddg      d g      }t        || j                  j	                  | j
                               t        t        ddg      t        ddg      g      }t        || j                  j	                  | j                               t        t        ddg      t        ddg      g      }| j                  d d d   }t        || j                  j	                  |d             y )Nr3   rh   r7   ri   ri   rj   Fr   )	r   r
   r+   r   shortest_liner   r   r   r   )r   r   crossed_lines_invs      r*   test_shortest_linez"TestGeomMethods.test_shortest_line  s    j&&)9:DAB 4<<+E+Edgg+NOFF+,FF+,
 	!477+@+@+IJZ01:z:>V3WX
 !..tt4 d((667HPU6V	
r,   c           	      :   t        t        g d      d g      }t        || j                  j	                  t        dd      d             t        t        d      t        g d      g      }t        || j                  j	                  | j                  d             y )	N)r   ri   r1   r3   r  r   ri   r2   	tolerancerh   )rC   r0   r9   rB   rC   r:   )r   r   r+   r   snapr   r   r   r  s     r*   	test_snapzTestGeomMethods.test_snap  s    g&JKTRS dll''a'C	
 f@A
 	!477<<1<+MNr,   c                 d   t        ddg      }t        ddg      }t        t               g      }t        |g      j                  |      }t	        ||       t        |g      j                  t        |g            }t	        ||       t        t               g      j
                  }t	        ||       y )Nr0   r3   r8   r8   rB   )r
   r   r   r   r   convex_hull)r   r   r   r   r   s        r*   test_geo_op_empty_resultz(TestGeomMethods.test_geo_op_empty_result  s    ()()0234B4--b1vx0B4--io>vx0.012>>vx0r,   c                     t        g d      }t        g d      }t        ||g| j                  j                  | j                  j                        }| j                  d|| j                         y )N)r0   r1   r3   r0   )r0   r1   r3   r5   r0   r   r}   )r
   r   r   rW   rR   r   )r   r   r   r   s       r*   test_boundaryzTestGeomMethods.test_boundary  sP    89@Ab"XTWW]]L$$Z477Cr,   c                 l   t        t        j                  ddg      | j                  j                        }| j                  d|| j                         t        t        j                  dt        j                  g      | j                  j                        }| j                  d|| j                         y )Nri   rX   rV   area)r   r#   r   r   rW   r   r   r   r  s     r*   	test_areazTestGeomMethods.test_area  sv    "((C:.dggmmDfh8"((C=19K9KLfh=r,   c                     t        j                  t        d      5  | j                  j                   d d d        y # 1 sw Y   y xY wNGeometry is in a geographic CRSr   )r   r   r   r   r   r   s    r*   test_area_crs_warnz"TestGeomMethods.test_area_crs_warn  s1    \\+-NO 	GGLL	 	 		   <Ac                 $   t        ddgddgddgddgd| j                  j                  g d      }| j                  j                  }t	        ||       | j
                  j                  | j                        }|j                  }t	        ||       y )Nre   rX   minxminymaxxmaxy)rW   columns)r   r   rW   r   r   r   r   )r   r   r   r   s       r*   test_boundszTestGeomMethods.test_bounds  s    c
c
c
c
	 ''--4	
 8V,ii$$TWW-8V,r,   c                 ~    t        g       }|j                  }t        g d|j                  d      }t	        ||       y )Nr(  float64)r-  rW   r%   )r   r   r   rW   r   )r   r   r   r   s       r*   test_bounds_emptyz!TestGeomMethods.test_bounds_empty  s7     bM4AGG9
 	68,r,   c                     | j                   }t        g d      }t        ||g      }t        ||g      }| j	                  d||d       t        |d g      }| j	                  d||d       t        d d g      }|j                         j                  t        j                               sJ |j                  d      j                  |      sJ t        r+t        r$|j                  d      j                  |      sJ y y y )Nr6   	union_allTr   coveragedisjoint_subset)rr   r   r   r   r   r3  r   shapelyr   r   r   )r   p1p2r   gr   r   s          r*   test_union_allzTestGeomMethods.test_union_all  s    WW-.Bx(r2h$$[(Ad$KDz"$$["b$Fd|$||~$$W%?%?%ABBB{{*{-44X>>>=;;&7;8??III );r,   c                     | j                   }t        g d      }t        ||g      }t        j                  t
        d      5  |j                  }d d d        |j                         k(  sJ y # 1 sw Y   xY w)Nr6   z)The 'unary_union' attribute is deprecatedr   )rr   r   r   r   r   DeprecationWarningr   r3  )r   r7  r8  r9  r   s        r*   test_unary_union_deprecatedz+TestGeomMethods.test_unary_union_deprecated  sl    WW-.r2h\\&Q
 	# ]]F	# &&&		# 	#s   A--A6c           
         t        g d      }t        t        dddd      t        dddd      t        dddd      g      }|j                         j	                  |      sJ t        t        dddd      d g      }|j                         j	                  |d         sJ t        d d g      }|j                         j	                  t        j                               sJ y )N)r3   )r2         ?)r?  r?  )r?  r2   r3   r   r8   r2   r:   r?  )r   r   r   intersection_allr   r6  r   )r   r   r9  r   r   s        r*   test_intersection_allz%TestGeomMethods.test_intersection_all  s    KLs1aAAq!QQ39LMN!!#**8444Aq!Q./""$++BqE222d|$""$++G,F,F,HIIIr,   c                 >   g d}t        || j                  j                  | j                               g d}t        || j                  j                  | j                  d             g d}t        || j                  j                  | j                  d             y )N)TFTFFFFFTTTTTFFTr   FFTFFFFF)r+   r   containsrr   r   r  s     r*   test_containszTestGeomMethods.test_contains  sr    B 477+;+;DGG+DEF 477+;+;DGG4+;+PQC 477+;+;DGG5+;+QRr,   c           	      >   g d}t        || j                  j                  t        dd                   g d}t        || j                  j                  | j                  d             g d}t        || j                  j                  | j                  d             y )NrD  rE   )FFFFFTFFTr   F)r+   r   contains_properlyr   r   r  s     r*   test_contains_properlyz&TestGeomMethods.test_contains_properly  s    C 477+D+DU4QUEV+WXJ dgg//t/D	
 D dgg//u/E	
r,   )r:   rk   r   zrequires GEOS>=3.10c                 D   g d}t        || j                  j                  | j                  d             g d}t        || j                  j                  | j                  dd             g d}t        || j                  j                  | j                  dd             y )	N)TTTFTTFrc   rC  r2   Tr   TTTTFFFF)r+   r   dwithinr   r   r  s     r*   test_dwithinzTestGeomMethods.test_dwithin(  sp    ? 477??477A+FGF 477??477AT?+RS@ 477??477AU?+STr,   c                    t        t        j                  dt        j                  d      z   dg      | j                  j
                        }| j                  d|| j                         t        t        j                  dt        j                  d      z   t        j                  g      | j                  j
                        }| j                  d|| j                         y )Nr8   rA   rV   length)	r   r#   r   sqrtr   rW   r   r   r   r  s     r*   test_lengthzTestGeomMethods.test_length2  s    "((A
NA#67tww}}Mh$'':"((A
NBFF#;<DLLDVDVWh$,,?r,   c                     t        j                  t        d      5  | j                  j                   d d d        y # 1 sw Y   y xY wr#  )r   r   r   r   rO  r   s    r*   test_length_crs_warnz$TestGeomMethods.test_length_crs_warn9  s1    \\+-NO 	GGNN	 	 	r&  c                 t   t        t        j                  ddg      | j                  j                        }t        | j                  j                         |d       t        t        j                  ddg      | j                  j                        }t        | j                  j                         |d       y )NrA   rG   rV   Fcheck_dtyper   )r   r#   r   r   rW   r    count_coordinatesr   r  s     r*   test_count_coordinatesz&TestGeomMethods.test_count_coordinates>  s{    "((Aq6*$''--@DGG557uU"((Aq6*$,,2D2DELL**,hE	
r,   c           	          t        t        j                  g d            }t        t	        g d      t        ddg      t        g d      t        dd      d g      }t        |j                         |d       y )	N)rA   r8   r2   r2   r   )r0   r3   r2   rj   r5   )r0   r3   ))rj   r   r1   )r0   r3   rZ  r   FrU  )
r   r#   r   r   r   r   r
   r   r    count_geometriesr   r   r   s      r*   test_count_geometriesz%TestGeomMethods.test_count_geometriesG  sh    "((?34<=!13D EF45a
 	A..0(Nr,   c           	          t        t        j                  g d            }t        t	        g dg dg      t	        g dg dg dg      t        dd      d g      }t        |j                         |d	       y )
N)r2   r8   r   r   )r0   r   rG   rh   rG   r   )r3   )r2   rA   rA   rA   rA   r2   )r3   r2   r8   r  r8   r2   )r:   r8   rB   rA   r:   rA   r8   r   r2   FrU  )r   r#   r   r   r   r   r    count_interior_ringsr\  s      r*   test_count_interior_ringsz)TestGeomMethods.test_count_interior_ringsT  sr    "((<01456 488 a
" 	A224hERr,   c                    g d}t        || j                  j                  | j                               ddg}t        || j                  j                  | j
                               dgdz  }t        || j                  j                  | j                  d             dgdz  }t        || j                  j                  | j                  d             y )N)FFFFFFFFTrU   r   rq   )r+   r   crossesrr   r   r   r   r  s     r*   test_crosseszTestGeomMethods.test_crossesi  s    D 477??477+CD4= 4+=+=+E+Edgg+NO7Q; 477??477$?+OP7Q; 477??477%?+PQr,   c                 B   g d}t        || j                  j                  | j                               dgdz  }t        || j                  j                  | j                  d             g d}t        || j                  j                  | j                  d             y )N)FFFFFTFFrU   Tr   )FFFFTFF)r+   r   disjointrr   r   r  s     r*   test_disjointzTestGeomMethods.test_disjointv  sx    C 477+;+;DGG+DE7Q; 477+;+;DGG4+;+PQC 477+;+;DGG5+;+QRr,   c                    t        g d| j                  j                        }t        || j                  j	                  | j
                               t        dd g| j                  j                        }t        || j                  j	                  | j                               t        g dt        d            }t        || j                  j	                  | j                  d             t        g d| j                  j                        }t        || j                  j	                  | j                  d	             y )
N)	212101212rq  	212FF1FF2	2FFF1FFF2	FF2F112F2	FF0FFF212NrV   ru  )Nrs  rs  rs  rs  	0FFFFFFF2NNrU   Tr   )	FF2F11212	2FF11F212rr  	FF2F1F212	FF2FF10F2NNF)
r   r   rW   r    relater|   r   r   r   r   r  s     r*   test_relatezTestGeomMethods.test_relate  s     ''--
 	HdggnnT]]&CD;-TWW]]CHdggnnT\\&BC	 (
 	HdggnnTWWDn&IJ ''--
 	HdggnnTWWEn&JKr,   c           	      X   t        dgdz  dgdz  z   | j                  j                  t              }t	        || j                  j                  | j                  d             t        ddg| j                  j                  t              }t	        || j                  j                  | j                  d             t        dgdgdz  z   ddgz   t        d	      t              }t        j                  t        d
      5  t	        || j                  j                  | j                  dd              d d d        t        dgdgdz  z   dgdz  z   | j                  j                  t              }t	        || j                  j                  | j                  dd             y # 1 sw Y   qxY w)NTrA   Fr:   )rW   r%   z	2********z	FF0******rG   rU   z!The indices of the left and rightr   z	T********r   r8   )r   r   rW   boolr+   relate_patternr|   r   r   r   r   r   r   r   r  s     r*   test_relate_patternz#TestGeomMethods.test_relate_pattern  s_   4&1*w{2$''--tT dgg,,T]]KH	
 4-tww}}DI dgg,,T\\;G	
 Gtfqj E5>1q
 \\+-PQ 	$$''00+T0R	 Gtfqj E7Q;.dggmm4
 	!dgg,,TWWk,O	
	 	s   =3F  F)c                    t        t        j                  t        j                  d      t        j                  g      | j
                  j                        }t        || j
                  j                  | j                               t        t        j                  t        j                  d      t        j                  g      | j                  j                        }t        || j                  j                  | j
                               t        t        j                  t        j                  dddddt        j                  t        j                  g      t        d            }t        || j                  j                  | j                  d             | j                  j                  d   j                  | j                  j                  d         }t        t        j                  dddd|t        j                  t        j                  g      | j                  j                        }t        || j                  j                  | j                  d             y )N    r   rU   Tr   rA   F)r   r#   r   rP  r   r   rW   r+   distancer   r   r   r   r   iloc)r   r   vals      r*   test_distancezTestGeomMethods.test_distance  sy   HHbgg9:BFFCDdllFXFX
 	!4<<+@+@+IJ"((BGGK$8"&&#ABDGGMMR 477+;+;DLL+IJ"((BFFAq!Q266266#JKUSTXV 477+;+;DGG4+;+PQggll1o&&tww||A7"((Aq!QRVVRVV#DEtww}}U 477+;+;DGG5+;+QRr,   c                     t        j                  t        d      5  | j                  j	                  | j
                         d d d        y # 1 sw Y   y xY wr#  )r   r   r   r   r  r   r   s    r*   test_distance_crs_warningz)TestGeomMethods.test_distance_crs_warning  s<    \\+-NO 	&GGTWW%	& 	& 	&s   &AAc                    t        t        j                  t        j                  d      t        j                  g      | j
                  j                        }t        || j
                  j                  | j                               t        t        j                  t        j                  d      t        j                  g      | j
                  j                        }t        || j
                  j                  | j                               t        t        j                  t        j                  dddddt        j                  t        j                  g      t        d            }t        || j                  j                  | j                  d             | j                  j                  d   j                  | j                  j                  d         }| j                  j                  d   j                  | j                  j                  d         }| j                  j                  d   j                  | j                  j                  d         }t        t        j                  |||||t        j                  t        j                  g      | j                  j                        }t        || j                  j                  | j                  d             t        t        j                  d	g      | j                  j                        }t        || j                  j                  | j                  d
             y )N2   r   rU   Tr   r8   rA   Fg     @J@rE   densify)r   r#   r   rP  r   r   rW   r+   hausdorff_distancer   r   r   r   r  r   r   )r   r   val_1val_2val_3s        r*   test_hausdorff_distancez'TestGeomMethods.test_hausdorff_distance  s   "((BGGK$8"&&#ABDLLDVDVW 4<<+J+J477+ST"((BGGK$8"&&#ABDLLDVDVW 4<<+J+J477+ST"((BFFAq!Q266266#JKUSTXV dgg000E	
 Q22477<<?CQ22477<<?CQ22477<<?CHHeUE5%HI477==
 	!dgg000F	
 "((D6*DHHNN; dhh11$((D1I	
r,   zbuggy with GEOS<3.10c                    t        t        j                  t        j                  d      t        j                  g      | j
                  j                        }t        || j
                  j                  | j                               t        t        j                  t        j                  dddddt        j                  t        j                  g      t        d            }t        || j                  j                  | j                  d             d}t        j                  d      dz  }t        j                  d      dz  }t        j                  d      dz  d	z  }t        t        j                  |||||t        j                  t        j                  g      | j                  j                        }t        || j                  j                  | j                  d
             t        t        j                  t        j                  d      g      | j                  j                        }t        || j                  j                  | j                  d             y )Nr  r   rU   Tr   rX   r8   rA   rk   FiQJ  rE   r  )r   r#   r   rP  r   r   rW   r+   frechet_distancer   r   r   r   r   r   )r   r   r  r  r  val_4s         r*   test_frechet_distancez%TestGeomMethods.test_frechet_distance  s   
 "((BGGK$8"&&#ABDLLDVDVW 4<<+H+H+QR"((BFFAq!Q266266#JKUSTXV dgg..twwd.C	

 
Q
Qa2%HHeUE5%HI477==
 	!dgg..twwe.D	
 "((BGG,C$D#EFW dhh//$/G	
r,   c                 6   g d}t        || j                  j                  | j                               ddg}t        || j                  j                  | j
                               t        j                  g t              }t        || j                  j                  | j                               t        j                  g t              }t        || j                  j                  | j                               dgdz  }t        || j                  j                  | j                               g d}t        || j                  j                  | j                  d             g d}t        || j                  j                  | j                  d             y )	NTTTTTFFTF)r%   rq   rC  r   rK  )r+   r   
intersectsrr   r   rs   r#   r   r~  r   r   r   r  s     r*   test_intersectszTestGeomMethods.test_intersects  s   ? 477+=+=dgg+FG%= 4<<+B+B477+KL88Bd+ 4::+@+@+IJ88Bd+ 4::+@+@+QR7Q; 477+=+=doo+NOF 477+=+=dggT+=+RS@ 477+=+=dggU+=+STr,   c                    g d}t        || j                  j                  | j                               ddg}t        || j                  j                  | j
                               dgdz  }t        || j                  j                  | j                  d             dgdz  }t        || j                  j                  | j                  d             y )N)TTFFFFFFrU   Tr   rq   )r+   r   overlapsr|   r   rr   r   r  s     r*   test_overlapszTestGeomMethods.test_overlaps.  s    B 477+;+;DMM+JK5> 477+;+;DGG+DE7Q; 477+;+;DGG4+;+PQ7Q; 477+;+;DGG5+;+QRr,   c                 B   g d}t        || j                  j                  | j                               dgdz  }t        || j                  j                  | j                  d             g d}t        || j                  j                  | j                  d             y )NFTFFFFFFrU   Tr   )TFFTFFF)r+   r   touchesrr   r   r  s     r*   test_toucheszTestGeomMethods.test_touches;  sp    C 477??477+CD7Q; 477??477$?+OPB 477??477%?+PQr,   c                    g d}t        || j                  j                  | j                               g d}t        || j                  j                  | j                               g d}t        || j                  j                  | j
                  d             g d}t        || j                  j                  | j
                  d             y )N)TFFFFFFr  rC  Tr   r  F)r+   r   withinrr   rw   r   r  s     r*   test_withinzTestGeomMethods.test_withinE  s    C 477>>$''+BC? 477>>$''+BCF 477>>$''>+NOC 477>>$''>+OPr,   c                     | j                   j                  | j                         }t        ddg      }t        ||       y )NT)r   coversr   r    r   resexps      r*   test_covers_itselfz"TestGeomMethods.test_covers_itselfR  s0    ggnnTWW%dD\"C%r,   c                 T   | j                   j                  | j                        }t        ddg      }t	        ||       g d}t        || j                  j                  | j                  d             g d}t        || j                  j                  | j                  d             y )NTFrC  r   rD  )r   r  r   r   r    r+   r   r   r   r  r  r   s       r*   test_coverszTestGeomMethods.test_coversX  sx    ggnnTWW%dE]#C%F 477>>$''>+NOC 477>>$''>+OPr,   c                     | j                   j                  | j                        }t        ddg      }t	        ||       y )NF)r   r  r   r   r    r  s      r*   test_covers_inversez#TestGeomMethods.test_covers_inversec  s0    ggnnTWW%eU^$C%r,   c                 T   | j                   j                  | j                         }t        ddg      }t        ||       g d}t	        || j
                  j                  | j                  d             g d}t	        || j
                  j                  | j                  d             y )NTrC  r   r  F)r   
covered_byr   r    r+   r   r   r  s       r*   test_covered_byzTestGeomMethods.test_covered_byh  s    gg  )dD\"C%F 477+=+=dggT+=+RSC 477+=+=dggU+=+STr,   c                     t        t        j                  dgt        | j                        z        | j                  j
                        }| j                  d|| j                         y )NTis_validr   r#   r   r   r   rW   r   r  s     r*   test_is_validzTestGeomMethods.test_is_valids  sD    "((D6CL#89477==Ij(DGG<r,   c                 v   t        t        j                  dgt        | j                        z        | j                  j
                        }t        | j                  j                         |       t        t        g d      t        g d      d g      }t        g d      }t        |j                         |       y )NValid Geometry)r0   r3   r1   r5   )r0   r3   r3   r5   )zSelf-intersection[0.5 0.5]r  N)
r   r#   r   r   r   rW   r    is_valid_reasonr   r   r\  s      r*   test_is_valid_reasonz$TestGeomMethods.test_is_valid_reasonw  s    "(($4#5DGG#DEtww}}UDGG335x@8989
 PQA--/:r,   z!GEOS 3.12 and shapely 2.1 needed.c                     t        t        g d      t        g d      g      }|j                         sJ t        t        g d      t        g d      g      }|j                         rJ y )Nr0   r3   r1   r0   )r0   r3   r5   r0   r0   r  r3   r5   r0   )r   r   is_valid_coverage)r   r   s2s      r*   test_is_valid_coveragez&TestGeomMethods.test_is_valid_coverage  sq     8989
 ""$$$89DE
 ''))))r,   c                     t        t        g d      t        g d      g      }t        t        ddg      t        g d      g      }t        |j	                         |       y )Nr  r  r0   r3   )r0   r  r3   )r   r   r
   r   invalid_coverage_edgesr   r   r   s      r*   test_invalid_coverage_edgesz+TestGeomMethods.test_invalid_coverage_edges  s^     89DE
 ():6R+ST
 	q7798Dr,   c                     t        t        j                  dgt        | j                        z        | j                  j
                        }| j                  d|| j                         y )NFis_emptyr  r  s     r*   test_is_emptyzTestGeomMethods.test_is_empty  sD    "((E7S\#9:DGGMMJj(DGG<r,   c                    t        t        j                  dgt        | j                        z        | j                  j
                        }| j                  d|| j                         t        t        j                  dgt        | j                        z        | j                  j
                        }| j                  d|| j                  j                         y )NFis_ringT)r   r#   r   r   r   rW   r   exteriorr  s     r*   test_is_ringzTestGeomMethods.test_is_ring  s    "((E7S\#9:DGGMMJi477;"((D6CL#89477==Ii4773C3CDr,   c                     t        t        j                  dgt        | j                        z        | j                  j
                        }| j                  d|| j                         y )NT	is_simpler  r  s     r*   test_is_simplezTestGeomMethods.test_is_simple  sD    "((D6CL#89477==Ik8TWW=r,   c                     t        t        j                  dgt        | j                        z        | j                  j
                        }| j                  d|| j                         y )NFis_ccwr  r  s     r*   test_is_ccwzTestGeomMethods.test_is_ccw  sD    "((E7S\#9:DGGMMJh$'':r,   c                     t        t        j                  ddg      | j                  j                        }| j                  d|| j                         y )NF	is_closed)r   r#   r   r   rW   r   r  s     r*   test_is_closedzTestGeomMethods.test_is_closed  s9    "((E5>2DGGMMBk8TWW=r,   c                     t        ddg| j                  j                        }| j                  d|| j                         y )NFThas_z)r   r   rW   r   r  s     r*   
test_has_zzTestGeomMethods.test_has_z  s0    5$-9gx;r,   zrequires shapely 2.1)r:      r   zrequires GEOS>=3.12c                 r    t        j                  ddg      }t        ddg      }| j                  d||       y )NPOINT M (2 3 5)zPOINT Z (1 2 3)TFhas_m)r   from_wktr   r   r  s      r*   
test_has_mzTestGeomMethods.test_has_m  sA     !!
 4-(gx3r,   c                    ddg}ddg}ddg}t        || j                  j                  j                         t        || j                  j                  j                         t        || j                  j                  j
                         ddt        j                  g}t        || j                  j                  j
                         y NrK   rN   rL   rO   rM   rP   )	r+   r   r\   xyzr#   r   r   r   
expected_x
expected_y
expected_zs       r*   test_xyz_pointszTestGeomMethods.test_xyz_points  s    )
w'
w'
 T^^-D-D-F-FG T^^-D-D-F-FG T^^-D-D-F-FG w/
 T-A-A-J-J-L-LMr,   c                     t        j                  g d      }ddt        j                  g}t	        ||j
                         y )N)r  zPOINT M (1 2 3)zPOINT (0 0)rG   r:   )r   r  r#   r   r+   mr  s      r*   test_m_pointszTestGeomMethods.test_m_points  s6    
 q"&&> 133/r,   c                    dddt         j                  g}dddt         j                  g}ddt         j                  t         j                  g}t        || j                  j                  j
                         t        || j                  j                  j                         t        || j                  j                  j                         y r  )r#   r   r+   r   r\   r  r  r  r  s       r*   test_xyz_points_emptyz%TestGeomMethods.test_xyz_points_empty  s    (BFF;
w8
w7
 T-G-G-P-P-R-RS T-G-G-P-P-R-RS T-G-G-P-P-R-RSr,   c                    t        j                  t              5  | j                  j                  j
                  }d d d        t        j                  t              5  | j                  j                  j                  }d d d        t        j                  t              5  | j                  j                  j                  }d d d        y # 1 sw Y   xY w# 1 sw Y   XxY w# 1 sw Y   y xY wr"   )	r   raises
ValueErrorr   r\   r  r  r   r  r   s     r*   test_xyz_polygonsz!TestGeomMethods.test_xyz_polygons  s    ]]:& 	%		""$$A	% ]]:& 	%		""$$A	% ]]:& 	%		""$$A	% 	%	% 	%	% 	%	% 	%s#   !C!C!C CC C)c                     t        g d      }t        dd      }t        t        d      D cg c]  }| c}      }t        t        d      D cg c]  }| c}      }t	        |j
                  |       y c c}w c c}w )N))rj   rj   rZ  r3   )rj   r2   r   r:   )r   r   r   r   r   centroid)r   polygonpointipolygonspointss         r*   test_centroidzTestGeomMethods.test_centroid  sb    >?auQx8!g89584aE45x00&9 94s   	A5	A:c                     t        j                  t        d      5  | j                  j                   d d d        y # 1 sw Y   y xY wr#  )r   r   r   r   r  r   s    r*   test_centroid_crs_warnz&TestGeomMethods.test_centroid_crs_warn  s3    \\+-NO 	GG	 	 	r&  c                     t        g d      }t        g d      }t        dd      }t        |||g      }t        g d      }t        |||g      }t	        |j                         |       y )Nr4   r0   r3   r1   r   rT   )r   r
   r   r   r   	normalize)r   r  
linestringr  seriespolygon2r   s          r*   test_normalizezTestGeomMethods.test_normalize  sc    23 89
aGZ7834h
E:;v//18<r,   zrequires Shapely>=2.1c                 b   t        g dg dg      }t        g d      }t        dd      }t        |||g      }t        g dg dg      }t        |||g      }t	        |j                         |       t        g dg dg      }t        |||g      }t	        |j                  d      |       y )	N)r0   rm   rk   rk   rk   r   r0   )r  )r8   rA   ra  rg  r  )holesr  r   )r0   r  r  rm   r0   T)exterior_cw)r   r
   r   r   r   orient_polygons)r   r  r  r  r  r  r   
polygon_cws           r*   test_orient_polygonsz$TestGeomMethods.test_orient_polygons  s    8;<
   89
aGZ788;<
 h
E:;v557B8;<

 j*e<=v55$5GRr,   c                    t        g d      }t        g d      }t        g d      }t        |||g      }t        t        g d      t        g d      g      }t	        t        g d      t        ddg      g      }t        |||g      }|j
                  j                         rJ |j                         }t        ||       |j
                  j                         sJ y )	N)r0   rC   r3   r  r7   r3   r0   )rC   r5   r7   r0   rC   r  )r3   r0   rC   r3   )r7   r3   r  r7   )r7   r0   r5   r7   rC   r5   )	r   r
   r   r   r   r  all
make_validr   )	r   polygon1r  r  r  out_polygon1out_polygon2r   r   s	            r*   test_make_validzTestGeomMethods.test_make_valid)  s    STCD 89
Hh
;<#8989
 *56
FFCS8TU
 lL*EF??&&(((""$vx0""$$$r,   z method, keep_collapsed, expectedlineworkTr0   r3   rc  	structurer0   r3   rc  r3   r0   c                     t        g d      }t        |g      }t        |g      }|j                  j                         rJ |j	                  ||      }t        ||d       |j                  j                         sJ y )Nr  )r   keep_collapsedTcheck_geom_type)r   r   r  r
  r  r   )r   r   r  r   r  r  r   s          r*   test_make_valid_methodz&TestGeomMethods.test_make_valid_method=  st    $ BCG9%hZ(??&&(((""&"PvxF""$$$r,   ztest for Shapely<2.1c                     t        g d      }t        |g      }t        j                  t        d      5  |j                  d       ddd       y# 1 sw Y   yxY w)z:Only the 'linework' method is supported for shapely < 2.1.r  z+Only the 'linework' method is supported forr   r  r   N)r   r   r   r  r  r  )r   r  r  s      r*   test_make_valid_old_shapelyz+TestGeomMethods.test_make_valid_old_shapelyW  sU     BCG9%]]K
 	2 [1	2 	2 	2s   AAc                     t        t        g d      t        g d      g      }t        || j                  j	                                y )NrT   r?   )r   r
   r   r   reverser  s     r*   test_reversezTestGeomMethods.test_reversea  s:    34;<
 	x):;r,   c                 (   t        t        d      t        d      g      }t        t        g d      t        g d      g      }| j                  j	                  d      }| j
                  j	                  d      }t        ||       t        ||       y )N)r0   ri   r   r1   r2   ri   r3   )UUUUUU?r   )UUUUUU?r!  r0   )	r0   r  r1   r  r3   ri   r2   r5   r  r0   )r0   r  r5   r"  r3   )r0   r  r1   r  r3   r"  r5   ri   max_segment_length)r   r   r
   r   
segmentizer   r   )r   expected_g1expected_g5	result_g1	result_g5s        r*   test_segmentize_linestringsz+TestGeomMethods.test_segmentize_linestringsj  s    	 

:  GHR
 GG&&#&>	GG&&#&>	{I6{I6r,   c                     t        j                  t        d      5  | j                  j	                  t        ddgddg             d d d        y # 1 sw Y   y xY w)NzAIndex of the Series passed as 'max_segment_length' does not matchr   ri   c   b   rV   r#  )r   r  r  r   r%  r   r   s    r*   test_segmentize_wrong_indexz+TestGeomMethods.test_segmentize_wrong_index  sT    ]]U
 	V GG&#sBPR82TU		V 	V 	Vs   ,AAc                 d   t        t        ddg      t        g d      g      }t        t        ddg      t        g d      g      }|j                  d       }t	        ||       t        t        ddd      t        d	d
g      t        g d      g      }t        t        ddd      t        ddg      t        g d      g      }|j                  d d      }t	        ||       t        t        dd      t        ddg      t        g d      g      }|j                  d d      }t	        ||       y )Nr  ra  r4   )rA   rc   )rU   r  )r0   rD   r   r:   c                     | ddgz  S )Nr8   r:    r  s    r*   <lambda>z0TestGeomMethods.test_transform.<locals>.<lambda>  s    QF
 r,   r   r=   r@   )r   r   r   r<   )r   r2   ri   r2   r>   )rG   rG   rG   )r<   r=   )r2   r8   r?  c                     | dz   S Nr2   r2  r3  s    r*   r4  z0TestGeomMethods.test_transform.<locals>.<lambda>  s
    A r,   T	include_zrB   rh   )r3   r  rc  c                     | dz   S r7  r2  r3  s    r*   r4  z0TestGeomMethods.test_transform.<locals>.<lambda>  s
    a!e r,   F)r   r
   r   	transformr   r   )	r   test_2dr   	result_2dtest_3dr   	result_3dexpected_3d_to_2dresult_3d_to_2ds	            r*   test_transformzTestGeomMethods.test_transform  s9   ()73K+LM
  )*G4L,MN
 %%&:;	{I6aAIy12;<
  aAIy12;<
 %%o%F	{I6%aFF+,01
 "++Ou+M0/Br,   )r:   rp   r   zrequires GEOS>=3.11c                 `    t        | j                  | j                  j                                y r"   )r   r   concave_hullr   s    r*   test_concave_hullz!TestGeomMethods.test_concave_hull  s    t||T\\-F-F-HIr,   zexpected_series,ratio)r0   r0  r3   rB   r9   r0   re   )r0   r0  rB   r9   r0   rX   c                     t        t        |            }t        t        g d            }t        ||j	                  |             y )N)r0   r0  r3   r9   rB   ratio)r   r   r   r   rD  )r   expected_seriesrH  r   r   s        r*    test_concave_hull_accepts_kwargsz0TestGeomMethods.test_concave_hull_accepts_kwargs  s8     W_56j!IJKxe)DEr,   c           	      r   t        j                  t        d      5  | j                  j	                  t        ddgddg             d d d        t        j                  t        d	      5  | j                  j	                  d
t        ddgddg             d d d        y # 1 sw Y   ZxY w# 1 sw Y   y xY w)Nz4Index of the Series passed as 'ratio' does not matchr   re   rX   r,  r-  rV   rG  z:Index of the Series passed as 'allow_holes' does not match皙?TF)rH  allow_holes)r   r  r  r   rD  r   r   s    r*   test_concave_hull_wrong_indexz-TestGeomMethods.test_concave_hull_wrong_index  s    ]]T
 	K GG  vsCjR'I J	K
 ]]N
 	 GG  vtUmB8'L ! 		 		K 	K
	 	s   ,B!+-B-!B*-B6c                     t        t        g d      g      }t        t        t        g d      g      g      }t        |j	                         |d       y )Nr4   )r0   r5   r3   r0   Tr  )r   r   r   r   constrained_delaunay_triangles)r   inputr   s      r*   #test_constrained_delaunay_trianglesz3TestGeomMethods.test_constrained_delaunay_triangles  sM    7#;<=>)I!J KLM
 	002Hd	
r,   c                 X    t        | j                  | j                  j                         y r"   )r   r   r  r   s    r*   test_convex_hullz TestGeomMethods.test_convex_hull  s    t||T\\-E-EFr,   c                     t        t        g d      t        g d      g      }| j                  j                         }t	        ||       y )N)r5   r0   r1   r5   )r5   r1   r3   r5   )r   r   r   delaunay_trianglesr   r   r   dlts      r*   test_delaunay_trianglesz'TestGeomMethods.test_delaunay_triangles  sA    8989
 gg((*x-r,   c           
          t        t        ddg      t        ddg      t        ddg      t        ddg      t        ddg      g      }| j                  j                  d      }t	        ||       y )Nr5   r3   r0   r1   T
only_edges)r   r
   r   rV  r   rW  s      r*   #test_delaunay_triangles_pass_kwargsz3TestGeomMethods.test_delaunay_triangles_pass_kwargs  su    FF+,FF+,FF+,FF+,FF+,
 gg((D(9x-r,   c                     t        j                  g d| j                  j                        }| j                  j	                         }t        ||       y )N)z+POLYGON ((2 2, 2 0.5, 0.5 0.5, 0.5 2, 2 2))z.POLYGON ((-1 2, 0.5 2, 0.5 0.5, -1 0.5, -1 2))z1POLYGON ((-1 -1, -1 0.5, 0.5 0.5, 0.5 -1, -1 -1))z.POLYGON ((2 -1, 0.5 -1, 0.5 0.5, 2 0.5, 2 -1))rQ   r   r  r   rR   voronoi_polygonsr   r   r   vps      r*   test_voronoi_polygonsz%TestGeomMethods.test_voronoi_polygons  sB    %% 
 WW%%'x,r,   c                     t        j                  g d| j                  j                        }| j                  j	                  d      }t        ||d       y )N)zLINESTRING (0.5 0.5, 0.5 2)zLINESTRING (2 0.5, 0.5 0.5)zLINESTRING (0.5 0.5, -1 0.5)zLINESTRING (0.5 0.5, 0.5 -1)rQ   Tr[  check_less_preciser_  ra  s      r*    test_voronoi_polygons_only_edgesz0TestGeomMethods.test_voronoi_polygons_only_edges  sI    %% 
 WW%%%6xEr,   c                     t        j                  g d| j                  j                        }| j                  j	                  t        dddd            }t        ||       y )N)z+POLYGON ((3 3, 3 0.5, 0.5 0.5, 0.5 3, 3 3))z.POLYGON ((-2 3, 0.5 3, 0.5 0.5, -2 0.5, -2 3))z1POLYGON ((-2 -1, -2 0.5, 0.5 0.5, 0.5 -1, -2 -1))z.POLYGON ((3 -1, 0.5 -1, 0.5 0.5, 3 0.5, 3 -1))rQ   r   r:   )	extend_to)r   r  r   rR   r`  r   r   ra  s      r*   test_voronoi_polygons_extend_toz/TestGeomMethods.test_voronoi_polygons_extend_to!  sR    %% 
 WW%%B1a0@%Ax,r,   c                     t        | j                  D cg c]  }t        |j                         c}      }t	        || j                  j
                        D ]  \  }}|j                  |      rJ  y c c}w r"   )r   r   r	   r}   zipr  r   )r   pexp_exteriorr   computeds        r*   test_exteriorzTestGeomMethods.test_exterior.  sa     $''!JQ*QZZ"8!JK"%lDGG4D4D"E 	-Hh??8,,,	- "Ks   A3c                    t        | j                  | j                  g      }g }|j                  d   |k(  sJ t	        | j
                  j                        }|j                  d   d   j                  |      sJ t        | j                  | j                  g      }|j                  d   g k(  sJ |j                  d   g k(  sJ y )Nr   r2   )	r   rr   r~   	interiorsr	   r|   r}   r   rw   )r   originalr   no_interiorss       r*   test_interiorszTestGeomMethods.test_interiors3  s    dggt':':;< !!!$000dmm445!!!$Q'..x888 $''477!34%%a(B...%%a(B...r,   c                    t        t        dd      t        dd      g      }| j                  d|| j                  dd       t        t        dd      t        dd      g      }| j                  d|| j                  d       y )Nri   rX   rF   interpolateT
normalizedr?  )r   r   r   r   r  s     r*   test_interpolatez TestGeomMethods.test_interpolateA  su    eCouT3/?@A%%8TWWdt 	& 	
 eCouS#?@%%mXtwwLr,   c           	      X   t        t        dd      t        dd      g      }| j                  d|| j                  t	        j
                  ddg             t        t        dd      t        dd      g      }| j                  d|| j                  t	        j
                  ddg      d       y )	Nre   rF   rX   ri   rx  r?  Try  )r   r   r   r   r#   r   r  s     r*   test_interpolate_distance_arrayz/TestGeomMethods.test_interpolate_distance_arrayJ  s    eC.c3@A%%8TWWbhhc{.C	
 eCouS#?@%%8TWWbhhc{.CPT 	& 	
r,   c                     t        j                  g d      }t        j                  t              5  | j
                  j                  |       d d d        y # 1 sw Y   y xY wNr2   r8   r:   )r#   r   r   r  r  r   rx  r   	distancess     r*   &test_interpolate_distance_wrong_lengthz6TestGeomMethods.test_interpolate_distance_wrong_lengthU  sC    HHY'	]]:& 	+GG	*	+ 	+ 	+s   AAc                     t        ddgddg      }t        j                  t        d      5  | j                  j                  |       d d d        y # 1 sw Y   y xY w)Nr2   r8   r,  r-  rV   7Index of the Series passed as 'distance' does not matchr   )r   r   r  r  r   rx  r  s     r*   %test_interpolate_distance_wrong_indexz5TestGeomMethods.test_interpolate_distance_wrong_indexZ  sQ    Aq6"b2	]]W
 	+ GG	*	+ 	+ 	+s   AAc                     | j                   j                         }d|_        t        j                  t
        d      5  |j                  d       d d d        y # 1 sw Y   y xY w)NrS   r$  r   r2   )r   r   rR   r   r   r   rx  )r   g5_crss     r*   test_interpolate_crs_warningz,TestGeomMethods.test_interpolate_crs_warninga  sJ    
\\+-NO 	"q!	" 	" 	"s   AA!c                    t        ddg| j                  j                        }t        dd      }| j	                  d|| j                  |       t        ddg| j                  j                        }| j	                  d|| j                  |d       t        t        d	d	      t        dd      gd
d	g      }t        t        j                  dt        j                  g      }t        | j                  j                  |d      |       t        ddg| j                  j                        }t        | j                  j                  |d      |       y )NrY   r?  rV   rX   ri   projectTry  r8   r2   r   F)
r   r   rW   r   r   r   r#   r   r    r  )r   r   rn  r   s       r*   test_projectzTestGeomMethods.test_projecth  s    3*DGGMM:#sOy(DGGQ?3*DGGMM:y(DGGQ4PuQ{E#sO4QFC2663/0DGGOOATO:HE3*DGGMM:DGGOOAUO;XFr,   c                 r    g d}| j                   }| j                  j                  |      }t        ||       y )N)r   r2   r2   r   r   r   )r   r   affine_transformr   )r   matrixr   r  s       r*   test_affine_transformz%TestGeomMethods.test_affine_transformw  s.    #77gg&&v.x-r,   c                    | j                   j                  | j                  j                  z
  | j                   j                  | j                  j                  z
  f} | j                  j
                  | d   j                  | j                         sJ  | j                  j                  | j                        j
                  | d   }|j                  | j                         sJ y )Nr   )	r   r  r   r  r   	translater   r   r   )r   transr  s      r*   test_translate_tuplez$TestGeomMethods.test_translate_tuple  s    

TXXZZ'dhhjj)@@'t~~''/299$((CCC>dii$$T^^4>>FqIzz$((###r,   c                    d}| j                   }t        dd      }| j                   j                  ||      j                  | |      }t        | j                   |      sJ | j                  j                  | j                         j                  |t        dd            }t        ||j                  | |            sJ y )Nr-  r   )origin)r   r   rotater   r   r   )r   angler   or  s        r*   test_rotatezTestGeomMethods.test_rotate  s    77!QKggnnU1n-44eVA4F!$''3///ii$$TWW-44U5A;4O!(CJJvaJ,HIIIr,   c                 z   | j                   }d}t        d |D              }t        dd      }  | j                   j                  |d|ij                  |d|i}t	        ||      sJ  | j
                  j                  | j                         j                  |d|i} |j                  |d|i}t	        ||      sJ y )N)rY   rX   c              3   &   K   | ]	  }d |z    yw)rX   Nr2  ).0r  s     r*   	<genexpr>z-TestGeomMethods.test_scale.<locals>.<genexpr>  s     +C!G+s   r   r  )r   tupler   scaler   r   r   )r   r   r  invr  r  s         r*   
test_scalezTestGeomMethods.test_scale  s    77+U++!QK3mdggmmU-1-33SCC!(C0003dii$$TWW-33UE1Ecii'Q'!(C000r,   c                    | j                   }d}t        dd      }| j                   j                  ||      j                  | |      }t        ||      sJ | j                  j                  | j                         j                  ||      }|j                  | |      }t        ||      sJ | j                   j                  ||      j                  | |      }t        ||      sJ | j                  j                  | j                         j                  ||      }|j                  | |      }t        ||      sJ y )Ng     F@r   )xsr  )ysr  )r   r   skewr   r   r   )r   r   r  r  r  s        r*   	test_skewzTestGeomMethods.test_skew  s'   77!QK gglld1l-22teA2F!(C000ii$$TWW-22d12Ehh4%h*!(C000 gglld1l-22teA2F!(C000ii$$TWW-22d12Ehh4%h*!(C000r,   c                     t        t        dd      g      }t        t        d      g      }|j                  dd      }t	        ||      sJ y )Nr   )r`  )r   )r  r   r_  r`  rG   r2   
resolution)r   r   r   bufferr   r   rt  r   
calculateds       r*   test_bufferzTestGeomMethods.test_buffer  sI    eAqk]+g&PQRS__Q1_5
!(J777r,   c                     dddd} | j                   j                  di |}t        | j                   |      D ]1  \  }}||J  |j                  di |}|j                  |      r1J  y )Nr:   r8   g      @)	cap_style
join_stylemitre_limit)rk   )r   r  rm  r   )r   r(   calculated_seriesrt  r  r   s         r*   test_buffer_argsz TestGeomMethods.test_buffer_args  s    aD*DGGNN66$'1B$C 	3 Hj!)))*8??66!((222	3r,   c                     t        | j                  | j                  g      }t        t        d      t        d      g      }|j                  t	        j
                  ddg      d      }t        ||d       y N)rc   rG   )rG   rA   )rA   rG   )rG   rc   r  )rk   rG   r`  r_  rn   r  r2   rG   r  Tre  )r   r   r   r  r#   r   r   r  s       r*   test_buffer_distance_arrayz*TestGeomMethods.test_buffer_distance_array  sg    dggtww/0@ACD
 __RXXq!f%5!_D
z8Mr,   c                     t        | j                  | j                  g      }t        j                  g d      }t	        j
                  t              5  |j                  |       d d d        y # 1 sw Y   y xY wr  )r   r   r#   r   r   r  r  r  r   rt  r  s      r*   !test_buffer_distance_wrong_lengthz1TestGeomMethods.test_buffer_distance_wrong_length  sT    dggtww/0HHY'	]]:& 	'OOI&	' 	' 	'   A--A6c                     t        | j                  | j                  g      }t        t        d      t        d      g      }|j                  t	        ddg      d      }t        ||d       y r  )r   r   r   r  r   r   r  s       r*   test_buffer_distance_seriesz+TestGeomMethods.test_buffer_distance_series  sb    dggtww/0@ACD
 __VQF^_B
z8Mr,   c                     t        | j                  | j                  gddg      }t        ddgddg      }t        j                  t
        d	      5  |j                  |       d d d        y # 1 sw Y   y xY w)
Nr   r2   rV   r8   r,  r-  )datarW   r  r   )r   r   r   r   r  r  r  r  s      r*    test_buffer_distance_wrong_indexz0TestGeomMethods.test_buffer_distance_wrong_index  sh    dggtww/1v>Ar2h7	]]W
 	' OOI&	' 	' 	'r  c                     t        g d      }t        |t               d g      }|j                  d      }t	        ||       |j                  t        j                  g d            }t	        ||       y )N)r0   r5   r3   r1   r   r5  )r   r   r   r  r   r#   r   )r   rn  r   r   s       r*   test_buffer_empty_nonez&TestGeomMethods.test_buffer_empty_none  sZ    45q,.56!vq)"((9-.vq)r,   c                 f   t        j                  t        d      5  | j                  j	                  d       d d d        t        j                  d      5 }| j                  j	                  d       d d d        D ]  }dt        |j                        vrJ  y # 1 sw Y   dxY w# 1 sw Y   6xY w)Nr$  r   r2   Tr   r   z Geometry is in a geographic CRS.)	r   r   r   r   r  r   r   strmessage)r   r   rs      r*   test_buffer_crs_warnz$TestGeomMethods.test_buffer_crs_warn  s    \\+-NO 	GGNN1	 $$D1 	VGGNN1	  	LA5S^KKK	L	 		 	s   BB'B$'B0c                     t        t        j                  g d      g      }t        t        j                  ddg      g      }t        |j	                  d      |       y )N)r0   )r2   rL  r7   r0   r7   g?)r   r6  r
   r   simplify)r   r   es      r*   test_simplifyzTestGeomMethods.test_simplify  sJ    w))*DEFGw))66*:;<=qzz#2r,   c                     t        j                  t        d      5  | j                  j	                  t        dgdg             d d d        y # 1 sw Y   y xY w)N8Index of the Series passed as 'tolerance' does not matchr   rL  r,  rV   )r   r  r  r   r  r   r   s    r*   test_simplify_wrong_indexz)TestGeomMethods.test_simplify_wrong_index  sH    ]]X
 	8 GGVSE"67	8 	8 	8   )AAc                    t        t        j                  g d      t        j                  g d      g      }t        t        j                  g d      t        j                  g d      g      }t        |j	                  d      |j                                t        t        j                  g d      t        j                  g d      g      }t        |j	                  dd      |j                                y )	N)r0   rk   r2      r   r  rk   r  rm   r0   )rm   r  r  r  r  r   r  rm   )r0   r  r  rm   )rm   r  r  r  rU   )r0   r  r  r  rm   F)simplify_boundary)r   r6  r   r   simplify_coverager  )r   r   r  
e_boundarys       r*   test_simplify_coveragez&TestGeomMethods.test_simplify_coverage	  s     R L		
  DE FG
 	q2215q{{}E MN FG

 	U;Z=Q=Q=S	
r,   c                     | j                   j                  }t        j                  |j	                  | j
                              sJ t        |t              sJ | j                   j                  |j                  k(  sJ y r"   )	r   enveloper#   r
  r   rw   r   r   rR   )r   r  s     r*   test_envelopezTestGeomMethods.test_envelope)  sZ    GGvvammDGG,---!Y'''ww{{aee###r,   c                 `   t        | j                  | j                  gd      }|j                         }t        j                  ddgd      }t        j                  |j                         j                  |d            sJ t        |t               sJ |j                  |j                  k(  sJ y )Ni  rQ   z#POLYGON ((0 0, 0 1, 1 1, 1 0, 0 0))z#POLYGON ((2 0, 2 3, 3 3, 3 0, 2 0))MbP?)r   rw   rz   minimum_rotated_rectangler  r#   r
  r  geom_equals_exactr   rR   )r   r   r  r  s       r*   test_minimum_rotated_rectanglez.TestGeomMethods.test_minimum_rotated_rectangle/  s    tww(d3'')  55 
 vvakkm55c5ABBB!Y'''uu~~r,   c                     t        | j                  g      j                         }t        t        ddg      g      }t	        ||       y )Nr7   r9   )r   r{   extract_unique_pointsr   r    )r   eupr   s      r*   test_extract_unique_pointsz*TestGeomMethods.test_extract_unique_points>  s<    	"88:j&&)9:;<C*r,   c                 |   | j                   j                         }t        t        dd      gdz        }t	        j
                  |j                  j                  |d            sJ t        |j                  t        ddg             t        |t              sJ | j                   j                  |j                  k(  sJ y )Nri   r8   r  g1?)r   minimum_bounding_circler   r   r#   r
  r  r  r    r   r   r   rR   )r   mbccenterss      r*   test_minimum_bounding_circlez,TestGeomMethods.test_minimum_bounding_circleC  s    gg--/U3_-12vvcll44WeDEEEHHHh'(	
 #y)))ww{{cgg%%%r,   c                 V   | j                   j                         }t        t        ddg      t        ddg      g      }t	        ||       | j                   j                  t        j                  ddg            }t        t        ddg      t        ddg      g      }t	        ||       y )	N)g     ?g     ?r  r  rk   r   r  )rF   ri   )      ?r  )r   maximum_inscribed_circler   r
   r   r#   r   )r   micr   mic_toleranceexpected_tols        r*   test_maximum_inscribed_circlez-TestGeomMethods.test_maximum_inscribed_circleN  s    gg..04jABJ12
 	sH-88288RQRGCT8U K89J12
 	}l;r,   c                    | j                   j                  | j                   j                  | j                  j                  | j                  j                  f}t	        | j
                  j                  t        j                        sJ t        | j
                  j                        |k(  sJ t        | j
                  t        t        | j
                              d      }t        |j                        |k(  sJ y )N)r\   r^   )r   r  r  r   r   r   total_boundsr#   ndarrayr  r   r   r   )r   bboxdfs      r*   test_total_boundsz!TestGeomMethods.test_total_boundsb  s    xxzz488::txxzz488::=$..55rzzBBBT^^001T999s4>>7J1KL
 R__%---r,   c           
      l   t        t        ddg      t        g d      gd      }d|j                  _        dd g}g d}t        t	        dd      t	        d	d	      t	        d
d
      t	        dd      t	        dd      gt        j                  ||      d      }t        ||j                  d             y )Nr0   r3   )r  rB   ra  rS   rQ   test_index_name)r0   r5   r1   r3   rc  r   r2   r8   r:   rA   namesr   Tindex_parts)	r   r   rW   namer   r   from_tuplesr   explode)r   r   expected_index_namerW   r   s        r*   test_explode_geoseriesz&TestGeomMethods.test_explode_geoseriesl  s    ():6N+OP
 )0$781a[%1+uQ{E!QKq!M((6IJ

 	xt)DEr,   
index_nameNtestc           	         t        t        t        dd      t        dd      g      t        dd      g      }t        ddg|d      }||j                  _        |j                  d      }t        t        dd      t        dd      t        dd      g      }t        g d|d      }t        d	dgd	dggg d
g dg|d g      }|j                  |      }t        ||       y )Nr2   r8   r:   rG   )colr\   Tr   r2   r2   r8   r   r   r   r2   r   r2   r   r  
r   r   r   r   rW   r  r  r   	set_indexr   r   r  r   r  test_df
expected_sexpected_dfexpected_indexs           r*   test_explode_geodataframez)TestGeomMethods.test_explode_geodataframe{  s    z5A;a"<=uQ{KL1a&a89"***.aU1a[%1+FG
"9*#MN#VaV	"t$

 "++N;7K0r,   c           	         t        t        t        dd      t        dd      g      t        dd      g      }t        ddg|d      }||j                  _        |j                  d      }t        t        dd      t        dd      t        dd      g      }t        g d|d      }t        d	dgd	dggg d
g dg|d g      }|j                  |      }t        ||       y )Nr2   r8   r:   rG   level_1r\   Tr   r  r   r  r  r  r  r  s           r*   !test_explode_geodataframe_level_1z1TestGeomMethods.test_explode_geodataframe_level_1  s     z5A;a"<=uQ{KLq!f!<="***.aU1a[%1+FG
"yj#QR#VaV	"t$

 "++N;7K0r,   c           	         t        t        t        dd      t        dd      g      t        dd      g      }t        ddg|d      }||j                  _        |j                  d      }t        t        dd      t        dd      t        dd      g      }t        g d|d      }t        g d	|
      }|j                  |      }t        ||       y )Nr2   r8   r:   rG   r  Fr   r  r  )r  )
r   r   r   r   rW   r  r  r   r  r   r  s           r*   'test_explode_geodataframe_no_multiindexz7TestGeomMethods.test_explode_geodataframe_no_multiindex  s     z5A;a"<=uQ{KLq!f!<="***/aU1a[%1+FG
"yj#QRyz:!++N;7K0r,   c           
      d   ddgddggt        ddg      t        ddg      gd	}t        |d
      }t        g dt        ddg      t        ddg      t        ddg      t        ddg      gd	g dd
      }|j                  d      }t        ||       |j                  d      }t        ||       y )Nname1name2name3name4rc  r:   rA   rd  r0   r^   r\   rS   rQ   r  r  r  r   )r   r   r2   r2   r   r^   )columnr   r   r  r   r   dr   r  exploded_dfs        r*   test_explode_pandas_fallbackz,TestGeomMethods.test_explode_pandas_fallback  s    w''7);<#VV$45z66BR7ST
 1$'"</0/0/0/0	 
 kk&)!+{; kkk0!+{;r,   c           
      d   ddgddggt        ddg      t        ddg      gd	}t        |d
      }t        g dt        ddg      t        ddg      t        ddg      t        ddg      gd	d
      }|j                  dd      }t        ||       |j                  dd      }t        ||       y )Nr  r  r  r   rc  r!  rd  r0   r"  rS   rQ   r#  r^   Tignore_index)r$  r,  r%  r&  s        r*   )test_explode_pandas_fallback_ignore_indexz9TestGeomMethods.test_explode_pandas_fallback_ignore_index  s    w''7);<#VV$45z66BR7ST
 1$'"</0/0/0/0	 
 kk&tk<!+{; kkdkC!+{;r,   outer_index)r2   rc  1c                 2   t        j                  |||gg dgd      }t        dg dit        d      D cg c]  }t	        ||f|dfg       c}|      }|j                  d	      }t        t        dd      t        dd      t        d
d
      t        d
d      t        dd      t        dd      g      }t        g d|d      }t        j                  dD cg c]  }|g|
 c}g d      }	|j                  |	      }t        ||       y c c}w c c}w )Nr  firstsecondr  valsr:   r   r\   rW   Tr   r2   r8   r2   r2   r8   r8   r:   r:   r4  r\   )r1   r3   r7   rd  r9   r;   )r2  r3  Nr   from_arraysr   r   r   r  r   r   r  r  r   )
r   r.  rW   r  r  r  r  r  pairr  s
             r*   test_explode_pandas_multi_indexz/TestGeomMethods.test_explode_pandas_multi_index  s%   &&;4i@%
 Y<A!HEqj1a&1a&!12E
 ***.aaaaaa	

 #,>J#WX#// M $t$ ,
 "++N;7K03 F$s   D
Dc                 (   t        j                  |||gg dgd      }t        dg dit        d      D cg c]  }t	        ||f|dfg       c}|      }|j                  d	      }t        t        dd      t        dd      t        d
d
      t        d
d      t        dd      t        dd      g      }t        g d|d      }t        j                  |d
f|d
f|df|df|df|dfgddg      }|j                  |      }t        ||       y c c}w )Nr  r1  r  r4  r:   r   r5  Fr   r2   r8   r6  r7  r2  r3  r8  	r   r.  rW   r  r  r  r  r  r  s	            r*   %test_explode_pandas_multi_index_falsez5TestGeomMethods.test_explode_pandas_multi_index_false
  s9   &&;4i@%
 Y<A!HEqj1a&1a&!12E
 ***/aaaaaa	

 #,>J#WX#//a a a a a a  H%

 "++N;7K0; Fs   D
c                 J   t        j                  |||gg dgd      }t        dg dit        d      D cg c]  }t	        ||f|dfg       c}|      }|j                  d	      }t        t        dd      t        dd      t        d
d
      t        d
d      t        dd      t        dd      g      }t        g d|d      }t        t        t        |                  }|j                  |      }t        ||       |j                  dd      }t        ||       y c c}w )Nr  r1  r  r4  r:   r   r5  Tr+  r2   r8   r6  r7  )r,  r  )r   r9  r   r   r   r  r   r   r   r   r  r   r=  s	            r*   ,test_explode_pandas_multi_index_ignore_indexz<TestGeomMethods.test_explode_pandas_multi_index_ignore_index1  s   &&;4i@%
 Y<A!HEqj1a&1a&!12E
 **$*/aaaaaa	

 #,>J#WXuS%567!++N;7K0 **$D*A7K0/ Fs   D 
c                    t        dg dit        d      D cg c]  }t        ||f|dfg       c}g d      }|j                  d      }t	        j
                  g d	g d
g      }t        t        dd      t        dd      t        dd      t        dd      t        dd      t        dd      g|      }t        dg di||      }t        ||       y c c}w )Nr4  r  r:   r   r8   	   rq   r5  Tr   )r8   r8   rC  rC  rq   rq   r   r2   r   r2   r   r2   r2   r8   rV   r6  	r   r   r   r  r   r9  r   r   r   r   r  r  r  r  expected_geometryr  s          r*   test_explode_orderz"TestGeomMethods.test_explode_orderR  s    Y<A!HEqj1a&1a&!12E

 ***.#//!34
 &aaaaaa !

 #'(& 

 	"';71 F   C
c           
      Z   t        dg dit        d      D cg c]  }t        d|       c}g d      }|j                  d      }t	        j
                  g dg d	g      }t        dg dit        d      D cg c]  }t        d|       c}|      }t        ||       y c c}w c c}w )
Nr4  r  r:   r   rB  r5  Tr   r5  )r   r   r   r  r   r9  r   )r   r  r  r  r  r  s         r*   test_explode_order_no_multiz+TestGeomMethods.test_explode_order_no_multio  s    Y+084aeAqk4

 ***.#//	"
 #Y+084aeAqk4 

 	"';7 5 5s   B#
:B(
c                    t        dg dit        d      D cg c]  }t        ||f|dfg       c}t        dd      gz   g d      }|j	                  d	      }t        j                  g d
g dg      }t        t        dd      t        dd      t        dd      t        dd      t        dd      g|      }t        dg di||      }t        ||       y c c}w )Nr4  r  r8   r   rk   rB  r5  Tr   )r8   r8   rC  rC  rq   )r   r2   r   r2   r   r2   rV   )r2   r2   r8   r8   r:   )	r   r   r   r   r  r   r9  r   r   rF  s          r*   test_explode_order_mixedz(TestGeomMethods.test_explode_order_mixed  s    Y<A!HEqj1a&1a&!12EqRTV

 ***.#//o.
 &aaaaa !	
 #_%& 

 	"';7/ Fs   C
c                    t        dg dit        d      D cg c]  }t        ||f|dfg       c}g d      }|j                  d      }t	        j
                  g d	g d
g      }t        t        dd      t        dd      t        dd      t        dd      t        dd      t        dd      g|      }t        dg di||      }t        ||       y c c}w )Nr4  r  r:   r   r  r5  Tr   )r2   r2   r2   r2   r8   r8   rD  r2   r8   rV   r6  rE  rF  s          r*   test_explode_duplicated_indexz-TestGeomMethods.test_explode_duplicated_index  s    Y<A!HEqj1a&1a&!12E

 ***.#//!34
 &aaaaaa !

 #'(& 

 	"';7/ FrI  geom_colgeomr\   c           	      :   t        t        t        dd      t        dd      g      t        dd      g      }t        dddg||i|      }|j	                  d      }|j
                  j                  |k(  sJ |j
                  j                  |j                  k(  sJ y )	Nr2   r8   r:   rG   r
  r\   Tr   )r   r   r   r   r  r\   r  _geometry_column_name)r   rP  r   r  r  s        r*   test_explode_geometry_namez*TestGeomMethods.test_explode_geometry_name  s    z5A;a"<=uQ{KL51a&(A6J***.$$000$$(E(EEEEr,   c           	      Z   t        t        t        dd      t        dd      g      t        dd      g      }t        ddg||dd      }|j	                  d	      }|j
                  j                  dk(  sJ |j
                  j                  |j                  k(  sJ d
|j                  v sJ y )Nr2   r8   r:   rG   )r
  rQ  r\   rQ  rS  Tr   r\   )	r   r   r   r   r  r\   r  rT  r-  )r   r   r  r  s       r*   $test_explode_geometry_name_two_geomsz4TestGeomMethods.test_explode_geometry_name_two_geoms  s    z5A;a"<=uQ{KL1a&!CfU***.$$...$$(E(EEEEW__,,,r,   c                     t        | j                  ddgg d      }t        | j                  j	                         |       y )Nr  r  r   r2   r:   r:   r:   r:   rA   rA   rA   rA   rc   rc   rc   r  r-  rW   r   r   r   r   get_coordinatesr  s     r*   test_get_coordinatesz$TestGeomMethods.test_get_coordinates  s8    !!#J9

 	488335x@r,   c                     t        | j                  g dg d      }t        | j                  j	                  d      |       y )Nr  r  r  rY  rZ  Tr8  )r   r   r   r   r\  r  s     r*   test_get_coordinates_zz&TestGeomMethods.test_get_coordinates_z  s9    !!#9

 	48833d3CXNr,   c                 
   t        j                  ddg      }t        t        j                  g dg dg      g d      }t        |j                  d      |       t        t        j                  d	d
t        j                  gg dg      g d      }t        |j                  d      |       t        t        j                  d	d
t        j                  dgg dg      g d      }t        |j                  dd      |       y )Nr  zPOINT ZM (1 2 3 4))rY   rf   rd   )rX   rY         @)r  r  r  r  r-  T)	include_mrY   rf   )rX   rY   rf   r_  r8  rd   )rX   rY   rf   rb  )r  r  r  r  )r9  rd  )r   r  r   r#   r   r   r\  r   r  s      r*   test_get_coordinates_mz&TestGeomMethods.test_get_coordinates_m  s    !$
 ?O<=#
 	1,,t,<hG Cbff-?@#
 	1,,t,<hG Cbffc24HIJ(
 	1,,tt,LhWr,   c                     t        | j                  ddg      }t        | j                  j	                  d      |       y )Nr  r  rc  Tr+  r[  r  s     r*   test_get_coordinates_ignorez+TestGeomMethods.test_get_coordinates_ignore  s:    !!#J
 	488333FQr,   c                     t        | j                  ddgt        j                  g d            }t	        | j
                  j                  d      |       y )Nr  r  )r0   r1   r9   r;   re  rB   )rA   r   rb  rg  rf  )rc   r   )rc   r2   )rc   r8   rZ  Tr   )r   r   r   r  r   r   r\  r  s     r*   test_get_coordinates_partsz*TestGeomMethods.test_get_coordinates_parts   sM    !!#J((
* 	488333ExPr,   c                     | j                   j                         }t        |t        ddg             | j                  j                         }t        |t        ddg             y )NgÜ?)r   minimum_bounding_radiusr    r   r   )r   	mbr_geoms	mbr_liness      r*   test_minimum_bounding_radiusz,TestGeomMethods.test_minimum_bounding_radius  sX    GG335	Hh'(	

 GG335	Hh'(	
r,   c                     | j                   j                         }t        |t        ddg             | j                  j                         }t        |t        ddg             y )Ng۞?rX   )r   minimum_clearancer    r   r   )r   mc_geomsmc_liness      r*   test_minimum_clearancez&TestGeomMethods.test_minimum_clearance'  sW    77,,.Hh'(	

 77,,.C:	
r,   c                     | j                   j                         }t        t        ddg      t        ddg      g      }t	        ||       y )Nr1   r  r0   )r   minimum_clearance_liner   r
   r   )r   	mcl_geomsr   s      r*   test_minimum_clearance_linez+TestGeomMethods.test_minimum_clearance_line6  sF    GG224	,-z66:J/KL
 	y(3r,   size)rk   r  r  c                    | j                   | j                  | j                  | j                  fD ]~  }|j	                  |      }t        |j                  |j                         t        |j                  d            t        ||j                  |j                         z            |z  k(  r~J  t        j                  t        d      5  j	                  |d      }d d d        y # 1 sw Y   y xY w)NTr+  z The 'seed' keyword is deprecatedr   r2   )seed)r   r   r   r   sample_pointsr   rW   r   r  r  isnar   r   FutureWarning)r   rx  gsoutputr   s        r*   test_sample_pointsz"TestGeomMethods.test_sample_points?  s     GGGGGGLL	
 	B %%d+Frxx6FNNN56rBKK"'')3456=>>	 \\-/QR 	/  A .A	/ 	/ 	/s   C((C1c                     t        | j                  | j                  g      j                  g d      }t        g dg ddd      }t	        t        j                  |      |       y )N)rk      r     )r   r2   r   r2   sampled_pointsint32)rW   r  r%   )r   r   r{  r   r    r6  get_num_geometries)r   r  r   s      r*   test_sample_points_arrayz(TestGeomMethods.test_sample_points_arrayP  sP    $''*+99:JKL7Gw
 	G66v>Ir,   c                    t        j                  d       | j                  | j                  | j                  fD ]o  }|j                  |d      }t        |j                  |j                         t        |j                  d            t        ||j                            |z  k(  roJ  t        j                  t        d      5  j                  dd	       d d d        y # 1 sw Y   y xY w)
N	pointpatscluster_poissonr   Tr+  zpointpats.random module has nor   rk   nonexistent)r   importorskipr   r   r   r{  r   rW   r   r  r  r  AttributeError)r   rx  r~  r  s       r*   test_sample_points_pointpatsz,TestGeomMethods.test_sample_points_pointpatsW  s    K(GGGGGG
 		B
 %%d3D%EFrxx6FNNN56#b"++>N:ORV:VVV		 ]]>1QR 	7R6	7 	7 	7s   C##C,c                     t        | j                  g      j                  dd      }t        t        ddgddgddgg      g      }t	        ||       t        |t               sJ y )Nr2   mitre)r  rj   r   r8   )r   r   offset_curver
   r   r   )r   ocr   s      r*   test_offset_curvez!TestGeomMethods.test_offset_curveh  sa    y!..qW.Ej2q'B7QF)CDEFx,"i(((r,   c                     t        j                  t        d      5  t        | j                  g      j                  t        dgdg             d d d        y # 1 sw Y   y xY w)Nr  r   r2   r,  rV   )r   r  r  r   r   r  r   r   s    r*   test_offset_curve_wrong_indexz-TestGeomMethods.test_offset_curve_wrong_indexn  sS    ]]W
 	G twwi --faS.EF	G 	G 	G   3AA!c           	          t        j                  g ddd      }| j                  j                         }t	        ||       t        | j                  j                  t        t        dd                   y )Nz$POLYGON ((0 0, 0.5 0.5, 0.5 0, 0 0))z-POLYGON ((0.5 0.5, 0 0, 0 1, 0.5 1, 0.5 0.5))z-POLYGON ((0.5 0.5, 1 1, 1 0, 0.5 0, 0.5 0.5))z$POLYGON ((1 1, 0.5 0.5, 0.5 1, 1 1))r  rS   r  rR   r8   rk   	r   r  r   
polygonizer   r   rW   r   r   r   r   r   s      r*   test_polygonizezTestGeomMethods.test_polygonizet  s\    %% 	
 &&(x04::++U5B<-@Ar,   c           	          t        j                  ddgdd      }| j                  j                  d      }t	        ||       t        | j                  j                  t        t        dd	                   y )
NzPOLYGON ((0 0, 1 1, 1 0, 0 0))zPOLYGON ((1 1, 0 0, 0 1, 1 1))r  rS   r  Fnoder8   rk   r  r  s      r*   test_polygonize_no_nodez'TestGeomMethods.test_polygonize_no_node  sc    %%-/OP

 &&E&2x04::++U5B<-@Ar,   c           	         t        j                  g ddd      }t        g dd      }t        j                  g ddd      }t        g dd      }| j                  j                  d	
      }t	        ||d          t	        ||d          t	        ||d          t	        ||d          t        | j                  j                  t        t        dd                   y )Nr  r  rS   r  z	cut edges)zLINESTRING (5 5, 6 6)zLINESTRING (0.5 1, 0.5 2)zLINESTRING (0.5 -1, 0.5 0)dangleszinvalid ring linesT)fullr   r2   r8   r:   rk   r  )r   expected_polyexpected_cutsexpected_danglesexpected_invalidr   s         r*   test_polygonize_fullz$TestGeomMethods.test_polygonize_full  s    !** 	
 "";DA$--
 
 %R.BM&&D&1}fQi8}fQi8/;/;4::++U5B<-@Ar,   zgeom,expected)r0   rc  rc  r2   r:   r0   )r0   rc  r  r0   )r0   r0   r1   r3   r1   r0   )r0   r1   r3   r1   r0   c                 <    t        ||j                  d             y )Nre   r  )r   remove_repeated_points)r   rQ  r   s      r*   test_remove_repeated_pointsz+TestGeomMethods.test_remove_repeated_points  s     	x)D)Ds)D)STr,   c                     t        j                  t        d      5  t        | j                  g      j                  t        dgdg             d d d        y # 1 sw Y   y xY w)Nr  r   r2   r,  rV   )r   r  r  r   r   r  r   r   s    r*   'test_remove_repeated_points_wrong_indexz7TestGeomMethods.test_remove_repeated_points_wrong_index  sS    ]]X
 	Q twwi 77s2$8OP	Q 	Q 	Qr  c                     t        t        dd      t        dd      | j                  | j                  gd      }t	        || j
                  j                                y )NrK   rL   rN   rO   rS   rQ   )r   r   r   r   r   r   force_2dr  s     r*   test_force_2dzTestGeomMethods.test_force_2d  sS    h(h(			 
 	x)C)C)L)L)NOr,   c           	         t        | j                  | j                  t        ddd      | j                  gd      }t        || j                  j                                t        | j                  | j                  t        ddd      | j                  gd      }t        || j                  j                  d             t        t        g d      t        g d      g      }t        || j                  j                  d	dg             y )
NrK   rL   r   rS   rQ   r8   )r  )r2   r   r2   r<   r  )r   r   r8   )r2   r   r8   r  )r   r2   r8   r  r2   )
r   r   r   r   r   r   r   force_3dr   r   r  s     r*   test_force_3dzTestGeomMethods.test_force_3d  s    h+	 
 	x)C)C)L)L)NOh+	 
 	x)C)C)L)LQ)OPDEOP
 	x)9)91a&)ABr,   c                 <   t        g d      }t        j                  ddg      }t        || j                  j                  |             t        t        g d      t        g d      gddg      }t        j                  g d	      }t        j                  t        d
      5  t        | j                  j                  |d       |       d d d        t        j                  ddg      }t        | j                  j                  |d      |       y # 1 sw Y   HxY w)N)r0   r  r5   zLGEOMETRYCOLLECTION (MULTILINESTRING ((0 0, 0.5 0.5)), MULTILINESTRING EMPTY)zLGEOMETRYCOLLECTION (MULTILINESTRING EMPTY, MULTILINESTRING ((0 1, 0.5 0.5))))r0   r  r1   r3   )?r  )r3   r5   r1   r2   r8   rV   )NzLGEOMETRYCOLLECTION (MULTILINESTRING ((0.5 0.5, 1 0)), MULTILINESTRING EMPTY)Nr   r   r   zWGEOMETRYCOLLECTION (MULTILINESTRING ((0 0, 0.5 0.5)), MULTILINESTRING ((0.9 0.9, 1 1)))zHGEOMETRYCOLLECTION (MULTILINESTRING ((0 1, 1 0)), MULTILINESTRING EMPTY)F)	r
   r   r  r   r   shared_pathsr   r   r   )r   liner   r  s       r*   test_shared_pathsz!TestGeomMethods.test_shared_paths  s   67%%*5
 	x););)H)H)NOKL34 a&
 %%
 \\N
 	 #""//$/?		 %%5*
 	++Be+<h	
!	 	s   #(DDc                     t        j                  t        d      5  | j                  j	                  t        dgdg             d d d        y # 1 sw Y   y xY w)Nz0Index of the Series passed as 'z' does not matchr   r2   r,  rV   )r   r  r  r   r  r   r   s    r*   test_force_3d_wrong_indexz)TestGeomMethods.test_force_3d_wrong_index	  sH    ]]P
 	6 GGVQCt45	6 	6 	6r  c           	          t        t        g d      t        ddgddgg      t               t        g d      t               gdt	        dd	      
      }t        || j                  j                                y )NrC   rm   rn   rC   rm   ro   rn   )r0   r1   r9   rS   r8   rq   rl   r   r
   r   r   r   r   r   
line_merger  s     r*   test_line_mergezTestGeomMethods.test_line_merge#	  sm    56&'!2Wg4F GH"$34"$ 1+

 	x)<)<)>?r,   c           
          t        t        g d      t        ddgddgg      t               t        ddgddgg      t               gd	t	        d
d            }t        || j                  j                  d             y )Nr  rC   rm   ro   rn   r0   r1   r9   rS   r8   rq   rl   T)directedr  r  s     r*   test_line_merge_directedz(TestGeomMethods.test_line_merge_directed1	  s    56&'!2Wg4F GH"$&&!1FF3C DE"$ 1+

 	x)<)<d)<)KLr,   zdifferent order in GEOS<3.11c                    t        j                  g dd      }t        j                  g ddd      }t        ||j                                t        j                  g dd      }t        j                  dgdd      }t        ||j                  d	
      d	       t        j                  dgdd      }t        ||j                  d
      d	       y )N)zLINESTRING (18 4, 4 2, 2 9)zLINESTRING (18 4, 16 16)z#LINESTRING (16 16, 8 19, 8 12, 2 9)LINESTRING (8 6, 12 13, 15 8)LINESTRING (8 6, 15 8)z$LINESTRING (0 0, 0 3, 3 3, 3 0, 0 0)zPOLYGON ((1 1, 2 2, 1 2, 1 1))$LINESTRING (10 7, 13 8, 12 10, 10 7)rS   rQ   )z9POLYGON ((0 3, 3 3, 3 0, 0 0, 0 3), (2 2, 1 2, 1 1, 2 2))z#POLYGON ((13 8, 10 7, 12 10, 13 8))zKPOLYGON ((2 9, 8 12, 8 19, 16 16, 18 4, 4 2, 2 9), (8 6, 15 8, 12 13, 8 6))r  )rR   r  )r  r  z(LINESTRING (0 0, 0 15, 12 15, 12 0, 0 0)r  zBPOLYGON ((12 0, 0 0, 0 15, 12 15, 12 13, 15 8, 12 7.142857, 12 0))Tr  re  zkPOLYGON ((0 15, 12 15, 12 13, 15 8, 12 7.142857, 12 0, 0 0, 0 15), (12 7.666667, 13 8, 12 10, 12 7.666667))F)r   r  r   
build_area)r   r   r   r  noded	non_nodeds         r*   test_build_areazTestGeomMethods.test_build_area@	  s    
 	 
 %% 	
 	x8  
 ""QR

 	ubmmm&>SWX&&; 
	 	r}}%}0T	
r,   )r:   rC  rG   zEmpty geom bug in GEOS<3.9.5c                    t        t        ddd      t        ddd      t        dd      | j                  gd      }t        || j                  j                  d             t        t        g d      t        g d	      g      }t        t        g d
      t               g      }t        ||j                  d             t        t        g d      t        g d      g      }t        |j                         |j                  dd      j                                t        t        g d
      t        ddg      g      }t        |j                         |j                  dd      j                                y )Ni)   rM   rP   rS   rQ   r2   )r0   r   rL  r5   r3   )r0   r  )rL  rL  rT   )r0   r0   r5   r3   )r0   r0   r0   	pointwise)moder0   r  )	r   r   r   r   r   set_precisionr
   r    to_wktr\  s      r*   test_set_precisionz"TestGeomMethods.test_set_precision}	  sT    c2w'c2w'c2	 
 	x)C)C)Q)QRS)TU=>9:
 34
 	x);<;<34
 	OOqq{CJJL	
 34FF+,
 	OOqq7GHOOQ	
r,   c                    t        g d| j                  j                        }t        || j                  j	                                | j                  j                  d      }t        g d|j                        }t        ||j	                                t        | j                  |g      }t        g d|j                        }t        ||j	                                y )N)re   re   re   re   rV   r2   )rX   rX   rX   rX   )re   re   re   re   rX   rX   rX   rX   )r   r   rW   r    get_precisionr  r   )r   r   with_precisionmixeds       r*   test_get_precisionz"TestGeomMethods.test_get_precision	  s    .d6P6P6V6VWHd&@&@&N&N&PQ33AA!D.n6J6JKHn&B&B&DE22NCDB%++VHe&9&9&;<r,   c           
      \   t        t        ddg      t        ddg      d t        ddg      t        dd      gt        dd      d	      }t	        || j
                  j                  d             t        t        dd
g      t        dd
g      d t        ddg      d gt        dd      d	      }t	        || j
                  j                  d             t        t        dd
g      t        dd
g      d t        ddg      t        dd      gt        dd      d	      }t	        || j
                  j                  d             t        t        ddg      t        dd
g      d t        ddg      t        dd      gt        dd      d	      }t	        || j
                  j                  g d             y )NrC   rm   r0   r1   r   r8   rq   rS   r   rn   ro   r9   r2   rj   )r   r2   r2   rj   r   )r   r
   r   r   r    r   get_geometryr  s     r*   test_get_geometryz!TestGeomMethods.test_get_geometry	  s   FG,-FG,-FF+,a 1+

 	Hdhh&;&;A&>?GW-.GW-.FF+, 1+

 	Hdhh&;&;A&>?GW-.GW-.FF+,a 1+

 	Hdhh&;&;B&?@FG,-GW-.FF+,a 1+

 	Hdhh&;&;<L&MNr,   )F)__name__
__module____qualname__r   r   r   r   r   r   r   r   markskipifr   r   r   r   r   r   r  r  r  r  r  r  r  r  r  r!  r%  r.  r1  r:  r=  rA  rF  rI  r6  geos_versionrM  rQ  rS  rX  r]  ri  rl  ro  r|  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r   r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r  r  parametrizer   r
   r   r  r  r  r*  r.  rB  rE  rJ  rN  rR  rT  rY  r]  rc  rg  rk  rq  rv  r{  r}  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r)  r-  r;  r>  r@  rH  rK  rM  rO  rU  rW  r]  r`  re  rg  ri  rn  rs  rw  r  r  r  r  r  r  r  r  r   r	   r  r  r  r  r  r  r  r  r  r  r  r  r2  r,   r*   r.   r.   (   s
   g
R0
?X U:'x  [[J/EFW GW$D
=JL
BP
(O1D> [[J/EF G-(-J$'
JS
 [[,,z9BWXU YU@ [[J/EF G
OS*RS.L`
2S  [[J/EF& G&
8 [[z)2H  

6U,SRQ&	Q&
	U=; [[*]+4W  **" [[*]+4W  
E
E=E>;>< [[M)2HI[[,,z9BWX4 Y J4N [[M)2HI
0 J
0T	%: [[J/EF G= [[M)2IJS KS.%( [[* &&!1FF3C DE CD
 %+	
  [[M)2IJ% K!"% [[.DE2 F2< [[,,z9BWX)7 Y)7VV$CL [[,,z9BWXJ YJ [[,,z9BWX[[=sC5s;	
F YF
 [[M)2HI
 J
G..-F--
/M	
+
+ [[J/EF" G"G.$	J11,83	N'	N'* [[J/EF	L G	L3
8 [[*]+4W  

:$+
	& [[M)2HI< J<&.F [[\D&>:1 ;1" [[\D&>:1 ;1$ [[\D&>:1 ;1<8<6 [[],<= 1 > 1D [[],<=$1 >$1L [[],<=1 >1@8:8$8888 [[Z&*)=>F ?F-AO [[M)2HIX JX:RQ0

 [[M)2HI4 J4 [[V\2/ 3/ J [[V\27 37 )GB BB: [[,,z9BWX[[ *%MNO*%EFG
 '"RST'"JKL		
U YUQ
PC>.
`6@ [[,,z9BWXM YM [[z)2P  8
8
t [[y(1O  ,
,
\=3Or,   r.   )1r`   r   numpyr#   r[   r   r   r   r   r   r6  r   shapely.geometryr	   r
   r   r   r   r   r   r   shapely.geometry.collectionr   shapely.opsr   	geopandasr   r   geopandas._compatr   r   r   geopandas.baser   r   geopandas.testingr   geopandas.tests.utilr   r   r   numpy.testingr   pandas.testingr   r   r    r+   r.   r2  r,   r*   <module>r     se       ? ?  	 	 	 ; # - D D (  7 X X , V V.C'O C'Or,   