Function lanelet::write(const std::string&, const LaneletMap&, const Projector&, ErrorMessages *, const io::Configuration&)
Defined in File Io.h
Function Documentation
-
void lanelet::write(const std::string &filename, const LaneletMap &map, const Projector &projector, ErrorMessages *errors = nullptr, const io::Configuration ¶ms = io::Configuration())
writes a map to a file
- Parameters:
filename – file to write to (parent folders must exist!). The extension is used to deduce the format.
map – map to be written
projector – projector object for x,y -> lat/lon conversion. You will receive a warning if you try to write to a format that requires lat/lon conversion and passed the defaultOrigin.
errors – if this points to a valid object, errors occured during write will be passed via this parameter. If this is nullptr, an exception will be thrown if errors have occurred.
params – extra parameters for the writer (if required). If empty, default parameters will be used.
- Throws:
lanelet2::IOError – if the file could not be created or writing failed.