Remove OSM link debug printing from public class
This commit is contained in:
parent
cac310123b
commit
83d7a57b73
@ -4,7 +4,7 @@
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
#include "util/coordinate.hpp"
|
||||
#include "util/to_osm_link.hpp"
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
|
||||
@ -19,8 +19,7 @@
|
||||
{ \
|
||||
if (!static_cast<bool>(cond)) \
|
||||
{ \
|
||||
::osrm::util::FloatCoordinate c_(loc); \
|
||||
std::cerr << "[Location] " << c_.toOSMLink() << '\n'; \
|
||||
std::cerr << "[Location] " << ::osrm::util::toOSMLink(loc) << '\n'; \
|
||||
} \
|
||||
BOOST_ASSERT_MSG(cond, msg); \
|
||||
} while (0)
|
||||
|
@ -217,15 +217,6 @@ struct Coordinate
|
||||
friend bool operator==(const Coordinate lhs, const Coordinate rhs);
|
||||
friend bool operator!=(const Coordinate lhs, const Coordinate rhs);
|
||||
friend std::ostream &operator<<(std::ostream &out, const Coordinate coordinate);
|
||||
|
||||
std::string toOSMLink() const
|
||||
{
|
||||
std::stringstream link;
|
||||
link << "http://www.openstreetmap.org/?mlat=" << toFloating(lat)
|
||||
<< "&mlon=" << toFloating(lon) << "#map=19/" << toFloating(lat) << "/"
|
||||
<< toFloating(lon);
|
||||
return link.str();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
@ -267,14 +258,6 @@ struct FloatCoordinate
|
||||
friend bool operator==(const FloatCoordinate lhs, const FloatCoordinate rhs);
|
||||
friend bool operator!=(const FloatCoordinate lhs, const FloatCoordinate rhs);
|
||||
friend std::ostream &operator<<(std::ostream &out, const FloatCoordinate coordinate);
|
||||
|
||||
std::string toOSMLink() const
|
||||
{
|
||||
std::stringstream link;
|
||||
link << "http://www.openstreetmap.org/?mlat=" << lat << "&mlon=" << lon << "#map=19/" << lat
|
||||
<< "/" << lon;
|
||||
return link.str();
|
||||
}
|
||||
};
|
||||
|
||||
bool operator==(const Coordinate lhs, const Coordinate rhs);
|
||||
|
32
include/util/to_osm_link.hpp
Normal file
32
include/util/to_osm_link.hpp
Normal file
@ -0,0 +1,32 @@
|
||||
#ifndef OSRM_UTIL_TO_OSM_LINK_HPP
|
||||
#define OSRM_UTIL_TO_OSM_LINK_HPP
|
||||
|
||||
#include "util/coordinate.hpp"
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
namespace util
|
||||
{
|
||||
inline std::string toOSMLink(const util::FloatCoordinate &c)
|
||||
{
|
||||
std::stringstream link;
|
||||
link << "http://www.openstreetmap.org/?mlat=" << c.lat << "&mlon=" << c.lon << "#map=19/"
|
||||
<< c.lat << "/" << c.lon;
|
||||
return link.str();
|
||||
}
|
||||
|
||||
inline std::string toOSMLink(const util::Coordinate &c)
|
||||
{
|
||||
std::stringstream link;
|
||||
link << "http://www.openstreetmap.org/?mlat=" << toFloating(c.lat)
|
||||
<< "&mlon=" << toFloating(c.lon) << "#map=19/" << toFloating(c.lat) << "/"
|
||||
<< toFloating(c.lon);
|
||||
return link.str();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif
|
@ -807,14 +807,14 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges(
|
||||
<< "Turn is a u turn but not turning to the first connected "
|
||||
"edge of the intersection. Node ID: "
|
||||
<< intersection_node << ", OSM link: "
|
||||
<< m_coordinates[intersection_node].toOSMLink();
|
||||
<< toOSMLink(m_coordinates[intersection_node]);
|
||||
}
|
||||
else if (turn == intersection_view.begin() && !is_uturn)
|
||||
{
|
||||
util::Log(logWARNING)
|
||||
<< "Turn is a u turn but not classified as a u turn. Node ID: "
|
||||
<< intersection_node << ", OSM link: "
|
||||
<< m_coordinates[intersection_node].toOSMLink();
|
||||
<< toOSMLink(m_coordinates[intersection_node]);
|
||||
}
|
||||
|
||||
// In case a way restriction starts at a given location, add a turn onto
|
||||
|
Loading…
Reference in New Issue
Block a user