@@ -254,7 +254,7 @@ namespace dsm {
254254 // Check if the first line is nodeId;lat;lon
255255 std::string line;
256256 std::getline (ifs, line);
257- if (line != " id;lon; lat;type" ) {
257+ if (line != " id;lat;lon ;type" ) {
258258 throw std::invalid_argument (
259259 Logger::buildExceptionMessage (" Invalid file format." ));
260260 }
@@ -267,14 +267,14 @@ namespace dsm {
267267 std::istringstream iss{line};
268268 std::string nodeId, lat, lon, type;
269269 std::getline (iss, nodeId, ' ;' );
270- std::getline (iss, lon, ' ;' );
271270 std::getline (iss, lat, ' ;' );
271+ std::getline (iss, lon, ' ;' );
272272 std::getline (iss, type, ' \n ' );
273273 dLon = lon == " Nan" ? 0 . : std::stod (lon);
274274 dLat = lat == " Nan" ? 0 . : std::stod (lat);
275275 auto const & it{m_nodes.find (std::stoul (nodeId))};
276276 if (it != m_nodes.cend ()) {
277- it->second ->setCoords (std::make_pair (dLon, dLat ));
277+ it->second ->setCoords (std::make_pair (dLat, dLon ));
278278 if (type == " traffic_light" && !it->second ->isTrafficLight ()) {
279279 makeTrafficLight (it->first , 60 );
280280 } else if (type == " roundabout" && !it->second ->isRoundabout ()) {
@@ -478,7 +478,7 @@ namespace dsm {
478478 path.substr (path.find_last_of (" ." )) == " .csv" ));
479479 std::ofstream file{path};
480480 // Column names
481- file << " id;lon; lat;type\n " ;
481+ file << " id;lat;lon ;type\n " ;
482482 for (auto const & [nodeId, pNode] : m_nodes) {
483483 file << nodeId << ' ;' ;
484484 if (pNode->coords ().has_value ()) {
0 commit comments