@@ -37,7 +37,7 @@ import org.locationtech.rasterframes.model.LazyCRS
3737trait StandardSerializers {
3838
3939 implicit val envelopeSerializer : CatalystSerializer [Envelope ] = new CatalystSerializer [Envelope ] {
40- override def schema : StructType = StructType (Seq (
40+ override val schema : StructType = StructType (Seq (
4141 StructField (" minX" , DoubleType , false ),
4242 StructField (" maxX" , DoubleType , false ),
4343 StructField (" minY" , DoubleType , false ),
@@ -54,7 +54,7 @@ trait StandardSerializers {
5454 }
5555
5656 implicit val extentSerializer : CatalystSerializer [Extent ] = new CatalystSerializer [Extent ] {
57- override def schema : StructType = StructType (Seq (
57+ override val schema : StructType = StructType (Seq (
5858 StructField (" xmin" , DoubleType , false ),
5959 StructField (" ymin" , DoubleType , false ),
6060 StructField (" xmax" , DoubleType , false ),
@@ -72,7 +72,7 @@ trait StandardSerializers {
7272 }
7373
7474 implicit val gridBoundsSerializer : CatalystSerializer [GridBounds ] = new CatalystSerializer [GridBounds ] {
75- override def schema : StructType = StructType (Seq (
75+ override val schema : StructType = StructType (Seq (
7676 StructField (" colMin" , IntegerType , false ),
7777 StructField (" rowMin" , IntegerType , false ),
7878 StructField (" colMax" , IntegerType , false ),
@@ -92,7 +92,7 @@ trait StandardSerializers {
9292 }
9393
9494 implicit val crsSerializer : CatalystSerializer [CRS ] = new CatalystSerializer [CRS ] {
95- override def schema : StructType = StructType (Seq (
95+ override val schema : StructType = StructType (Seq (
9696 StructField (" crsProj4" , StringType , false )
9797 ))
9898 override def to [R ](t : CRS , io : CatalystIO [R ]): R = io.create(
@@ -107,20 +107,19 @@ trait StandardSerializers {
107107 }
108108
109109 implicit val cellTypeSerializer : CatalystSerializer [CellType ] = new CatalystSerializer [CellType ] {
110-
111-
112- override def schema : StructType = StructType (Seq (
110+ import StandardSerializers ._
111+ override val schema : StructType = StructType (Seq (
113112 StructField (" cellTypeName" , StringType , false )
114113 ))
115114 override def to [R ](t : CellType , io : CatalystIO [R ]): R = io.create(
116- io.encode(StandardSerializers . ct2sCache.get(t))
115+ io.encode(ct2sCache.get(t))
117116 )
118117 override def from [R ](row : R , io : CatalystIO [R ]): CellType =
119- StandardSerializers . s2ctCache.get(io.getString(row, 0 ))
118+ s2ctCache.get(io.getString(row, 0 ))
120119 }
121120
122121 implicit val projectedExtentSerializer : CatalystSerializer [ProjectedExtent ] = new CatalystSerializer [ProjectedExtent ] {
123- override def schema : StructType = StructType (Seq (
122+ override val schema : StructType = StructType (Seq (
124123 StructField (" extent" , schemaOf[Extent ], false ),
125124 StructField (" crs" , schemaOf[CRS ], false )
126125 ))
@@ -137,7 +136,7 @@ trait StandardSerializers {
137136 }
138137
139138 implicit val spatialKeySerializer : CatalystSerializer [SpatialKey ] = new CatalystSerializer [SpatialKey ] {
140- override def schema : StructType = StructType (Seq (
139+ override val schema : StructType = StructType (Seq (
141140 StructField (" col" , IntegerType , false ),
142141 StructField (" row" , IntegerType , false )
143142 ))
@@ -154,7 +153,7 @@ trait StandardSerializers {
154153 }
155154
156155 implicit val spacetimeKeySerializer : CatalystSerializer [SpaceTimeKey ] = new CatalystSerializer [SpaceTimeKey ] {
157- override def schema : StructType = StructType (Seq (
156+ override val schema : StructType = StructType (Seq (
158157 StructField (" col" , IntegerType , false ),
159158 StructField (" row" , IntegerType , false ),
160159 StructField (" instant" , LongType , false )
@@ -174,7 +173,7 @@ trait StandardSerializers {
174173 }
175174
176175 implicit val cellSizeSerializer : CatalystSerializer [CellSize ] = new CatalystSerializer [CellSize ] {
177- override def schema : StructType = StructType (Seq (
176+ override val schema : StructType = StructType (Seq (
178177 StructField (" width" , DoubleType , false ),
179178 StructField (" height" , DoubleType , false )
180179 ))
@@ -191,7 +190,7 @@ trait StandardSerializers {
191190 }
192191
193192 implicit val tileLayoutSerializer : CatalystSerializer [TileLayout ] = new CatalystSerializer [TileLayout ] {
194- override def schema : StructType = StructType (Seq (
193+ override val schema : StructType = StructType (Seq (
195194 StructField (" layoutCols" , IntegerType , false ),
196195 StructField (" layoutRows" , IntegerType , false ),
197196 StructField (" tileCols" , IntegerType , false ),
@@ -214,7 +213,7 @@ trait StandardSerializers {
214213 }
215214
216215 implicit val layoutDefinitionSerializer = new CatalystSerializer [LayoutDefinition ] {
217- override def schema : StructType = StructType (Seq (
216+ override val schema : StructType = StructType (Seq (
218217 StructField (" extent" , schemaOf[Extent ], true ),
219218 StructField (" tileLayout" , schemaOf[TileLayout ], true )
220219 ))
@@ -231,7 +230,7 @@ trait StandardSerializers {
231230 }
232231
233232 implicit def boundsSerializer [T >: Null : CatalystSerializer ]: CatalystSerializer [KeyBounds [T ]] = new CatalystSerializer [KeyBounds [T ]] {
234- override def schema : StructType = StructType (Seq (
233+ override val schema : StructType = StructType (Seq (
235234 StructField (" minKey" , schemaOf[T ], true ),
236235 StructField (" maxKey" , schemaOf[T ], true )
237236 ))
@@ -248,7 +247,7 @@ trait StandardSerializers {
248247 }
249248
250249 def tileLayerMetadataSerializer [T >: Null : CatalystSerializer ]: CatalystSerializer [TileLayerMetadata [T ]] = new CatalystSerializer [TileLayerMetadata [T ]] {
251- override def schema : StructType = StructType (Seq (
250+ override val schema : StructType = StructType (Seq (
252251 StructField (" cellType" , schemaOf[CellType ], false ),
253252 StructField (" layout" , schemaOf[LayoutDefinition ], false ),
254253 StructField (" extent" , schemaOf[Extent ], false ),
@@ -276,7 +275,7 @@ trait StandardSerializers {
276275 implicit def rasterSerializer : CatalystSerializer [Raster [Tile ]] = new CatalystSerializer [Raster [Tile ]] {
277276 import org .apache .spark .sql .rf .TileUDT .tileSerializer
278277
279- override def schema : StructType = StructType (Seq (
278+ override val schema : StructType = StructType (Seq (
280279 StructField (" tile" , TileType , false ),
281280 StructField (" extent" , schemaOf[Extent ], false )
282281 ))
0 commit comments