1 #ifndef OSMIUM_OSM_NODE_REF_HPP
2 #define OSMIUM_OSM_NODE_REF_HPP
50 class NodeRef :
public osmium::memory::detail::ItemHelper {
96 return m_location.
lon();
105 return m_location.
lat();
111 constexpr int32_t
x() const noexcept {
112 return m_location.
x();
118 constexpr int32_t
y() const noexcept {
119 return m_location.
y();
148 return lhs.ref() == rhs.ref();
156 return ! (lhs == rhs);
164 return lhs.ref() < rhs.ref();
180 return ! (rhs < lhs);
188 return ! (lhs < rhs);
194 template <
typename TChar,
typename TTraits>
195 inline std::basic_ostream<TChar, TTraits>& operator<<(std::basic_ostream<TChar, TTraits>& out,
const osmium::NodeRef& nr) {
196 return out <<
"<" << nr.
ref() <<
" " << nr.location() <<
">";
205 return lhs.location() == rhs.location();
220 return lhs.location() < rhs.location();
231 #endif // OSMIUM_OSM_NODE_REF_HPP
double lat() const
Definition: node_ref.hpp:104
NodeRef & set_ref(const osmium::object_id_type ref) noexcept
Definition: node_ref.hpp:127
Definition: node_ref.hpp:202
uint64_t unsigned_object_id_type
Type for OSM object (node, way, or relation) IDs where we only allow positive IDs.
Definition: types.hpp:46
bool operator<=(const Changeset &lhs, const Changeset &rhs)
Definition: changeset.hpp:446
bool result_type
Definition: node_ref.hpp:225
constexpr bool operator==(const Box &lhs, const Box &rhs) noexcept
Definition: box.hpp:222
constexpr NodeRef(const osmium::object_id_type ref=0, const osmium::Location &location=Location()) noexcept
Definition: node_ref.hpp:57
Definition: node_ref.hpp:217
double lat() const
Definition: location.hpp:205
constexpr osmium::object_id_type ref() const noexcept
Definition: node_ref.hpp:65
bool operator<(const Changeset &lhs, const Changeset &rhs)
Definition: changeset.hpp:438
int64_t object_id_type
Type for OSM object (node, way, or relation) IDs.
Definition: types.hpp:45
Namespace for everything in the Osmium library.
Definition: assembler.hpp:59
NodeRef & set_location(const osmium::Location &location) noexcept
Definition: node_ref.hpp:137
constexpr int32_t x() const noexcept
Definition: node_ref.hpp:111
constexpr int32_t y() const noexcept
Definition: location.hpp:167
constexpr osmium::Location location() const noexcept
Definition: node_ref.hpp:86
osmium::object_id_type m_ref
Definition: node_ref.hpp:52
constexpr bool operator()(const NodeRef &lhs, const NodeRef &rhs) const noexcept
Definition: node_ref.hpp:204
osmium::Location m_location
Definition: node_ref.hpp:53
Definition: location.hpp:79
bool result_type
Definition: node_ref.hpp:210
osmium::Location & location() noexcept
Definition: node_ref.hpp:79
constexpr int32_t y() const noexcept
Definition: node_ref.hpp:118
bool operator>=(const Changeset &lhs, const Changeset &rhs)
Definition: changeset.hpp:450
osmium::unsigned_object_id_type positive_ref() const noexcept
Definition: node_ref.hpp:72
double lon() const
Definition: location.hpp:186
bool operator>(const Changeset &lhs, const Changeset &rhs)
Definition: changeset.hpp:442
constexpr bool operator()(const NodeRef &lhs, const NodeRef &rhs) const noexcept
Definition: node_ref.hpp:219
constexpr int32_t x() const noexcept
Definition: location.hpp:163
double lon() const
Definition: node_ref.hpp:95
Definition: node_ref.hpp:50
bool operator!=(const Changeset &lhs, const Changeset &rhs)
Definition: changeset.hpp:431