@@ -98,7 +98,10 @@ def test_general(self):
9898 .withColumn ('sum' , tile_sum (self .tileCol )) \
9999 .withColumn ('stats' , tile_stats (self .tileCol )) \
100100 .withColumn ('envelope' , envelope ('bounds' )) \
101- .withColumn ('ascii' , render_ascii (self .tileCol ))
101+ .withColumn ('ascii' , render_ascii (self .tileCol )) \
102+ .withColumn ('log' , log (self .tileCol )) \
103+ .withColumn ('exp' , exp (self .tileCol )) \
104+ .withColumn ('round' , round (self .tileCol ))
102105
103106 df .show ()
104107
@@ -201,6 +204,17 @@ def test_maskByValue(self):
201204 self .assertTrue (result )
202205
203206
207+ def test_resample (self ):
208+ from pyspark .sql .functions import lit
209+ result = self .rf .select (
210+ tile_min (local_equal (
211+ resample (resample (self .rf .tile , lit (2 )), lit (0.5 )),
212+ self .rf .tile ))
213+ ).collect ()[0 ][0 ]
214+
215+ self .assertTrue (result == 1 ) # short hand for all values are true
216+
217+
204218def suite ():
205219 functionTests = unittest .TestSuite ()
206220 functionTests .addTest (RasterFunctionsTest ('test_identify_columns' ))
@@ -212,6 +226,7 @@ def suite():
212226 functionTests .addTest (RasterFunctionsTest ('test_explode' ))
213227 functionTests .addTest (RasterFunctionsTest ('test_sql' ))
214228 functionTests .addTest (RasterFunctionsTest ('test_maskByValue' ))
229+ functionTests .addTest (RasterFunctionsTest ('test_resample' ))
215230 return functionTests
216231
217232
0 commit comments