Skip to content

How to init TileLayerRDD with a piece of extent #3473

Description

@jhxfcen

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))

Activity

  1. changed the title [-]how to init TileLayerRDD with specific extent[/-] [+]how to init TileLayerRDD with a piece of extent[/+] on Jul 14, 2022
  2. changed the title [-]how to init TileLayerRDD with a piece of extent[/-] [+]How to init TileLayerRDD with a piece of extent[/+] on Jul 14, 2022
  3. pomadchin commented on Jul 14, 2022

    @pomadchin
    Member

    Hey @jhxfcen that's a good question, I don't think this functionality is exposed. At this point that's available as a part of the old API only. But it could be a nice addition indeed.

    I'm actually surprised we never faced this need ._.

  4. pomadchin commented on Jul 16, 2022

    @pomadchin
    Member

    @jhxfcen I brought up a PR that will hopefully get merged soon, #3474

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions