Function lanelet::load(const std::string&, const Projector&, ErrorMessages *, const io::Configuration&)
Defined in File Io.h
Function Documentation
-
std::unique_ptr<LaneletMap> lanelet::load(const std::string &filename, const Projector &projector, ErrorMessages *errors = nullptr, const io::Configuration ¶ms = io::Configuration())
Loads a lanelet map from a file.
- Parameters:
filename – name to load from. The extension decides how the file will be parsed.
projector – projection object for the transformations used
errors – if not null, errors will be reported here instead of throwing
params – optional params for loading. It depends on the parser that is used which parameters are required. If no params are passed, default values will be used
- Throws:
lanelet2::IOError – if the file did not exist, could not be parsed or extension is not supported. If errors is not null, the loader will instead try to recover and only throw on unrecoverable errors (ie if the map did not exist). However, the loaded map will be incomplete if errors occurred.
- Returns:
Loaded map. Pointer is aways valid. Otherwise, an exception will be thrown