Libosmium
2.15.6
Fast and flexible C++ library for working with OpenStreetMap data
|
Go to the documentation of this file. 1 #ifndef OSMIUM_OSM_BOX_HPP
2 #define OSMIUM_OSM_BOX_HPP
60 constexpr
Box() noexcept = default;
67 Box(
double minx,
double miny,
double maxx,
double maxy) :
70 assert(minx <= maxx && miny <= maxy);
101 if (location.valid()) {
131 extend(box.bottom_left());
139 explicit constexpr
operator bool() const noexcept {
147 constexpr
bool valid() const noexcept {
213 return lhs.bottom_left() == rhs.bottom_left() &&
214 lhs.top_right() == rhs.top_right();
223 template <
typename TChar,
typename TTraits>
224 inline std::basic_ostream<TChar, TTraits>&
operator<<(std::basic_ostream<TChar, TTraits>& out,
const osmium::Box& box) {
232 out <<
"(undefined)";
239 #endif // OSMIUM_OSM_BOX_HPP
Location & bottom_left() noexcept
Definition: box.hpp:161
Box & extend(const Box &box) noexcept
Definition: box.hpp:130
osmium::Location m_top_right
Definition: box.hpp:52
Location & set_y(const int32_t y) noexcept
Definition: location.hpp:386
constexpr bool valid() const noexcept
Definition: box.hpp:147
constexpr Location bottom_left() const noexcept
Definition: box.hpp:154
double lon() const
Definition: location.hpp:396
constexpr Box() noexcept=default
constexpr int32_t x() const noexcept
Definition: location.hpp:373
constexpr int32_t y() const noexcept
Definition: location.hpp:377
constexpr bool valid() const noexcept
Definition: location.hpp:348
T as_string_without_check(T iterator, const char separator=',') const
Definition: location.hpp:470
Location & set_x(const int32_t x) noexcept
Definition: location.hpp:381
double lat() const
Definition: location.hpp:415
Namespace for everything in the Osmium library.
Definition: assembler.hpp:53
osmium::Location m_bottom_left
Definition: box.hpp:51
Box(const osmium::Location &bottom_left, const osmium::Location &top_right)
Definition: box.hpp:82
constexpr bool operator==(const Box &lhs, const Box &rhs) noexcept
Definition: box.hpp:212
Definition: location.hpp:271
Box & extend(const Location &location) noexcept
Definition: box.hpp:100
bool contains(const osmium::Location &location) const noexcept
Definition: box.hpp:185
std::basic_ostream< TChar, TTraits > & operator<<(std::basic_ostream< TChar, TTraits > &out, const osmium::Box &box)
Definition: box.hpp:224
double size() const
Definition: box.hpp:201
Location & top_right() noexcept
Definition: box.hpp:175
constexpr Location top_right() const noexcept
Definition: box.hpp:168