As originally reported on gitter and then discussed a bit more on stack overflow. There seems to be something generating a NullPointerException deep in the GT internals in the following situation:
transform a RasterFrameLayer in an ML pipeline with TileExploder, then
aggregate with rf_assemble_tile
.toLayer(tlm)
.toRaster(...) <-- Throws NPE
Messing around some with the RasterFrameLayer at 3, I experimented with the toTileLayerRDD and was able to find that the RDD count exceeded the RasterFrameLayer count. I suspect toRaster and other methods are assuming the RasterFrameLayer is "complete", that it contains all SpatialKeys. But that toLayer does not provide that guarantee.
Note in addition to the work around in the SO answer, I was able to verify that the following case did not cause the bug: RasterFrameLayer.toDF().toLayer(tlm).toRaster(...). So something about the TileExploder and rf_assemble_tile may be afoot. I suspect this is all possible because there are entire Tiles in the layout that have entirely nodata, so no records are present on the dataframe at step 2.
As originally reported on gitter and then discussed a bit more on stack overflow. There seems to be something generating a
NullPointerException
deep in the GT internals in the following situation:transform
aRasterFrameLayer
in an ML pipeline withTileExploder
, thenrf_assemble_tile
.toLayer(tlm)
.toRaster(...)
<-- Throws NPEMessing around some with the
RasterFrameLayer
at 3, I experimented with thetoTileLayerRDD
and was able to find that the RDD count exceeded the RasterFrameLayer count. I suspecttoRaster
and other methods are assuming the RasterFrameLayer is "complete", that it contains all SpatialKeys. But thattoLayer
does not provide that guarantee.Note in addition to the work around in the SO answer, I was able to verify that the following case did not cause the bug:
RasterFrameLayer.toDF().toLayer(tlm).toRaster(...)
. So something about the TileExploder andrf_assemble_tile
may be afoot. I suspect this is all possible because there are entire Tiles in the layout that have entirely nodata, so no records are present on the dataframe at step 2.