37 CHECK_NOTNULL(pb_map);
39 tinyxml2::XMLDocument document;
40 if (document.LoadFile(filename.c_str()) != tinyxml2::XML_SUCCESS) {
41 AERROR <<
"fail to load file " << filename;
46 const tinyxml2::XMLElement* root_node = document.RootElement();
47 ACHECK(root_node !=
nullptr);
49 PbHeader* map_header = pb_map->mutable_header();
57 std::vector<RoadInternal> roads;
65 std::vector<JunctionInternal> junctions;
A general class to denote the return status of an API call.
bool ok() const
check whether the return status is OK.
const std::string & error_message() const
returns the error message of the status, empty if the status is OK.
static Status Parse(const tinyxml2::XMLElement &xml_node, std::vector< JunctionInternal > *junctions)
static Status ParseObjects(const tinyxml2::XMLElement &xml_node, ObjectInternal *objects)
static bool LoadData(const std::string &filename, apollo::hdmap::Map *pb_map)
void GetObjectElements(const ObjectInternal &objects)
void OutputData(apollo::hdmap::Map *pb_map)
void GetJunctionElements(const std::vector< JunctionInternal > &junctions)
void GetOverlapElements(const std::vector< RoadInternal > &roads, const std::vector< JunctionInternal > &junctions)
void GetRoadElements(std::vector< RoadInternal > *roads)
static Status Parse(const tinyxml2::XMLElement &xml_node, std::vector< RoadInternal > *roads)