MCPcopy Create free account
hub / github.com/AdaCompNUS/summit / parse_coordinates

Function parse_coordinates

LibCarla/source/carla/sumonetwork/SumoNetwork.cpp:33–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33static geom::Vector2D parse_coordinates(const std::string& s) {
34 if (s.empty()) return geom::Vector2D(0, 0);
35
36 std::vector<std::string> split_list;
37 boost::split(
38 split_list,
39 s,
40 boost::is_any_of(","),
41 boost::token_compress_on);
42
43 // Swap x, y for SUMO -> CARLA.
44 return geom::Vector2D(std::stof(split_list[1]), std::stof(split_list[0]));
45}
46
47static std::pair<geom::Vector2D, geom::Vector2D> parse_bounds(const std::string& s) {
48 std::vector<std::string> split_list;

Callers 1

LoadMethod · 0.85

Calls 2

Vector2DClass · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected