How to init TileLayerRDD with a piece of extent
jhxfcen opened this issue · 2 comments
jhxfcen commented
below is a regular process to create a TileLayerRDD, but we don't want to load the whole extent of this image, just want to load a piece of extent, how to do it?
val image1 = "/Desktop/test/LC08_L2SP_126032_20220408_20220412_02_T1_SR_B2.TIF"
val rs = GeoTiffRasterSource(image1).reproject(LatLng)
val source: RDD[RasterSource] = sparkContext.parallelize(rs :: Nil)
val summary = RasterSummary.fromRDD(source)
val layoutScheme = ZoomedLayoutScheme(LatLng, 512)
val LayoutLevel(zoom, layout) = summary.levelFor(layoutScheme)
val rdd = RasterSourceRDD.tiledLayerRDD(source, layout, KeyExtractor.spatialKeyExtractor, rasterSummary = Some(summary))
pomadchin commented