l5kit.rasterization.rasterizer_builder module

l5kit.rasterization.rasterizer_builder.build_rasterizer(cfg: dict, data_manager: l5kit.data.local_data_manager.DataManager) l5kit.rasterization.rasterizer.Rasterizer

Factory function for rasterizers, reads the config, loads required data and initializes the correct rasterizer.

Parameters
  • cfg (dict) – Config.

  • data_manager (DataManager) – Datamanager that is used to require files to be present.

Raises
  • NotImplementedError – Thrown when the map_type read from the config doesn’t have an associated rasterizer

  • type in this factory function. If you have custom rasterizers, you can wrap this function in your own factory

  • function and catch this error.

Returns

Rasterizer initialized given the supplied config.

Return type

Rasterizer