41 {
42 CHECK_NOTNULL(curve_segment);
43
44
45 double s = 0.0;
46 double ptx = 0.0;
47 double pty = 0.0;
48 double ptz = 0.0;
49 double length = 0.0;
50
51 int checker = tinyxml2::XML_SUCCESS;
52
53 checker += xml_node.QueryDoubleAttribute("sOffset", &s);
54 checker += xml_node.QueryDoubleAttribute("x", &ptx);
55 checker += xml_node.QueryDoubleAttribute("y", &pty);
56 checker += xml_node.QueryDoubleAttribute("length", &length);
57
58 if (checker == tinyxml2::XML_SUCCESS) {
59 curve_segment->set_s(s);
60
61 double output_x = 0.0;
62 double output_y = 0.0;
63 double output_z = 0.0;
64
65 WGS84ToUTM(ptx, pty, ptz, &output_x, &output_y, &output_z);
66
67 curve_segment->mutable_start_position()->set_x(output_x);
68 curve_segment->mutable_start_position()->set_y(output_y);
69 curve_segment->set_length(length);
70 }
71
72 const auto sub_node = xml_node.FirstChildElement("pointSet");
73 if (sub_node) {
74 PbLineSegment* line_segment = curve_segment->mutable_line_segment();
77 }
78
79 std::string err_msg = "Error geometry object";
81}
static void WGS84ToUTM(const double x, const double y, const double z, double *output_x, double *output_y, double *output_z)
static Status ParsePointSet(const tinyxml2::XMLElement &xml_node, PbLineSegment *line_segment)
apollo::hdmap::LineSegment PbLineSegment