Function lanelet::load(const std::string&, const std::string&, const Projector&, ErrorMessages *, const io::Configuration&)

Function Documentation

std::unique_ptr<LaneletMap> lanelet::load(const std::string &filename, const std::string &parserName, const Projector &projector, ErrorMessages *errors = nullptr, const io::Configuration &params = io::Configuration())

Loads a lanelet map from file.

Parameters:
  • filename – name to load from

  • parserName – name of the parser to use. Available parsers can be queried with supportedParsers()

  • errors – if this points to a valid object, errors occured during parsing the map will be passed via this parameter. If this is nullptr, an exception will be thrown if errors have occurred.

  • projector – projection object for the transformations

  • 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

Returns:

Loaded map. Pointer is aways valid. Otherwise, an exception will be thrown