
    I.eA                        d Z ddlZddlZddlmZmZ ddlZddlZ	ddl
ZddlZddlmZ ddlmZ ej        j        Zej        j        d         Zej        d             Z G d d	e          Z G d
 de          Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          ZdS )z"
These tests depends on GeoViews.
    N)TestCaseSkipTestproj_to_cartopy)Versionbokehc                  n    t          j        t          j                            dd          ddg          S )N
      xycolumns)pd	DataFramenprandomrand     4lib/python3.11/site-packages/hvplot/tests/testgeo.py	simple_dfr      s+    <	r1--SzBBBBr   c                   "    e Zd Zd ZddZd ZdS )TestGeoc                    t           j        dk    rt          d          	 dd l}dd l}dd l}dd lm} dd l}n#  t          d          xY wdd l	}dd l
}|                    t          j        t                    j        dz  dz                                d          | _        t%          | j        j        j        d                   | _        d S )	Nwin32!Skip geo tests on windows for nowr   z?xarray, rasterio, geoviews, cartopy, or rioxarray not availabledatazRGB-red.byte.tif)bandcrs_wkt)sysplatformr   xarrayrasteriogeoviewscartopy.crscrs	rioxarrayhvplot.xarrayhvplot.pandasopen_rasteriopathlibPath__file__parentiseldar   spatial_refattrs)selfxrr$   r%   ccrsrxrhvplots          r   setUpzTestGeo.setUp   s    <7"">???	^OOOOOO&&&&&&#####	^\]]]##<!!(614FF
 

$A$,, 	 #47#6#<Y#GHHs	   8 A	utmc                     dd l }t          |j                  t          d          k     r|j        j        d         |k    sJ d S |j                                        d         |k    sJ d S )Nr   z0.20proj)cartopyr   __version__r'   proj4_paramsto_dict)r4   plotr<   r=   s       r   	assertCRSzTestGeo.assertCRS.   sr    7&'''&//998(0D8888888##%%f-555555r   c                     t           j                            d|d          }|j        d         j        d         |k    sJ d S )Nr   rA   
projectionr<   )hvStorelookup_optionskwargsr?   )r4   rA   r<   optss       r   assert_projectionzTestGeo.assert_projection5   sA    x&&wf=={<(5f=EEEEEEr   N)r:   )__name__
__module____qualname__r9   rB   rJ   r   r   r   r   r      sN        I I I$6 6 6 6F F F F Fr   r   c                   *     e Zd Z fdZd Zd Z xZS )TestCRSInferencec                     t           j        dk    rt          d          t                                                       d S )Nr   zSkip CRS inference on Windows)r!   r"   r   superr9   )r4   	__class__s    r   r9   zTestCRSInference.setUp<   s4    <7"":;;;r   c                     | j                                         }d|j        _        | j         j                            ddd          }|                     |           d S )NFr   r   z
epsg:32618r'   )r1   copyrio_crsr8   imagerB   r4   r1   rA   s      r   !test_plot_with_crs_as_proj_stringz2TestCRSInference.test_plot_with_crs_as_proj_stringA   sP    W\\^^w~##C,#??tr   c                 t    | j         j                            ddd          }|                     |           d S Nr   r   Tgeo)r1   r8   rX   rB   r4   rA   s     r   (test_plot_with_geo_as_true_crs_undefinedz9TestCRSInference.test_plot_with_geo_as_true_crs_undefinedH   s8    w~##C$#77tr   )rK   rL   rM   r9   rZ   r`   __classcell__)rR   s   @r   rO   rO   :   sV            
        r   rO   c                   J    e Zd Zd Zd Zd Zd Zd Zd Zd Z	d Z
d	 Zd
 ZdS )TestProjectionsc                 ~    | j         j                            dd| j                  }|                     |           d S )Nr   r   rT   )r1   r8   rX   r'   rB   r_   s     r   test_plot_with_crs_as_objectz,TestProjections.test_plot_with_crs_as_objectO   s:    w~##C$(#;;tr   c                     | j                                         }d|j        _        d| j        i|_        |j                            ddd          }|                     |           d S )NFbarr   r   rT   	r1   rU   rV   rW   r'   r3   r8   rX   rB   rY   s      r   test_plot_with_crs_as_attr_strz.TestProjections.test_plot_with_crs_as_attr_strS   sY    W\\^^48$ysCU33tr   c                     | j                                         }d|j        _        |                     t
          d          5  |j                            ddd           d d d            d S # 1 swxY w Y   d S )NFz)'name_of_some_invalid_projection' must ber   r   name_of_some_invalid_projectionrT   )r1   rU   rV   rW   assertRaisesRegex
ValueErrorr8   rX   r4   r1   s     r   *test_plot_with_crs_as_nonexistent_attr_strz:TestProjections.test_plot_with_crs_as_nonexistent_attr_strZ   s    W\\^^
 ##J0[\\ 	M 	MIOOC*KOLLL	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	Ms   A,,A03A0c                     | j                                         }d|j        _        d| j        i|_        |j                            ddd          }|                     |d           d S )NFrg   r   r   Tr]   eqcrh   rY   s      r   =test_plot_with_geo_as_true_crs_no_crs_on_data_returns_defaultzMTestProjections.test_plot_with_geo_as_true_crs_no_crs_on_data_returns_defaultd   s[    W\\^^48$ysCT22tU#####r   c                     | j                                         }|j                            dd| j        d          }|                     |d           d S )Nr   r   Robinsonr'   rD   robinr1   rU   r8   rX   r'   rJ   rY   s      r   #test_plot_with_projection_as_stringz3TestProjections.test_plot_with_projection_as_stringk   sJ    W\\^^ysCTX*MMtW-----r   c                     | j                                         }|j                            dd| j        d          }|                     |d           d S )Nr   r   GOOGLE_MERCATORru   mercrw   rY   s      r   3test_plot_with_projection_as_string_google_mercatorzCTestProjections.test_plot_with_projection_as_string_google_mercatorp   sK    W\\^^ysCTXBSTTtV,,,,,r   c                     |                      t          d          5  | j        j                            ddd           d d d            d S # 1 swxY w Y   d S )NzProjection must be definedr   r   foorD   )rl   rm   r1   r8   rX   )r4   s    r   +test_plot_with_projection_as_invalid_stringz;TestProjections.test_plot_with_projection_as_invalid_stringu   s    ##J0LMM 	= 	=GN  ce <<<	= 	= 	= 	= 	= 	= 	= 	= 	= 	= 	= 	= 	= 	= 	= 	= 	= 	=s   #AAAc                     | j                                         }|                     t          d          5  |j                            dd| j        dd           d d d            d S # 1 swxY w Y   d S )Nz-Tiles can only be used with output projectionr   r   rt   T)r'   rD   tiles)r1   rU   rl   rm   r8   rX   r'   rn   s     r   8test_plot_with_projection_raises_an_error_when_tiles_setzHTestProjections.test_plot_with_projection_raises_an_error_when_tiles_sety   s    W\\^^##J0_`` 	W 	WIOOC$(zQUOVVV	W 	W 	W 	W 	W 	W 	W 	W 	W 	W 	W 	W 	W 	W 	W 	W 	W 	Ws   %A''A+.A+c                    t          j        ddgddgddgd          }|j                            ddd	d
dd          }|j                            dddd          }||z  }t	          j        d                              |           d S )Nr   r
   (   2      )lonlatvr   r      r   T
CartoLight)r   r   scr^   r   r   )r   r   r   r^   r   )r   r   r8   pointsrE   rendererget_plot)r4   dfplot1plot2rA   s        r   test_overlay_with_projectionz,TestProjections.test_overlay_with_projection~   s    \1b'2r(!QHHII	  5ESCTQ] ^^	  5ESd CC u}
G%%d+++++r   c           
      z   dd l }dd lm} dd l}	 ddlm} n#  t          d          xY w|j                            d          }|	                    d          j
                            dd|                                |                                dd	d
d          }|                    |	                    d          ddg|                                          }|                    ||                                          } ||d	d
          }	|j                            |j        |	j                   d S )Nr   )	rasterizezdatashader not availableair_temperature)timer   r   TFmax)r'   rD   r   dynamic
aggregatorproject)kdimsr'   r   )r   r   )r#   r&   r'   r%   holoviews.operation.datashaderr   r   tutorialopen_datasetr0   r8   r   PlateCarreeLambertConformalPointsr   testingassert_allcloser   )
r4   r5   r6   gvr   dshvplot_outputp1p2expecteds
             r   test_geo_with_rasterizez'TestProjections.test_geo_with_rasterize   s\   """"""	7@@@@@@@	75666[%%&788Q.55  "",,.. 6 	
 	
 YYrwwAwuen$BRBRBTBTYUUZZt'<'<'>'>Z??9R5AAA

""=#5x}EEEEEs    (N)rK   rL   rM   re   ri   ro   rr   rx   r|   r   r   r   r   r   r   r   rc   rc   M   s            M M M$ $ $. . .
- - -
= = =W W W
	, 	, 	,F F F F Fr   rc   c                   b    e 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d ZdS )TestGeoAnnotationc                     	 dd l }dd lm} n#  t          d          xY wdd l}|                                | _        t          j        t          j	        
                    dd          ddg          | _        d S Nr   z!geoviews or cartopy not availabler
   r   r   r   r   r%   r&   r'   r   r*   r   r   r   r   r   r   r   r4   r%   r6   r8   s       r   r9   zTestGeoAnnotation.setUp       	@OOO&&&&&&&	@>???##%%,ry~~b!44sCjIII   
 c                     dd l }| j        j                            dddd          }|                     t          |          d           |                    d          }|                     ||j                   d S )Nr   r   r   Tr^   	coastliner   r   	r%   r   r8   r   assertEquallengetassertIsInstanceFeaturer4   r   rA   r   s       r   test_plot_with_coastlinez*TestGeoAnnotation.test_plot_with_coastline   sw    w~$$S#44$HHTA&&&HHQKK	i44444r   c                     dd l }| j        j                            ddd          }|                     t          |          d           |                    d          }|                     ||j                   d S )Nr   r   r   T)r   r   r   r   r   s       r   ,test_plot_with_coastline_sets_geo_by_defaultz>TestGeoAnnotation.test_plot_with_coastline_sets_geo_by_default   su    w~$$S#$>>TA&&&HHQKK	i44444r   c                     | j         j                            dddd          }|                    d          j                            d          }|j        d         dk    sJ d S )	Nr   r   T10mr   r   rA   scale)r   r8   r   r   rI   rH   )r4   rA   rI   s      r   test_plot_with_coastline_scalez0TestGeoAnnotation.test_plot_with_coastline_scale   s`    w~$$S#45$IIxx{{##F++{7#u,,,,,,r   c                 T   | j         j                            dddd          }|                     t	          |          d           |                     |                    d          t          j                   | 	                    d|                    d          j
                   d S )	Nr   r   FTr^   r   r   r   openstreetmapr   r8   r   r   r   r   r   rE   TilesassertInr   r_   s     r   test_plot_with_tilesz&TestGeoAnnotation.test_plot_with_tiles   s    w~$$S#5$EETA&&&dhhqkk28444otxx{{'788888r   c                 \   dd l }| j        j                            dddd          }|                     t          |          d           |                     |                    d          |j        j	                   | 
                    d|                    d          j                   d S )Nr   r   r   Tr   r   r   r%   r   r8   r   r   r   r   r   elementWMTSr   r   r4   r   rA   s      r   test_plot_with_tiles_with_geoz/TestGeoAnnotation.test_plot_with_tiles_with_geo   s    w~$$S#4t$DDTA&&&dhhqkk2:?;;;otxx{{'788888r   c                 T   | j         j                            dddd          }|                     t	          |          d           |                     |                    d          t          j                   | 	                    d|                    d          j
                   d S )	Nr   r   FESRIr   r   r   ArcGISr   r_   s     r   test_plot_with_specific_tilesz/TestGeoAnnotation.test_plot_with_specific_tiles   s    w~$$S#5$GGTA&&&dhhqkk28444h 011111r   c                 \   dd l }| j        j                            dddd          }|                     t          |          d           |                     |                    d          |j        j	                   | 
                    d|                    d          j                   d S )	Nr   r   r   Tr   r   r   r   r   r   s      r   !test_plot_with_specific_tiles_geoz3TestGeoAnnotation.test_plot_with_specific_tiles_geo   s    w~$$S#4v$FFTA&&&dhhqkk2:?;;;h 011111r   c                 |   | j         j                            dddt          j        j        j                  }|                     t          |          d           | 	                    |
                    d          t          j                   |                     d|
                    d          j                   d S Nr   r   Fr   r   r   r   r   r8   r   rE   r   r   EsriImageryr   r   r   r   r   r   r   r_   s     r   "test_plot_with_specific_tile_classz4TestGeoAnnotation.test_plot_with_specific_tile_class   s    w~$$S#5
@P@\$]]TA&&&dhhqkk28444h 011111r   c                 p   dd l }| j        j                            ddd|j        j                  }|                     t          |          d           |                     |	                    d          |j
        j                   |                     d|	                    d          j                   d S )Nr   r   r   Tr   r   r   )r%   r   r8   r   tile_sourcesr   r   r   r   r   r   r   r   r   r   s      r   +test_plot_with_specific_tile_class_with_geoz=TestGeoAnnotation.test_plot_with_specific_tile_class_with_geo   s    w~$$S#4r?Z$[[TA&&&dhhqkk2:?;;;h 011111r   c                    | j         j                            dddt          j        j                                                  }|                     t          |          d           | 	                    |
                    d          t          j                   |                     d|
                    d          j                   d S r   r   r_   s     r    test_plot_with_specific_tile_objz2TestGeoAnnotation.test_plot_with_specific_tile_obj   s    w~$$S#5
@P@\@\@^@^$__TA&&&dhhqkk28444h 011111r   c                    | j         j                            dddt          j        j                                                  }|                     t          |          d           | 	                    |
                    d          t          j                   |                     d|
                    d          j                   d S )Nr   r   Tr   r   r   r   r   r_   s     r   )test_plot_with_specific_tile_obj_with_geoz;TestGeoAnnotation.test_plot_with_specific_tile_obj_with_geo   s    w~$$S#4rz?O?[?[?]?]$^^TA&&&dhhqkk28444h 011111r   c                    dd l }| j        j                            ddd|j        j                  }|                     t          |          d           |                     |	                    d          |j
        j                   d S )Nr   r   r   Tr   r   )r%   r   r8   r   r   	CartoDarkr   r   r   r   r   r   r   s      r   #test_plot_with_specific_gv_tile_objz5TestGeoAnnotation.test_plot_with_specific_gv_tile_obj   sy    w~$$S#4r?X$YYTA&&&dhhqkk2:?;;;;;r   c                     | j         j                            ddddg          }|                    d          j        dk    sJ |                    d          j        d	k    sJ d S )
Nr   r   landborders)featuresr   Landr   Borders)r   r8   r   r   groupr_   s     r   3test_plot_with_features_properly_overlaid_underlaidzETestGeoAnnotation.test_plot_with_features_properly_overlaid_underlaid   sg    w~$$S#8K$LLxx{{ F****xx{{ I------r   N)rK   rL   rM   r9   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r      s        J J J5 5 55 5 5- - -
9 9 99 9 92 2 22 2 22 2 22 2 22 2 22 2 2< < <. . . . .r   r   c                   2    e Zd Zd Zd Zd Zd Zd Zd ZdS )TestGeoElementsc                     	 dd l }dd lm} n#  t          d          xY wdd l}|                                | _        t          j        t          j	        
                    dd          ddg          | _        d S r   r   r   s       r   r9   zTestGeoElements.setUp  r   r   c                     | j         j                            ddd          }|                     |j        | j                   d S r\   )r   r8   hexbinr   r'   )r4   hextiless     r   test_geo_hexbinzTestGeoElements.test_geo_hexbin  s@    7>((ct(<<tx00000r   c                     | j         j                            ddd          }|                     |j        | j                   d S r\   )r   r8   r   r   r'   r4   r   s     r   test_geo_pointszTestGeoElements.test_geo_points  s@    &&sCT&::TX.....r   c                    | j                                                             t          j                            ddgt          | j                                       }|j                            dddd          }t          j
                            d	|d
          }|                     |j        d         t          j                   |                     |j        d         j        j        d           d S )Nab)redr   r   r   T)r   r^   r   stylecolor)r   rU   assignr   r   choicer   r8   r   rE   rF   rG   r   rH   dimr   	dimensionname)r4   
altered_dfrA   rI   s       r   +test_geo_points_color_internally_set_to_dimz;TestGeoElements.test_geo_points_color_internally_set_to_dim  s    W\\^^**ry/?/?c
CPTPWLL/Y/Y*ZZ
 ''SEt'DDx&&wg>>dk'2BF;;;W-7<eDDDDDr   c                 :   | j         j                            ddd          }t          j                            d|d          j        }|                     |                    d          d           |                     |                    d	          d            d S )
Nr   r   Tr]   r   rA   data_aspectr   width	r   r8   r   rE   rF   rG   rH   r   r   r4   r   rI   s      r   test_geo_optszTestGeoElements.test_geo_opts   s    &&sCT&::x&&w??F-00!444'**D11111r   c                    | j         j                            dddd          }t          j                            d|d          j        }|                     |                    d          d	           |                     |                    d
          d           |                     |                    d          d            d S )Nr   r   Tr   )r^   r
  r   rA   r	  r   r
  heightr  r  s      r   test_geo_opts_with_widthz(TestGeoElements.test_geo_opts_with_width&  s    &&sCT&EEx&&w??F-00!444'**C000(++T22222r   N)	rK   rL   rM   r9   r   r   r  r  r  r   r   r   r   r     st        J J J1 1 1/ / /E E E2 2 23 3 3 3 3r   r   c                   V    e 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S )TestGeoPandasc                    	 dd l }dd l}dd lm} dd l}n#  t          d          xY wdd l}ddlm} |	                    g dg dd          }g d}|
                    t          |	          |
          | _         |d           |d          g}	ddg}
|
                    t          |
	          |	
          | _        d S )Nr   z5geopandas, geoviews, shapely or cartopy not available)Polygon)g"(@g5l/(@ga#@gQ@g2c@)gխD@gE@giG@g"JH@g_@z	EPSG:4326)r   r   r'   )zVatican Cityz
San MarinoVaduz
LuxembourgPalikir)r  )geometry)r   r   )r   r   )r   r   )r   r   r  )r   r   )r      )r  r  )r  r   r  AB)	geopandasr%   r&   r'   shapelyr   r*   shapely.geometryr  points_from_xyGeoDataFramedictcitiespolygons)r4   gpdr%   r6   r  r8   r  
p_geometryp_namespg_geometrypg_namess              r   r9   zTestGeoPandas.setUp0  s.   	T####OOO&&&&&&NNNN	TRSSS 	-,,,,,''?????? ( 
 


 SRR&&t'9'9'9J&OO G<==G<==
 :((8)<)<)<{(SSs    &c                 p    | j                                         }|j        ddgk    sJ |j        g k    sJ d S )Nr   r   r$  r8   r   vdimsr   s     r   *test_points_hover_cols_is_empty_by_defaultz8TestGeoPandas.test_points_hover_cols_is_empty_by_defaultL  sE    ##%%|Sz))))|r!!!!!!r   c                 |    | j                             ddd          }|j        ddgk    sJ |j        ddgk    sJ d S )Nr   r   all)r   r   
hover_colsindexr  r,  r   s     r   9test_points_hover_cols_does_not_include_geometry_when_allzGTestGeoPandas.test_points_hover_cols_does_not_include_geometry_when_allQ  sS    ##cSU#CC|Sz))))|0000000r   c                 z    | j                             ddd          }|j        ddgk    sJ |j        dgk    sJ d S )Nr   r0  F)r   r1  	use_indexr   r  r,  r   s     r   8test_points_hover_cols_when_all_and_use_columns_is_falsezFTestGeoPandas.test_points_hover_cols_when_all_and_use_columns_is_falseV  sP    ##ceu#MM|Sz))))|x''''''r   c                 z    | j                             ddg          }|j        ddgk    sJ |j        dgk    sJ d S )Nr   r2  )r   r1  r   r,  r   s     r   $test_points_hover_cols_index_in_listz2TestGeoPandas.test_points_hover_cols_index_in_list[  sP    ##cwi#@@|Sz))))|y((((((r   c                     | j                             d          }|j        ddgk    sJ |j        dgk    sJ t          j                            d|d          j        }|d         dk    sJ d S )Nr  r   r   r   r   r   r$  r8   r   r-  rE   rF   rG   rH   r  s      r   0test_points_hover_cols_positional_arg_sets_colorz>TestGeoPandas.test_points_hover_cols_positional_arg_sets_color`  sz    ##F++|Sz))))|x''''x&&w@@GG}&&&&&&r   c                     | j                             d          }|j        ddgk    sJ |j        dgk    sJ t          j                            d|d          j        }|d         dk    sJ d S )Nr  )r   r   r   r   r   r   r:  r  s      r   )test_points_hover_cols_with_c_set_to_namez7TestGeoPandas.test_points_hover_cols_with_c_set_to_nameg  s}    ##f#--|Sz))))|x''''x&&w@@GG}&&&&&&r   c                 $   | j                             d          }t          |t          j        j        j                  sJ |j        dgk    sJ |j        g k    sJ |	                                D ]}|j        ddgk    sJ |j        g k    sJ d S )Nr  )byr   r   )
r$  r8   
isinstancerE   coreoverlay	NdOverlayr   r-  values)r4   r   r   s      r   *test_points_hover_cols_with_by_set_to_namez8TestGeoPandas.test_points_hover_cols_with_by_set_to_namen  s    ##v#..&"'/";<<<<<|x''''|r!!!!}} 	' 	'G=S#J....=B&&&&&	' 	'r   c                 $   | j                             ddd          }t          j                            d|d          j        }t          j                            |d         d           t          j                            |d         d           d S )	NFr
   irH  r^   xlimylimr   rA   rK  rL  )	r$  r8   rE   rF   rG   optionsr   r   assert_equalr  s      r   !test_points_project_xlim_and_ylimz/TestGeoPandas.test_points_project_xlim_and_ylimw  sx    ##IJ#OOx&&w??G

Vi888

Vj99999r   c                 $   | j                             ddd          }t          j                            d|d          j        }t          j                            |d         d           t          j                            |d         d           d S )	NTrG  rI  rJ  r   rA   rK  rL  )	r$  r8   rE   rF   rG   rM  r   r   r   r  s      r   *test_points_project_xlim_and_ylim_with_geoz8TestGeoPandas.test_points_project_xlim_and_ylim_with_geo}  sx    ##9:#NNx&&w??G

""4<;;;

""4<<<<<<r   c                     | j                             ddd          }t          |t          j        j        j                  sJ d S )NTr  )r^   r?  subplots)r%  r8   r@  rE   rA  layoutNdLayout)r4   r%  s     r   test_polygons_by_subplotsz'TestGeoPandas.test_polygons_by_subplots  sA    =''DVd'KK(BGN$;<<<<<<<r   c                     | j                             d          }t          j                            d|d          j        }d|                    d          vsJ d S )NTr]   r   rA   hovertools)r%  r8   rE   rF   rG   rH   r   )r4   r%  rI   s      r   Atest_polygons_turns_off_hover_when_there_are_no_fields_to_includezOTestGeoPandas.test_polygons_turns_off_hover_when_there_are_no_fields_to_include  sY    =''D'11x&&w&AAHdhhw////////r   N)rK   rL   rM   r9   r.  r3  r6  r8  r;  r=  rE  rO  rQ  rV  rZ  r   r   r   r  r  .  s        T T T8" " "
1 1 1
( ( (
) ) )
' ' '' ' '' ' ': : := = == = =0 0 0 0 0r   r  c                        e Zd Zd Zd Zd ZdS )TestGeoUtilc                     t           j        dk    rt          d          	 dd lm} n#  t          d          xY w|| _        d S )Nr   r   r   zcartopy not available)r!   r"   r   r&   r'   r6   )r4   r6   s     r   r9   zTestGeoUtil.setUp  s[    <7"">???	4&&&&&&&	42333			s   ( 9c                 `    ddl m}  |d          }t          || j        j                  sJ d S )Nr   r   z+init=epsg:26911)utilr   r@  r6   CRSr4   r   r'   s      r   test_proj_to_cartopyz TestGeoUtil.test_proj_to_cartopy  sD    ******o011#ty}-------r   c                     ddl m}  |d          }t          || j        j                  sJ |j        d         dk    sJ |j        d         dk    sJ d S )Nr   r   a  GEOGCRS["unnamed",BASEGEOGCRS["unknown",DATUM["unknown",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1,ID["EPSG",9001]]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8901]]],DERIVINGCONVERSION["unknown",METHOD["PROJ ob_tran o_proj=latlon"],PARAMETER["o_lon_p",0,ANGLEUNIT["degree",0.0174532925199433,ID["EPSG",9122]]],PARAMETER["o_lat_p",37.5,ANGLEUNIT["degree",0.0174532925199433,ID["EPSG",9122]]],PARAMETER["lon_0",357.5,ANGLEUNIT["degree",0.0174532925199433,ID["EPSG",9122]]]],CS[ellipsoidal,2],AXIS["longitude",east,ORDER[1],ANGLEUNIT["degree",0.0174532925199433,ID["EPSG",9122]]],AXIS["latitude",north,ORDER[2],ANGLEUNIT["degree",0.0174532925199433,ID["EPSG",9122]]]]lon_0g     Xv@o_lat_pg     B@)r_  r   r@  r6   RotatedPoler?   ra  s      r   test_proj_to_cartopy_wkt_stringz+TestGeoUtil.test_proj_to_cartopy_wkt_string  s    ******o  j  k  k#ty455555(E1111	*d222222r   N)rK   rL   rM   r9   rb  rg  r   r   r   r\  r\    sA          . . .3 3 3 3 3r   r\  ) __doc__r,   r!   unittestr   r   	holoviewsrE   numpyr   pandasr   pytesthvplot.utilr   packaging.versionr   markr^   
pytestmarkrF   	renderersbk_rendererfixturer   r   rO   rc   r   r   r  r\  r   r   r   <module>ru     s     



 ' ' ' ' ' ' ' '              ' ' ' ' ' ' % % % % % %[_
h )C C CF F F F Fh F F F@    w   &UF UF UF UF UFg UF UF UFp]. ]. ]. ]. ]. ]. ]. ].@&3 &3 &3 &3 &3h &3 &3 &3R\0 \0 \0 \0 \0H \0 \0 \0~3 3 3 3 3( 3 3 3 3 3r   