#include <coordinates.hpp>
◆ Coordinates() [1/3]
osmium::geom::Coordinates::Coordinates |
( |
| ) |
|
|
inlinenoexcept |
Default constructor creates invalid coordinates.
◆ Coordinates() [2/3]
osmium::geom::Coordinates::Coordinates |
( |
double |
cx, |
|
|
double |
cy |
|
) |
| |
|
inlineexplicitnoexcept |
Create Coordinates from doubles. If any of them is NaN, the coordinates are invalid.
◆ Coordinates() [3/3]
◆ append_to_string() [1/2]
void osmium::geom::Coordinates::append_to_string |
( |
std::string & |
s, |
|
|
const char |
infix, |
|
|
int |
precision |
|
) |
| const |
|
inline |
Convert coordinates to text and append to given string. If the coordinate is invalid, the fixed string "invalid" will be added to the string.
- Parameters
-
s | String to append the coordinates to. |
infix | Character to print between the two coordinates. |
precision | Number of digits after the decimal point the coordinate will be rounded to. |
◆ append_to_string() [2/2]
void osmium::geom::Coordinates::append_to_string |
( |
std::string & |
s, |
|
|
const char |
prefix, |
|
|
const char |
infix, |
|
|
const char |
suffix, |
|
|
int |
precision |
|
) |
| const |
|
inline |
Convert coordinates to text and append to given string. If the coordinate is invalid, the fixed string "invalid" will be added to the string between the prefix and suffix characters.
- Parameters
-
s | String to append the coordinates to. |
prefix | Character to print before the first coordinate. |
infix | Character to print between the two coordinates. |
suffix | Character to print after the second coordinate. |
precision | Number of digits after the decimal point the coordinate will be rounded to. |
◆ valid()
bool osmium::geom::Coordinates::valid |
( |
| ) |
const |
|
inlinenoexcept |
Coordinates are invalid if they have been default constructed.
double osmium::geom::Coordinates::x |
double osmium::geom::Coordinates::y |
The documentation for this struct was generated from the following file: