Skip to content

Commit

Permalink
sar_backscatter: print partitioner in test, may need an assert
Browse files Browse the repository at this point in the history
  • Loading branch information
jdries committed Jan 27, 2025
1 parent f19a484 commit acb4e77
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions openeogeotrellis/collections/s1backscatter_orfeo.py
Original file line number Diff line number Diff line change
Expand Up @@ -1034,12 +1034,14 @@ def partitionByPath(tuple):
metadata=layer_metadata_py
)

the_rdd = tile_layer.srdd.rdd()
print(f"Partitioner is present {str(partitioner)}")
logger.info(f"Partitioner is present {str(partitioner)}")
if(partitioner.isPresent()):
logger.info(f"Partitioner is present {str(partitioner)}")
tile_layer.srdd.rdd().partitionBy(partitioner.get())
the_rdd = tile_layer.srdd.rdd().partitionBy(partitioner.get())

# Merge any keys that have more than one tile.
contextRDD = self.jvm.org.openeo.geotrellis.OpenEOProcesses().mergeTiles(tile_layer.srdd.rdd())
contextRDD = self.jvm.org.openeo.geotrellis.OpenEOProcesses().mergeTiles(the_rdd)
temporal_tiled_raster_layer = self.jvm.geopyspark.geotrellis.TemporalTiledRasterLayer
srdd = temporal_tiled_raster_layer.apply(self.jvm.scala.Option.apply(zoom), contextRDD)
merged_tile_layer = geopyspark.TiledRasterLayer(geopyspark.LayerType.SPACETIME, srdd)
Expand Down

0 comments on commit acb4e77

Please sign in to comment.