
    jjr                        S SK r S SKrS SKrS SKrS SKJr  S SKJr  S SKJ	r	  S SK
rS SKJrJrJrJr  S SKJr  S SKrS SKJrJrJrJrJr  S SKrS SKJrJrJrJr  S S	KJr  S S
K J!r!  S SK"J#r#J$r$J%r%J&r&J'r'J(r(J)r)J*r*J+r+J,r,J-r-  S SK.r.S SK/J0r0J1r1  S SK2J3r3  S SK4J5r5  \Rl                  " \Rn                  Rq                  \95      5      S-  r:\.Rv                  " S5      r<S SK=J>r?  S SK@JArB  S SK<JCrC  \.R                  " S\.R                  " S5      /S9S 5       rFS rGS rHS rIS rJS rKS rLS rMS rN\.R                  R                  SS0 S 4S!SS".S#4S!S$S%.S&4/ S$S'.S&4S!/ S$S(.S)4S!S!0 0S$S(.S*4S!S!SSS+.0S$S(.S,4S!S!SS-S+.0S$S(.S,4/	5      S. 5       rQS/ rRS0 rS\3R                  " S15      S2 5       rUS3 rV\.R                  R                  S4/ S5Q5      S6 5       rW\.R                  R                  S4/ S5Q5      S7 5       rX\.R                  R                  S4/ S5Q5      S8 5       rYS9 rZS: r[\.R                  R                  S;/ S<Q5      S= 5       r\\.R                  R                  S;/ S>Q5      S? 5       r]S@ r^SA r_SB r`\.R                  R                  SCSDSE0S 4SD\(" 0 5      0S 4SD\(" S!SF05      0S#4/5      SG 5       raSH rbSI rcSJ rdSK reSL rfSM rgSN rhSO riSP rjSQ rk\.R                  R                  SR/ S//5      SS 5       rl\.R                  R                  \	" \<R                  5      \	" ST5      :  SUSV9\.R                  R                  SWSS/5      SX 5       5       ro\.R                  R                  SWSS/5      SY 5       rp\.R                  R                  SWSS/5      SZ 5       rq\.R                  R                  \R                  S[:  S\SV9S] 5       rs\.R                  R                  \R                  S[:  S^SV9S_ 5       rt\.R                  R                  S`\" SS/S/\$-   5      5      Sa 5       ru\.R                  R                  Sb/ ScQ5      Sd 5       rvSe rwSf rxSg ry\.R                  R                  Sh/ SiQ5      Sj 5       rz\.R                  R                  Sh/ SiQ5      Sk 5       r{Sl r|\.R                  R                  Sm\" SnSo5      SpSqSpSqSr.4\" SsSt/5      SpSpSqSqSr.4\" / SuQ5      SpSpSqSqSr.4\" \" S S SnSn5      \" SvSvSoSo5      \" SwSwSxSx5      /5      SySySzSzSr.4// S{QS|9S} 5       r}S~ r~\.R                  R                  SSRS/5      S 5       r\.R                  R                  SSRS/5      S 5       r\.R                  R                  S\" SsSt/5      S4\" SsSt/5      S4\" SsSt/5      S4\" / SQ5      S4\" / SQ5      S4\" / SQ5      S4\" / SQ5      S4\" / SQ5      S4/5      S 5       rS rS rS rS r\.R                  R                  SS/\?GR                  " S5      S:  /5      S 5       r\.R                  R                  SSS/\?GR                  " S5      S:  \?GR                  " S5      S:  -  /5      S 5       rS rS rS rS rg)    N)BytesIO)product)Version)
ArrowDtype	DataFrameIndexSeries)read_parquet)
LineStringMultiPolygonPointPolygonbox)GeoDataFrameread_feather	read_filer
   )
HAS_PYPROJ)to_wkb)METADATA_VERSIONSUPPORTED_VERSIONS_convert_bbox_to_parquet_filter_create_metadata_decode_metadata_encode_metadata_geopandas_to_arrow_get_filesystem_path#_remove_id_from_member_of_ensembles_validate_dataframe_validate_geo_metadata)assert_geodataframe_equalassert_geoseries_equal)mock)assert_frame_equaldatapyarrow)featherparquetr&   )paramsc                     U R                   S:X  a  [        [        R                  4$ U R                   S:X  a  [        [        R
                  4$ g )Nr'   r&   )paramr
   r   
to_parquetr   
to_feather)requests    `/var/www/html/Sattelite-Image/venv/lib/python3.13/site-packages/geopandas/io/tests/test_arrow.pyfile_formatr/   2   sA    }}	!\4444	)	#\4444 
$    c                    [        U 5      n[        USS0S9n[        U[        5      (       d   eUS   [        :X  d   eUS   S:X  d   eSUS   ;   d   e[
        (       a6  UR                  R                  5       n[        U5        US   S   S   U:X  d   eUS   S   S   S:X  d   eUS   S   S	   S
S/:X  d   e[        R                  " US   S   S   UR                  R                  5      (       d   eUS   S   S:X  d   eUS   S   [        R                  :X  d   e[        USS0S9nUS   S:X  d   eUS   S   S   S:X  d   e[        U5      nUS   S   S   S:X  d   eg )NgeometryWKBgeometry_encodingversionprimary_columncolumnscrsencodinggeometry_typesr   r   bboxcreatorlibrary	geopandaspoint1.1.0)r   r   
isinstancedictr   r   r9   to_json_dictr   nparray_equalr2   total_boundsr?   __version__)naturalearth_lowresdfmetadatacrs_expecteds       r.   test_create_metadatarM   :   s   	&	'Bz56IJHh%%%%I"2222$%333),,,,zvv**,+L9	":.u5EEEIz*:6%???Iz*+;<A   
 >>J'/1I1I    Iy)[888Iy)Y-B-BBBB  z76KLHI')))Iz*:6'AAA  #HIz*:6%???r0   c                     / SQn [         R                  " U [        SS5      [        SSS5      [        / SQ5      [        / SQ5      [	        / SQ5      [	        / SQ5      [        [	        / SQ5      [	        / S	Q5      /5      [        [	        / SQ5      [	        / S
Q5      /5      /S.5      n[        USS0S9n[        US   S   S   5      [        U 5      :X  d   e[        UR                  SS S2   SS0S9n[        S US   S   S    5       5      (       d   e[        UR                  SS SS0S9nUS   S   S   SS/:X  d   eg )N)r   zPoint Zr   zLineString Zr   	Polygon Zr   zMultiPolygon Z         )r   r   rP   rP   )rQ   rQ   ))r   r   rP   )rP   rP   rQ   )rQ   rQ   rR   )rS   )r   rP   rT   )rP   r   ))r   r   r   )r   rP         ?)rP   rP   rP   )rP   r   rU   ))rU   rU   )rU         ?)rV   rV   )rV   rU   ))rU   rU   rP   )rU   rV   rV   )rV   rV   rQ   )rV   rU   rV   )geo_typer2   r2   r3   r4   r8   r;   c              3   D   #    U  H  nUR                  S 5      v   M     g7f)z ZN)endswith).0	geom_types     r.   	<genexpr>9test_create_metadata_with_z_geometries.<locals>.<genexpr>   s%      JI 	4  Js          r   rO   )
r?   r   r   r   r   r   r   sortedilocall)r;   rJ   rK   s      r.   &test_create_metadata_with_z_geometriesrc   ]   s   	N 
		&aaA34<=89HI @A PQ  PQ
	

B@  z56IJH(9%j12BCDI     1*eATUH !),Z89IJ    
  !U@STHIz*+;<A   r0   c                     [         R                  " S5      n U R                  S5      nUR                  5       nSnSU;   a  SnSUS   S   S   ;   d   e[	        U5        U(       a  SUS   S   S   ;  d   eU R                  U5      U:X  d   eg )	Npyproj	EPSG:4326Fdatum_ensembleTidmembersr   )pytestimportorskipCRSrD   r   )re   r9   crs_jsoncheck_ensembles       r.    test_crs_metadata_datum_ensemblero      s      *F **[
!C!HN8#x 01)<Q????'18$45i@CCCC::h3&&&r0   c                 J   [         R                  " [        SSSS5      /SS9n[        R                  " [
        SS9   [        USS9  S S S 5        [        R                  " [
        S	S9   UR                  U S
SS9  S S S 5        g ! , (       d  f       NB= f! , (       d  f       g = f)Nr   
   rf   r2   r9   zschema_version must be one ofmatchinvalidschema_versionzB'geoarrow' encoding is only supported with schema version >= 1.1.0z1.0.0geoarrow)rw   r5   )r?   r   r   rj   raises
ValueErrorr   r+   tmp_pathgdfs     r.   (test_write_metadata_invalid_spec_versionr~      s    

 
 3q!R+<*=;
OC	z)H	IY7 
J 
R
 	x:V	
 
 
J	I
 
s   B(B
B
B"c                  2    SS0n Sn[        U 5      U:X  d   eg )Nab
   {"a": "b"})r   )rK   expecteds     r.   test_encode_metadatar      s#    SzHHH%111r0   c                  N    Sn SS0n[        U 5      U:X  d   e[        S 5      b   eg )Nr   r   r   )r   )metadata_strr   s     r.   test_decode_metadatar      s4     LSzHL)X555D!)))r0   c                    [        U 5      n[        U5        [        UR                  S5      5        SUS'   [        R                  " [
        5         [        U5        S S S 5        [        R                  " [
        5         [        UR                  S5      5        S S S 5        [        R                  " [
        5         [        S5        S S S 5        g ! , (       d  f       Nz= f! , (       d  f       NN= f! , (       d  f       g = f)Niso_a3rP   r   znot a dataframe)r   r   	set_indexrj   ry   rz   )rI   rJ   s     r.   test_validate_dataframer      s    	&	'B X./ BqE 
z	"B 
# 
z	"BLLO, 
# 
z	"-. 
#	" 
#	" 
#	" 
#	"s$   C>C!;C2
C!
C/2
D c                      [        SSS SS.0SS.5        [        SSS SS.0SS.5        [        SSSS	S
S.0SS.0SS.5        g )Nr2   r3   r9   r:   0.1.0)r7   r8   rw   	<version>r7   r8   r6   rh   EPSGi  )	authoritycoder@   0.4.0)r    r0   r.    test_validate_geo_metadata_validr      s~    ("De$DE%	
 ("De$DE"	
 ( FDA
 !(	 	
r0   zmetadata,error)N9Missing or malformed geo metadata in Parquet/Feather filer   foo)r7   r8   z>'geo' metadata in Parquet/Feather file is missing required keyr   )r7   r6   z?'geo' metadata in Parquet/Feather file is missing required key:)r8   r6   r   z*'columns' in 'geo' metadata must be a dictzZ'geo' metadata in Parquet/Feather file is missing required key 'encoding' for column 'foo'r   zOnly WKB geometry encodingBKWc                     [         R                  " [        US9   [        U 5        S S S 5        g ! , (       d  f       g = f)Nrs   )rj   ry   rz   r   )rK   errors     r.   "test_validate_geo_metadata_invalidr     s'    h 
z	/x( 
0	/	/s   /
=c                      SSS SSS.0SS.n [         R                  " [        SS9   [        U 5        S S S 5        g ! , (       d  f       g = f)	Nr2   r3   	spherical)r9   r:   edges1.0.0-beta.1r   zDThe geo metadata indicate that column 'geometry' has spherical edgesrs   )rj   warnsUserWarningr   )rK   s    r.    test_validate_geo_metadata_edgesr   9  sL    $%+ VW!H
 
T
 	x(	
 
 
s	   ;
A	c                     [        / SQ// SQ[        SS5      /S9n[        R                  " [        SS9   UR                  U S-  SS	9  S S S 5        g ! , (       d  f       g = f)
NrP   rQ   rR   r   r   r   rP   r$   r8   r2   zaGeoPandas only supports using pyarrow as the engine for to_parquet: 'fastparquet' passed instead.rs   test.parquetfastparquetengine)r   r   rj   ry   rz   r+   )tmpdirrJ   s     r.   'test_to_parquet_fails_on_invalid_enginer   F  sW    	I;5QRTU;-	XB	8
 	f~-mD
 
 
s   A
A zgeopandas.io.arrow._to_parquetc           
          [        / SQ// SQ[        SS5      /S9nUR                  SSS9  U R                  USSS	S S S
S9  g )Nr   r   rP   r    r%   r   snappyr3   F)compressionr5   indexrw   write_covering_bbox)r   r   r+   assert_called_with)mock_to_parquetrJ   s     r.   *test_to_parquet_does_not_pass_engine_alongr   S  sV    	I;5QRTU;-	XBMM"YM' &&

! ' r0   c                     [        / SQ/ SQS.5      n[        R                  R                  [	        U 5      S5      nUR                  U5        [        U5      n[        X5        g )Nr   )r   r   c)r   r   test.pq)r   ospathjoinstrr+   pd_read_parquetr#   r   rJ   filenamepq_dfs       r.   test_pandas_parquet_roundtrip1r   f  sG    	9	:Bww||CK3HMM(H%Er!r0   test_dataset)rI   naturalearth_citiesnybb_filenamec                 
   UR                  U 5      n[        [        U5      R                  S/S95      n[        R
                  R                  [        U5      S5      nUR                  U5        [        U5      n[        XF5        g )Nr2   r8   r   )getfixturevaluer   r   dropr   r   r   r   r+   r   r#   )r   r   r-   r   rJ   r   r   s          r.   test_pandas_parquet_roundtrip2r   q  sh     ""<0D	9T?'''=	>Bww||CK3HMM(H%Er!r0   c                 |   UR                  U5      nUu  pV[        U5      nUR                  5       n[        R                  R                  [        U 5      S5      n	U" Xy5        [        R                  R                  U	5      (       d   e[        Xx5        U" U	5      n
[        U
[        5      (       d   e[        Xz5        g)zWWriting to parquet should not raise errors, and should not alter original
GeoDataFrame
r   N)r   r   copyr   r   r   r   existsr    rB   r   )r   r/   r   r-   r   readerwriterrJ   origr   r   s              r.   test_roundtripr     s     ""<0D NF	4B779Dww||CK3H
277>>(#### b' 8Ee\****b(r0   c                 B   UR                  U5      nU u  pE[        U5      nUR                  5       n[        5       nU" Xh5        UR	                  S5        [        Xg5        U" [        UR                  5       5      5      n	[        U	[        5      (       d   e[        Xi5        g)z'Should be able to roundtrip in BytesIO.r   N)	r   r   r   r   seekr    getvaluerB   r   )
r/   r   r-   r   r   r   rJ   r   bufr   s
             r.   test_roundtrip_bytesior     s    
 ""<0D NF	4B779D
)C
2OHHQK b' 73<<>*+Ee\****b(r0   c                 h   Uu  p4[        U5      R                  S5      n[        R                  R	                  [        U 5      S5      nU" XVSS9  U" U5      n[        XW5        [        R                  R	                  [        U 5      S5      nU" XVSS9  U" U5      n[        UR                  SS9U5        g)	zoSetting index=`True` should preserve index in output, and
setting index=`False` should drop index from output.
r   ztest_with_index.pqTr   zdrop_index.pqF)r   N)r   r   r   r   r   r   r    reset_indexr   r/   rI   r   r   rJ   r   r   s           r.   
test_indexr     s     !NF	&	'	1	1(	;Bww||CK)=>H
2t$8Eb(ww||CK9H
2u%8Ebnn$n7?r0   c                 <   Uu  p4[        U5      nUR                  S5      nUR                  R                  5       US'   [	        U5      n/ SQnUR                  U5      nU[        L a@  [        R                  R                  [        U 5      S5      n[        R                  " Xh5        O?[        R                  R                  [        U 5      S5      n[        R                  " Xh5        U" U5      n	[        U	R                   5      USS :X  d   e[#        XUSS    5        g)z7The order of columns should be preserved in the output.r   geom2)r   r   pop_est	continentnamer2   
gdp_md_estztest_column_order.pqztest_column_order.featherrP   N)r   r   r2   representative_pointr   selectr
   r   r   r   r   pqwrite_tabler&   write_featherlistr8   r    )
r   r/   rI   r   r   rJ   tablecustom_column_orderr   results
             r.   test_column_orderr     s     NF	&	'B	h	B++224BwK#E LL,-E77<<F-CD
u'77<<F-HIe.HF#6qr#::::f)<QR)@&ABr0   r   )r   gzipbrotlilz4zstdNc                     [        U5      n[        R                  R                  [	        U5      S5      nUR                  X@S9  [        U5      n[        U[        5      (       d   e[        X55        g)]Using compression options should not raise errors, and should
return identical GeoDataFrame.
r   r   N)
r   r   r   r   r   r+   r
   rB   r   r    r   r   rI   rJ   r   r   s         r.   test_parquet_compressionr     sZ     
&	'Bww||CK3HMM(M4"Ee\****b(r0   )uncompressedr   r   c                     [        U5      n[        R                  R                  [	        U5      S5      nUR                  X@S9  [        U5      n[        U[        5      (       d   e[        X55        g)r   ztest.featherr   N)
r   r   r   r   r   r,   r   rB   r   r    r   s         r.   test_feather_compressionr     sZ     
&	'Bww||CK8HMM(M4"Ee\****b(r0   c                    Uu  p4[        U5      nUR                  R                  5       US'   [        R                  R                  [        U 5      S5      nU" XV5        [        R                  R                  U5      (       d   eU" U5      n[        U[        5      (       d   e[        XW5        [        UR                  UR                  SS9  g)z~If multiple geometry columns are present when written to parquet,
they should all be returned as such when read from parquet.
r   r   T)check_geom_typeN)r   r2   r   r   r   r   r   r   rB   r   r    r!   r   r   s           r.   test_parquet_multiple_geom_colsr     s     !NF	&	'B++""$BwKww||CK3H
277>>(####8Ee\****b(288U[[$Gr0   c                 V   [        U5      n[        U5      n[        US   R                  5      US'   [        R
                  R                  [        U 5      S5      nUR                  U5        [        R                  " [        SS9   [        U5        SSS5        g! , (       d  f       g= f)zlMissing geo metadata, such as from a parquet file created
from a pandas DataFrame, will raise a ValueError.
r2   r   -Missing geo metadata in Parquet/Feather file.rs   N)r   r   r   valuesr   r   r   r   r+   rj   ry   rz   r
   r   rI   rJ   r   s       r.   test_parquet_missing_metadatar   !  s    
 
&	'B 
2B BzN112BzNww||CK3H MM( 
I
 	X
 
 
s   B
B(c                 4   SSK Jn  [        R                  S/ SQ05      n[        R
                  R                  [        U 5      S5      nUR                  " X#5        [        R                  " [        SS9   [        U5        SSS5        g! , (       d  f       g= f)zMissing geo metadata, such as from a parquet file created
from a pyarrow Table (which will also not contain pandas metadata),
will raise a ValueError.
r   Nr   r   r   r   rs   )pyarrow.parquetr'   r%   r   r   r   r   r   r   rj   ry   rz   r
   )r   r   r   r   s       r.   test_parquet_missing_metadata2r  :  sn    
 !MM3	*+Eww||CK3H NN5# 
I
 	X
 
 
s   4B		
Bzgeo_meta,errorgeor0   barc                    SSK JnJn  [        U5      n[	        U5      n[        US   R                  5      US'   UR                  U5      nUR                  R                  nUR                  U5        UR                  U5      n[        R                  R                  [        U 5      S5      n	UR!                  Xy5        ["        R$                  " [&        US9   [)        U	5        SSS5        g! , (       d  f       g= f)zHas geo metadata with missing required fields will raise a ValueError.

This requires writing the parquet file directly below, so that we can
control the metadata that is written for this test.
r   )Tabler'   r2   r   rs   N)r%   r  r'   r   r   r   r   from_pandasschemarK   updatereplace_schema_metadatar   r   r   r   r   rj   ry   rz   r
   )
r   geo_metar   rI   r  r'   rJ   r   rK   r   s
             r.   test_parquet_invalid_metadatar  N  s    * '	&	'B 
2BBzN112BzNb!E||$$HOOH))(3Eww||CK3H(	z	/X 
0	/	/s   C++
C9c                 .   Uu  p4[        U5      n[        R                  R                  [	        U 5      S5      nU" XV5        U" USS/S9n[        USS/   U5        [        R                  " [        SS9   U" US/S9  SSS5        g! , (       d  f       g= f)zOReading a subset of columns should correctly decode selected geometry
columns.
r   r   r2   r   4No geometry columns are included in the columns readrs   N)	r   r   r   r   r   r    rj   ry   rz   r   s           r.   test_subset_columnsr  w  s     !NF	&	'Bww||CK3H
28fj%9:Eb&*!56>	P
 	x&*
 
 
s   4	B
Bc                    Uu  p4[        U5      nUR                  R                  5       US'   [        R                  R                  [        U 5      S5      nU" XV5        U" USS/S9n[        UR                  S5      SS/   U5        UR                  R                  5       US'   U" XV5        [        R                  " [        SS9   U" U/ SQS9nS	S	S	5        [        UR                  S5      / SQ   U5        g	! , (       d  f       N/= f)
zReading a subset of columns that does not include the primary geometry
column should promote the first geometry column present.
r   r   r   r   geom3zEMultiple non-primary geometry columns read from Parquet/Feather file.rs   )r   r   r  N)r   r2   r   r   r   r   r   r    set_geometryrj   r   r   r   s           r.   test_promote_secondary_geometryr    s     !NF	&	'B++""$BwKww||CK3H
28fg%67Eboog67HI5Q++""$BwK
2	U
 x)CD	
 
 !;<e
 
s   
C88
Dc                     Uu  p4[        U5      n[        R                  R                  [	        U 5      S5      nU" XV5        [
        R                  " [        5         U" US/S9  SSS5        g! , (       d  f       g= f)z\Reading a parquet file that is missing all of the geometry columns
should raise a ValueErrorr   r   r   N)r   r   r   r   r   rj   ry   rz   )r   r/   rI   r   r   rJ   r   s          r.   test_columns_no_geometryr    sZ     !NF	&	'Bww||CK3H
2	z	"x&* 
#	"	"s   	A--
A;c                     Uu  p4[        U5      nSUR                  R                  l        [        R
                  R                  [        U 5      S5      nU" XV5        U" U5      nUR                  b   e[        XWSS9  g)z[If CRS is `None`, it should be properly handled
and remain `None` when read from parquet`.
Nr   T	check_crs)	r   r2   arrayr9   r   r   r   r   r    r   s           r.   test_missing_crsr    sl     !NF	&	'B BKKww||CK3H
28E99b48r0   c                 |    [        SSS/05      nUR                  U S-  5        [        U S-  5      n[        X5        g )Nr   rP   rQ   r   )r   r+   r   r#   )r|   rJ   r   s      r.   test_default_geo_col_writesr    s<    	sQFm	$BMM(Y&'Hy01Er!r0   c                    [         R                  " S5      nSS Kn " S SUR                  R                  R
                  5      nUR                  SUSS9  U" SS9n[        U 5      nUR                  S	S
5       nUR                  U5        S S S 5        [        SSS0S9n[        Xu5        [        SUS9n[        Xu5        UR                  SUR                  R                  R
                  SS9  g ! , (       d  f       Nj= f)Nfsspecr   c                   (   ^  \ rS rSrU 4S jrSrU =r$ )+test_fsspec_url.<locals>.MyMemoryFileSystemi  c                 2   > Xl         [        TU ]  " U0 UD6  g )N)is_setsuper__init__)selfr"  argskwargs	__class__s       r.   r$  4test_fsspec_url.<locals>.MyMemoryFileSystem.__init__  s     KGd-f-r0   r"  )__name__
__module____qualname____firstlineno__r$  __static_attributes____classcell__)r(  s   @r.   MyMemoryFileSystemr     s    	. 	.r0   r1  memoryT)clobberr*  zdata.parquetwbzmemory://data.parquetr"  storage_options)
filesystem)rj   rk   fsspec.implementations.memoryimplementationsr2  MemoryFileSystemregister_implementationr   openr+   r
   r    )rI   _r  r1  memfsrJ   fr   s           r.   test_fsspec_urlr@    s    H%A(.V33::KK . ""8-?"Nd+E	&	'B	ND	)Q
a 
* 1HdCSTFf)1eDFf) ""&((//@@$ #  
*	)s   8C..
C<c                     [         R                  " [        SS9   [        U SS0S9  S S S 5        g ! , (       d  f       g = f)Nr6  rs   r   r  r5  )rj   ry   rz   r
   )rI   s    r.   /test_non_fsspec_url_with_storage_options_raisesrB    s,    	z):	;(5%.I 
<	;	;s   0
>c                  t    [        S5      u  p[        U [        R                  R                  5      (       d   eg )Nzfile:///data.parquet)r   rB   r%   fsLocalFileSystem)r7  r=  s     r.   test_prefers_pyarrow_fsrF    s,    ()?@MJj'**"<"<====r0   c                     [         R                  " [        SSSS5      /SS9n SnU R                  U5        [         R                  " U5      n[        XSS9  [        R                  " [        R                  R                  U5      5        g )Nr   rq   	epsg:4326rr   z~/test_file.parquetTr  )
r?   r   r   r+   r
   r    r   remover   
expanduser)r}   	test_filer   s      r.   #test_write_read_parquet_expand_userrL    sh    

 
 3q!R+<*=;
OC%INN9""9-EcD9IIbgg  +,r0   c                     [         R                  " [        SSSS5      /SS9n SnU R                  U5        [         R                  " U5      n[        XSS9  [        R                  " [        R                  R                  U5      5        g )Nr   rq   rH  rr   z~/test_file.featherTr  )
r?   r   r   r,   r   r    r   rI  r   rJ  )r}   rK  f_dfs      r.   #test_write_read_feather_expand_userrO    sh    

 
 3q!R+<*=;
OC%INN9!!),Dc48IIbgg  +,r0   r2   c                 (   [         R                  " SS/[        U5      -  0US9nUR                  U S-  5        SSKJn  U" U S-  5      n[        R                  " UR                  R                  S   5      nSUS	   S
   ;   d   eSUS	   S
   ;  d   eg )NcolrP   r2   r   r   
read_table   geor:   r8   r2   r<   )
r?   r   lenr+   r  rT  jsonloadsr  rK   )r   r2   r}   rT  r   rK   s         r.   test_write_empty_bboxrY    s     
 
 %!s8})<!=
QCNN6N*+*v./Ezz%,,//78H),Z8888),Z8888r0   z19.0.0z>This version of pyarrow does not support reading complex types)reasonformatc                    [         R                  R                  [        U 5      SU 35      n[	        [
        R                  5       5      n[	        [
        R                  5       5      n[	        [
        R                  [
        R                  S[
        R                  5       5      /5      5      n[        S/[	        [
        R                  5       5      S9n[        R                  " [        SSSS5      /[        S/XcS9[        S/XdS9[        SS	0/XeS9S
.US9nUS:X  a  UR                  U5        [         nOUR#                  U5        [$        nU" US[        0S9n	['        U	[        R                  5      (       d   eU	R(                  S   U:X  d   eU	R(                  S   U:X  d   eU	R(                  S   U:X  d   e[+        XSS9  g )Ntest.r   r   dtyperq   rP   r   r_  r   r  )r2   isr   r   r&   types_mapper)to_pandas_kwargsra  rb  r   T)check_dtype)r   r   r   r   r   r%   int64stringstructfieldr   r?   r   r   r	   r,   r   r+   r
   rB   dtypesr    )
r   r[  r   int_typestr_typecomplex_typer   r}   	read_funcgdf_roundtrips
             r.    test_write_read_to_pandas_kwargsrp    s    ww||CK5)9:H '--/*H'..*+HgnngmmE7>>CS.T-UVWL1#Z89E

 
 Q2r*+59U;%(J		
 C x  	x  	 h.*9UVMmY%;%;<<<<$000$000$444mdCr0   c           	         [         R                  R                  [        U 5      SU 35      n[	        [
        R                  [
        R                  S[
        R                  5       5      /5      5      n[        S/[	        [
        R                  5       5      S9n[        R                  " [        SSSS5      /[        SS0/XCS9S.US	9nUS
:X  a  UR                  U5        [         nOUR#                  U5        [$        n[&        R(                  " S5      n[*        R,                  " [.        US9   U" U5        S S S 5        g ! , (       d  f       g = f)Nr]  r   r   r^  rq   r  r`  )r2   r   r   r&   z7data type 'struct<foo: string>[pyarrow]' not understoodrs   )r   r   r   r   r   r%   rh  ri  rg  r   rf  r?   r   r   r	   r,   r   r+   r
   reescaperj   ry   	TypeError)r   r[  r   rm  r   r}   rn  rt   s           r.   /test_read_complex_type_with_numpy_backend_xfailru  B  s    ww||CK5)9:HgnngmmE7>>CS.T-UVWL1#Z89E

 
 Q2r*+%(J	
 C x  	x  	
 IIOPE	y	.( 
/	.	.s   ,	D>>
Ec                 b   [         R                  " S5      nUS:X  a  SSKJn  OSSKJn  [        R                  R                  [        U 5      SU 35      n[        R                  " [        SSSS5      /S9n[        U5      nUR                  R                  n[!        US	   5      nUS
   S   S	 UR#                  S	[%        U5      05        UR'                  U5      nU" Xd5        [)        [        SU 35      n	U	" U5      n
U
R*                  R-                  UR/                  S5      5      (       d   eg )Nre   r&   r   )r   )r   r]  rq   rR  rU  r8   r2   r9   read_	OGC:CRS84)rj   rk   pyarrow.featherr   r  r   r   r   r   r   r?   r   r   r   r  rK   r   r	  r   r
  getattrr9   equalsrl   )r   r[  re   writer   r}   r   rK   geo_metadatareadrJ   s              r.   test_write_read_default_crsr  ]  s     *F:8ww||CK5)9:H

 
 3q!R+<*=
>C$E ||$$H#HV$45LY
+E2OOV-l;<=))(3E	%9fX./D	hB66==K01111r0   )rR   rq   r   zrequires GEOS>=3.10c                 
   [         R                  " [         R                  R                  S/5      S9nUR	                  U S-  5        SSKJn  U" U S-  5      nUS   S   R                  5       R                  5       nUS:X  d   eg )NPOINT Z (1 2 3)rR  r   r   rS  r2   :01e9030000000000000000f03f00000000000000400000000000000840)	r?   r   	GeoSeriesfrom_wktr+   r  rT  as_pyhex)r   r}   rT  r   wkbs        r.   test_write_iso_wkbr  w  s    

 
 $$--/@.ABC NN6N*+*v./E


A

$
$
&
*
*
,C NNNNr0   ztests GEOS<3.10c                     [         R                  " [         R                  R                  S/5      S9n[        R
                  " [        SS9   UR                  U S-  5        S S S 5        g ! , (       d  f       g = f)Nr  rR  zCannot write 3Drs   r   )r?   r   r  r  rj   ry   rz   r+   )r   r}   s     r.   test_write_iso_wkb_old_geosr    sX    

 
 $$--/@.ABC 
z):	;v./ 
<	;	;s   A**
A8zformat,schema_versionc                 l   US:X  a  SSK Jn  OSSKJn  [        R                  R                  [        U 5      SU 35      n[        R                  " [        SSSS5      /SS9n[        USU 35      nU" XBS	9  [        [        S
U 35      nU" U5      n[        X5        U=(       d    [        nU" U5      n	[        R                  " U	R                  R                   S   5      n
U
S   U:X  d   e["        (       af  US:X  a*  U
S   S   S   UR$                  R'                  5       :X  d   eO6UR$                  R)                  5       n[+        U5        U
S   S   S   U:X  d   e[-        U5      [-        S5      ::  a   SU
S   S   ;   d   eU
S   S   S   S:X  d   eg SU
S   S   ;   d   eU
S   S   S   S/:X  d   eg )Nr&   r   rS  r]  rq   rf   rr   to_rv   rw  rU  r6   r   r8   r2   r9   r   geometry_typer   r;   )ry  rT  r  r   r   r   r   r?   r   r   rz  r    r   rW  rX  r  rK   r   r9   to_wktrD   r   r   )r   r[  rw   rT  r   r}   r|  r~  rJ   r   rK   rL   s               r.   test_write_spec_versionr    s   
 ..ww||CK5)9:H

 
 3q!R+<*=;
OCC3vh(E	(2 9fX./D	hBb& $7'7Nx Ezz%,,//78HI.000 zW$I&z259SWW^^=MMMM 77//1L/=I&z259\III ~''"22(9"5j"AAAA	":.?9LLL8I#6z#BBBB	":./?@YKOOOr0   r6   )r   r   r   c                 ^   [         R                  " SS/SS/SS/S.[        [        SSSS5      [        SSS	S	5      /5      [        S
S
SS5      /SS9n[         R                  " [
        S-  SU  S3-  5      n[        X!SS9  [         R                  " [
        S-  SU  S3-  5      n[        X!SS9  g)aU  
Verify that files for different metadata spec versions can be read
created for each supported version:

# small dummy test dataset (not naturalearth_lowres, as this can change over time)
from shapely.geometry import box, MultiPolygon
df = geopandas.GeoDataFrame(
    {"col_str": ["a", "b"], "col_int": [1, 2], "col_float": [0.1, 0.2]},
    geometry=[MultiPolygon([box(0, 0, 1, 1), box(2, 2, 3, 3)]), box(4, 4, 5,5)],
    crs="EPSG:4326",
)
df.to_feather(DATA_PATH / 'arrow' / f'test_data_v{METADATA_VERSION}.feather')
df.to_parquet(DATA_PATH / 'arrow' / f'test_data_v{METADATA_VERSION}.parquet')
r   r   rP   rQ   皙?皙?col_strcol_int	col_floatr   rR      r^   rf   rr   arrowtest_data_vz.featherTr  z.parquetN)r?   r   r   r   r   	DATA_PATHr    r
   )r6   r   rJ   s      r.   test_read_versioned_filer    s      %%#JAq6c
KAq!QQ1aABC1aQROTH 
			G 3G9H6U U	VBbd;				G 3G9H6U U	VBbd;r0   c                  P   [         R                  " S5        [        R                  " SS/SS/SS/S.[	        [        S	S	SS5      [        SSS
S
5      /5      [        SSSS5      /SS9n [        R                  " [        S-  S-  5      n[        XSS9  [        R                  " [        S-  S-  5      n[        XSS9  [        R                  " [        S-  S-  5      nU R                  S5      n [        XSS9  [        R                  " [        S-  S-  SS9n[        U5      S:X  d   eg)a  
Verify that files written by GDAL can be read by geopandas.
Since it is currently not yet straightforward to install GDAL with
Parquet/Arrow enabled in our conda setup, we are testing with some
generated files included in the repo (using GDAL 3.5.0):

# small dummy test dataset (not naturalearth_lowres, as this can change over time)
from shapely.geometry import box, MultiPolygon
df = geopandas.GeoDataFrame(
    {"col_str": ["a", "b"], "col_int": [1, 2], "col_float": [0.1, 0.2]},
    geometry=[MultiPolygon([box(0, 0, 1, 1), box(2, 2, 3, 3)]), box(4, 4, 5,5)],
    crs="EPSG:4326",
)
df.to_file("test_data.gpkg", GEOMETRY_NAME="geometry")
and then the gpkg file is converted to Parquet/Arrow with:
$ ogr2ogr -f Parquet -lco FID= test_data_gdal350.parquet test_data.gpkg
$ ogr2ogr -f Arrow -lco FID= -lco GEOMETRY_ENCODING=WKB test_data_gdal350.arrow test_data.gpkg

Repeated for GDAL 3.9 which adds a bbox covering column:
$ ogr2ogr -f Parquet -lco FID= test_data_gdal390.parquet test_data.gpkg
re   r   r   rP   rQ   r  r  r  r   rR   r  r^   rf   rr   r  ztest_data_gdal350.parquetTr  ztest_data_gdal350.arrowztest_data_gdal390.parquetrx  )r   r   rQ   rQ   r<   N)rj   rk   r?   r   r   r   r
   r  r    r   to_crsrV  )r   rJ   s     r.   test_read_gdal_filesr    s   , !%%#JAq6c
KAq!QQ1aABC1aQROTH 
			G 36Q Q	RBbd;				G 36O O	PBbd;				G 36Q Q	RB {+Hbd;			G99
B r7a<<r0   c                     [        U5      nU S-  nUR                  5         US S R                  US-  5        USS  R                  US-  5        [        U5      n[	        XB5        g )Npartitioned_datasetd   data1.parquetdata2.parquet)r   mkdirr+   r
   r    )r   rI   rJ   basedirr   s        r.   %test_parquet_read_partitioned_datasetr  	  si     
&	'B ,,GMMOtH/12stH/12'"Ff)r0   c                    [         R                  " S5      n[        U5      nUR                  S5      nUR	                  S5        UR                  SS5       nUS S R                  U5        S S S 5        UR                  SS5       nUSS  R                  U5        S S S 5        [        S5      n[        Xc5        g ! , (       d  f       NT= f! , (       d  f       N6= f)	Nr  r2  r  z!partitioned_dataset/data1.parquetr4  r  z!partitioned_dataset/data2.parquetzmemory://partitioned_dataset)	rj   rk   r   r7  r  r<  r+   r
   r    )r   rI   r  rJ   r>  r?  r   s          r.   ,test_parquet_read_partitioned_dataset_fsspecr    s      *F	&	'B h'E	KK%&	7	>!
4CA 
?	7	>!
34A 
? 89Ff) 
?	>	>	>s   B9C
9
C

Cr  )r@   
linestringpolygon
multipointmultilinestringmultipolygonc                     [         R                  " [        S-  S-  SU  S3-  5      n[         R                  " [        S-  S-  SU  S3-  5      n[        XSS9  g )Nr  
geoparquetdata-z-encoding_native.parquet-encoding_wkb.parquetTr  )r?   r
   r  r    )r  r   r   s      r.   test_read_parquet_geoarrowr  )  s    
 ##
	
	 - 8
9	:F %%
	
	 - 5
6	7H f$?r0   c                     [         R                  " [        S-  S-  SU S3-  5      nUR                  U S-  SS9  [         R                  " U S-  5      n[	        X2SS	9  g )
Nr  r  r  r  r   rx   r4   Tr  )r?   r
   r  r+   r    )r|   r  rJ   r   s       r.   test_geoarrow_roundtripr  =  sq    
 
		
	
	 - 5
6	7
B MM(^+zMJ##H~$=>FfD9r0   c                 B   SSK Jn  [        U5      n[        R                  R                  [        U 5      S5      nUR                  USS9  UR                  U5      n[        R                  " UR                  R                  S   R                  S5      5      nUS   S	   S
   SSS/SS/SS/SS/S.0:X  d   eSUR                  R                  ;   d   eUR                  R                  S5      R                    Vs/ s H  owR"                  PM     sn/ SQ:X  d   eg s  snf )Nr   )r'   r   Tr   rU  zutf-8r8   r2   coveringr<   xminyminxmaxymaxr  r  r  r  )r%   r'   r   r   r   r   r   r+   rT  rW  rX  r  rK   decodenamesri  typer   )r   rI   r'   rJ   r   r   rK   ri  s           r.   +test_to_parquet_bbox_structure_and_metadatar  N  s   	&	'Bww||CK3HMM(M5x(Ezz%,,//7>>wGHHIz*:6V$V$V$V$	
;    U\\'''''$)LL$6$6v$>$C$CD$C5JJ$CD I   Ds   ;Dzgeometry, expected_bboxrP   rR   g      ?g      @r  rT   )rR   rR   ))rQ   rP   )rP   rQ   )rQ   rR   )rR   rQ   rQ   r  r^   g        g      @)r   r   r   Multipolygon)idsc                     SS K Jn  [        SS//SS/U/S9n[        R                  R                  [        U 5      S5      nUR                  USS	9  UR                  " U5      R                  5       nUS
   S   U:X  d   eg )Nr   rP   rQ   r   r   r   r   Tr  r<   )
r  r'   r   r   r   r   r   r+   rT  	to_pandas)r   r2   expected_bboxr   rJ   r   r   s          r.   test_to_parquet_bbox_valuesr  i  sw    * !	QF8c3Z8*	MBww||CK3HMM(M5]]8$..0F&>!---r0   c                     [        SS//SS/[        SS5      /S9n[        R                  R	                  [        U 5      S5      nUR                  USS9  [        US	S
9n[        U5      S:X  d   eUR                  S   [        SS5      :X  d   eg )NrP   rQ   r   r   r   r   Tr  )rP   rP   rP   rP   r  r   )
r   r   r   r   r   r   r+   r
   rV  r2   r   s       r.   #test_read_parquet_bbox_single_pointr    s    	QF8c3Z5A;-	PBww||CK3HMM(M55Eu:??>>!a+++r0   geometry_namecustum_geom_colc                    [        U5      nUS:w  a  UR                  U5      n[        R                  R	                  [        U 5      S5      nUR                  USS9  [        USS9nUS   R                  R                  5       / SQ:X  d   eg )	Nr2   r   Tr  r   r   rq   rq   r  r   	FranceBeninNigeriaCameroonTogoGhanaBurkina FasoGabonz
Eq. Guinea)
r   rename_geometryr   r   r   r   r+   r
   r   tolist)r   rI   r  rJ   r   r   s         r.   test_read_parquet_bboxr    s     
&	'B
".ww||CK3HMM(M57E=&&( 
- 
 
 
r0   c                 (   [        U5      nUS:w  a  UR                  U5      nU S-  nUR                  5         US S R                  US-  SS9  USS  R                  US-  SS9  [	        USS	9nUS
   R
                  R                  5       / SQ:X  d   eg )Nr2   r  r  r  Tr  r  r  r  r   r  )r   r  r  r+   r
   r   r  )r   rI   r  rJ   r  r   s         r.   "test_read_parquet_bbox_partitionedr    s     
&	'B
". ,,GMMOtH/1tLstH/1tL~6E=&&( 
- 
 
 
r0   zgeometry, bbox)rV   rV         @r  )rR   rR   rR   rR   rV   rV         @r  )rS   )r  r   )r  r  )r   r  )rP   rP   rR   rR   )rP   rP   r^   r^   )rQ   rQ   r  r  )r  r  r  r  )rP   rP   r^   rR   c                     [        SS//SS/U/S9n[        R                  R                  [	        U 5      S5      nUR                  USS9  [        XBS	9n[        U5      S:X  d   eg )
NrP   rQ   r   r   r   r   Tr  r  )r   r   r   r   r   r+   r
   rV  )r   r2   r<   rJ   r   r   s         r.   2test_read_parquet_bbox_partial_overlap_of_geometryr    s`     
QF8c3Z8*	MBww||CK3HMM(M5-Eu:??r0   c                    [        U5      n[        R                  R                  [	        U 5      S5      nUR                  U5        [        R                  " [        SS9   [        USS9  S S S 5        g ! , (       d  f       g = f)Nr   Specifying 'bbox' not supportedrs   r   r      r  r  )
r   r   r   r   r   r+   rj   ry   rz   r
   r   s       r.   test_read_parquet_no_bboxr    sY     
&	'Bww||CK3HMM(	z)J	KXN3 
L	K	Ks   A33
Bc                    [        U5      nU S-  nUR                  5         US S R                  US-  5        USS  R                  US-  5        [        R                  " [
        SS9   [        USS9  S S S 5        g ! , (       d  f       g = f)	Nr  r  r  r  r  rs   r  r  )r   r  r+   rj   ry   rz   r
   )r   rI   rJ   r  s       r.   %test_read_parquet_no_bbox_partitionedr    s}     
&	'B ,,GMMOtH/12stH/12	z)J	KW>2 
L	K	Ks   (A<<
B
c                     SS K Jn   SnU R                  " S5      S:  U R                  " S5      S:  -  U R                  " S5      S:  -  U R                  " S5      S:  -  ) nUR                  [	        US	5      5      (       d   eg )
Nr   )r   r      #   )r<   r  r  )r<   r  r  )r<   r  )r<   r  r<   )pyarrow.computecomputeri  r{  r   )pcr<   r   s      r.   #test_convert_bbox_to_parquet_filterr    s     D	"	#b	(88$%*	,88$%)	+ 88$%)	+H ??:4HIIIIr0   c                    [        U5      n[        R                  R                  [	        U 5      S5      nUR                  USS9  [        U5      nSU;  d   e[        USS/S9nSU;  d   e[        UR                  5      SS/:X  d   eg )Nr   Tr  r<   r   r2   r   )	r   r   r   r   r   r+   r
   r   r8   )r   rI   rJ   r   result1result2s         r.   /test_read_parquet_bbox_column_default_behaviourr    s     
&	'Bww||CK3HMM(M58$G   8fj-ABG    VZ$8888r0   filters)r   > N  r   r  c                     [        U5      n[        R                  R                  [	        U 5      S5      nUR                  USS9  [        XBSS9nUS   R                  R                  5       / SQ:X  d   eg )Nr   Tr  r  )r  r<   r   )zDem. Rep. Congor  r  r  r  AlgeriaLibya	r   r   r   r   r   r+   r
   r   r  r   rI   r  rJ   r   r   s         r.   "test_read_parquet_filters_and_bboxr    sm     
&	'Bww||CK3HMM(M5(.IF&>  '') .   r0   )r   r  :  )r   <>  r  r  c                     [        U5      n[        R                  R                  [	        U 5      S5      nUR                  USS9  [        XBS9nUS   R                  R                  5       / SQ:X  d   eg )Nr   Tr  )r  r   )r  
MozambiqueAlbaniar  r  s         r.   &test_read_parquet_filters_without_bboxr  +  sc     
&	'Bww||CK3HMM(M5(4F&>  '')-VVVVr0   c                    SS K Jn  / SQ[        SS5      [        SS5      [        SS5      /S.n[        U5      n[        R
                  R                  [        U 5      S5      n[        USS	S
9nUR                  R                  nUR                  / SQ5      n[        R                  " US   5      nSS/SS/SS/SS/S.US   S   S   S'   UR                  S[        U5      05        UR!                  U5      nUR"                  " XT5        UR$                  " U5      nSUR                  R&                  ;   d   e[)        USS9n	U	S   R*                  R-                  5       S/:X  d   eg )Nr   )point1point2point3rP   rQ   rR   )r   r2   r   rA   T)rw   r   )r   r2   custom_bbox_namerU  r  r  r  r  r  r  r8   r2   r  r<   r  r  r   r  )r  r'   r   r   r   r   r   r   r   r  rK   rename_columnsrW  rX  r	  r   r
  r   rT  r  r
   r   r  )
r   r   r$   rJ   r   r   rK   r}  pq_tabler   s
             r.   :test_read_parquet_file_with_custom_bbox_encoding_fieldnamer
  ;  s_     /1a[%1+uQ{;D 
d	Bww||CK3H
 E
 ||$$H  !IJE::hv./L#V,#V,#V,#V,	?LJ'
3F; OOV-l;<=))(3ENN5#}}X&H!6!6666(<=E=&&(XJ666r0   c                 *   [        U5      nUR                  S/[        U5      -  S9n[        R                  R                  [        U 5      S5      n[        R                  " [        SS9   UR                  USS9  S S S 5        g ! , (       d  f       g = f)Nr   r  r   z9An existing column 'bbox' already exists in the dataframers   Tr  )r   assignrV  r   r   r   r   rj   ry   rz   r+   r   s       r.   )test_to_parquet_with_existing_bbox_columnr  a  ss    	&	'B	c"g	&Bww||CK3H	U
 	hD9
 
 
s   *B
Bc           
      ^   [         R                  " S[        S5      0[        S5       Vs/ s H  n[        X5      PM     snS9nUR	                  U S-  SS9  [         R
                  " U S-  SS9n[        U5      S:X  d   e[         R
                  " U S-  S	S9n[        U5      S
:X  d   eg s  snf )NrQ  rq   rR  r   rx   r4   r  r  )rR   rR   r^   r^   rR   )r?   r   ranger   r+   r
   rV  )r|   ra  rJ   r   s       r.   test_read_parquet_bbox_pointsr  l  s    				b	59%E9aeAk9%E
B MM(^+zMJ##H~$=NSFv;"##H~$=LQFv;! &Fs   B*
c                 0   [        S/ SQ0[        R                  " / SQ/ SQ5      SS9nUS	 [         Ul        UR	                  U S-  5        [
        R                  " [        SS9   [        R                  " U S-  5        S S S 5        g ! , (       d  f       g = f)	NrQ  r   rf   rr   r2   ztest_no_geometry.parquetr  rs   )	r   r?   points_from_xyr(  r+   rj   ry   rz   r
   r{   s     r.   +test_non_geo_parquet_read_with_proper_errorr  y  s     		)))Y?C
 	J !CMNN8889	P
 	x*DDE
 
 
s   $B
B)rW  r   pathlibrr  ior   	itertoolsr   packaging.versionr   numpyrE   pandasr   r   r   r	   r
   r   shapelyshapely.geometryr   r   r   r   r   r?   r   r   r   geopandas._compatr   geopandas.arrayr   geopandas.io.arrowr   r   r   r   r   r   r   r   r   r   r   rj   geopandas.testingr    r!   geopandas.tests.utilr"   pandas.testingr#   Pathr   dirname__file__r  rk   r%   r  r  r  r  r'   r   r&   fixturer*   r/   rM   rc   ro   r~   r   r   r   r   markparametrizer   r   r   patchr   r   r   r   r   r   r   r   r   r   r   r  r  r  r  r  r  r  r@  rB  rF  rL  rO  rY  skipifrH   rp  ru  r  geos_versionr  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  ri  r  r  r
  r  r  r  r   r0   r.   <module>r+     s@    	  	   %  7 7 2  J J  I I ( "     O % -LL23f<	 

i
(    	6<<	#:;<5 =5 @F:z'$	W2*/, F K	HI  %6L	
  %=M	
 {3M	

  %L8	
  %%U.	
 #(!4T#BC&
 )	
 #(!4U#CD&
 )	
O/2f)g2f)

)
E ,- .$" S	"	" S))4 S)).@&C> D)) (GH) I)H,2( 
RS$R()G	

 $eU^45L	

6+(:+9$">J
>
-- b4&\2
9 3
9 G 78#44K   Iy#9: D ;	
 DF Iy#9: ;4 Iy#9:2 ;22 G((:5>STO UO G((J6?PQ0 R0 Y	"TF-?$?@&P	&PR $FG< H<8,^**" W@	@  W
:	
:6 	q!sCcJK'(#sC@	

 45#sC@	

 #aAq/3q!Q?C1aOLM#sC@	
 	;#  &
.'&
., :7H*IJ K0 :7H*IJ K6 	VV$	%';<	VV$	%|4	VV$	%';<	1	2LA	1	2LA	1	2LA	1	2LA	1	2LA	43J9 	#$
&" 
$&@	A
((<
 5
(RXXl-Ce-K	LWW#7L:
Fr0   