Go to the documentation of this file.
18 using Role = std::pair<std::string, Primitive*>;
20 using Errors = std::vector<std::string>;
31 virtual std::string
type() = 0;
41 std::string
type()
override {
return "node"; }
50 std::string
type()
override {
return "way"; }
59 std::string
type()
override {
return "relation"; }
63 using Nodes = std::map<Id, Node>;
64 using Ways = std::map<Id, Way>;
73 File() noexcept =
default;
78 ~File() noexcept =
default;
86 return std::find_if(roles.begin(), roles.end(), [&](
auto& role) { return roleName == role.first; });
89 template <
typename Func>
91 std::for_each(roles.begin(), roles.end(), [&](
auto& role) {
92 if (roleName == role.first) {
107 bool operator==(
const Way& lhs,
const Way& rhs);
108 bool operator==(
const Relation& lhs,
const Relation& rhs);
109 bool operator==(
const File& lhs,
const File& rhs);
std::vector< Node * > nodes
std::string type() override
std::map< std::string, Attribute > Configuration
std::map< Id, Relation > Relations
Way(Id id, Attributes attributes, std::vector< Node * > nodes)
bool operator==(const Attribute &lhs, const Attribute &rhs)
virtual std::string type()=0
std::string type() override
Node(Id id, Attributes attributes, GPSPoint point)
std::map< Id, Node > Nodes
Relation(Id id, Attributes attributes, Roles roles=Roles())
Common abstract base class for all osm primitives. Provides id and attributes.
File read(pugi::xml_document &node, lanelet::osm::Errors *errors=nullptr)
Intermediate representation of an osm file.
File & operator=(File &&rhs) noexcept=default
std::pair< std::string, Primitive * > Role
std::vector< std::string > Errors
std::map< std::string, std::string > Attributes
auto forEachMember(const Roles &roles, const std::string &roleName, Func &&f)
void write(const std::string &filename, const lanelet::LaneletMap &map, const Origin &origin=Origin::defaultOrigin(), ErrorMessages *errors=nullptr, const io::Configuration ¶ms=io::Configuration())
writes a map to a file
Primitive & operator=(Primitive &&rhs) noexcept=default
Primitive(Id id, Attributes attributes)
std::string type() override
virtual ~Primitive()=default
auto findRole(const Roles &roles, const std::string &roleName)
lanelet2_io
Author(s): Fabian Poggenhans
autogenerated on Thu Mar 6 2025 03:26:03