Web Tile Layers

Generating PNG web tiles

To generate web tiles, based on index tiles (see SFINCS module), you can use the tiling.make_png_tiles() function:

for dataset in bdb.dataset:
    print(dataset.name)

Generating topography tiles

To generate topography tiles, used for building flood maps, you can use the tiling.make_topobathy_tiles() function:

for dataset in bdb.dataset:
    print(dataset.name)

Classes

Created on Thu May 27 14:51:04 2021

@author: ormondt

cht.tiling.make_png_tiles(valg, index_path, png_path, zoom_range=[0, 23], option='direct', topo_path=None, color_values=None, caxis=None, zbmax=- 999.0, merge=True, depth=None)

Generates PNG web tiles

Parameters
  • valg (array) – Name of the scenario to be run.

  • index_path (str) – Path where the index tiles are sitting.

  • png_path (str) – Output path where the png tiles will be created.

  • option (str) – Option to define the type of tiles to be generated. Options are ‘direct’, ‘floodmap’, ‘topography’. Defaults to ‘direct’, in which case the values in valg are used directly.

  • zoom_range (list of int) – Zoom range for which the png tiles will be created. Defaults to [0, 23].

cht.tiling.make_topobathy_tiles(path, dem_names, lon_range, lat_range, index_path=None, zoom_range=None, z_range=None, bathymetry_database_path='d:\\delftdashboard\\data\\bathymetry')

Generates topo/bathy tiles

Parameters
  • path (str) – Path where topo/bathy tiles will be stored.

  • dem_name (list) – List of DEM names (dataset names in Bathymetry Database).

  • png_path (str) – Output path where the png tiles will be created.

  • option (str) – Option.

  • zoom_range (list of int) – Zoom range for which the png tiles will be created. Defaults to [0, 23].