titiler module#

async jupyter_tiler.titiler.add_data_array(data_array, *, colormap_name='viridis', colormap_range=None, tile_dim_scale=1, algorithm=None, **kwargs)[source]#

Adds a DataArray to the TiTiler server.

The TiTiler server is lazily started when the first DataArray is added.

Parameters:
  • data_array (DataArray) – An Xarray DataArray to dynamically tile for visualization.

  • colormap_name (str, default: 'viridis') – A rio-tiler-supported colormap name. See the rio-tiler docs for details.

  • colormap_range (tuple[float, float] | None, default: None) – The range of data values (min, max) to be colormapped

  • tile_dim_scale (int, default: 1) – Tile size scale. Default 1 corresponds to 256*256px tiles.

  • algorithm (BaseAlgorithm | None, default: None) – A TiTiler algorithm class. See the TiTiler algorithm docs for details.

  • kwargs (str | int) – Additional query parameters to include in the TiTiler request URL.

Returns:

str – A URL template pointing to the new tile endpoint.

jupyter_tiler.titiler.get_routes()[source]#

Display a list of all available routes on the TiTiler server.

Returns:

list[dict[str, Any]] – A list containing one dictionary per route exposed by the TiTiler server.

Raises:

RuntimeError – If called before the server is started. Always await add_data_array() first.