rasterframes icon indicating copy to clipboard operation
rasterframes copied to clipboard

rf_ipython formatting if struct contains a Tile

Open vpipkt opened this issue 6 years ago • 1 comments

Currently if a struct / Row contains a Tile, rf_ipython doesn't do anything special for it. We should try to look inside the nested structure to see if it has a Tile to enable visualization of the Tile.

Semi related to #147

vpipkt avatar Jun 25 '19 16:06 vpipkt

As discussed in #213 this results in a lot of rf_tile('proj_raster') to get a look at the Tile object.

The ipython formatting nicety is provided by the _repr_png_ method on the Tile class.

So when you collect a Tile to the driver and then IPython.display.display it, IPython will check if Tile class has any repr*_ methods.

One possibility may be to define a Python class that claims to be the UDT for StructType, and has a repr*_ method. But that seems a dicey proposition to me.

Open to other possibilities here.

vpipkt avatar Jul 26 '19 15:07 vpipkt