@@ -25,7 +25,7 @@ import geotrellis.proj4.LatLng
2525import geotrellis .raster .{ByteCellType , GridBounds , TileLayout }
2626import geotrellis .spark .tiling .{CRSWorldExtent , LayoutDefinition }
2727import geotrellis .spark .{KeyBounds , SpatialKey , TileLayerMetadata }
28- import org .apache .spark .sql .Encoders
28+ import org .apache .spark .sql .{ Encoder , Encoders }
2929import org .locationtech .rasterframes .util .SubdivideSupport
3030
3131/**
@@ -57,23 +57,27 @@ class ExtensionMethodSpec extends TestEnvironment with TestData with SubdivideSu
5757 }
5858 describe(" Miscellaneous extensions" ) {
5959 import spark .implicits ._
60+
6061 it(" should find multiple extent columns" ) {
6162 val df = Seq ((extent, " fred" , extent, 34.0 )).toDF(" e1" , " s" , " e2" , " n" )
6263 df.extentColumns.size should be(2 )
6364 }
65+
6466 it(" should find multiple crs columns" ) {
6567 // Not sure why implicit resolution isn't handling this properly.
6668 implicit val enc = Encoders .tuple(crsEncoder, Encoders .STRING , crsEncoder, Encoders .scalaDouble)
6769 val df = Seq ((pe.crs, " fred" , pe.crs, 34.0 )).toDF(" c1" , " s" , " c2" , " n" )
6870 df.crsColumns.size should be (2 )
6971 }
72+
7073 it(" should split TileLayout" ) {
7174 val tl1 = TileLayout (2 , 3 , 10 , 10 )
7275 assert(tl1.subdivide(0 ) === tl1)
7376 assert(tl1.subdivide(1 ) === tl1)
7477 assert(tl1.subdivide(2 ) === TileLayout (4 , 6 , 5 , 5 ))
7578 assertThrows[IllegalArgumentException ](tl1.subdivide(- 1 ))
7679 }
80+
7781 it(" should split KeyBounds[SpatialKey]" ) {
7882 val grid = GridBounds (0 , 0 , 9 , 9 )
7983 val kb = KeyBounds (grid)
0 commit comments