|
libdballe
7.7
|
Coordinates. More...
#include <types.h>
Public Member Functions | |
| Coords () | |
| Construct a missing Coords. | |
| Coords (int lat, int lon) | |
| Construct a coords from integers in 1/100000 of a degree. | |
| Coords (double lat, double lon) | |
| Construct a coords from values in degrees. | |
| bool | is_missing () const |
| Check if these coordinates are undefined. | |
| void | set (int lat, int lon) |
| Set from integers in 1/100000 of a degree. | |
| void | set (double lat, double lon) |
| Set from values in degrees. | |
| double | dlat () const |
| Get the latitude in degrees. | |
| double | dlon () const |
| Get the longitude in degrees. | |
| int | compare (const Coords &o) const |
| Compare two Coords strutures, for use in sorting. More... | |
| bool | operator== (const Coords &dt) const |
| bool | operator!= (const Coords &dt) const |
| bool | operator< (const Coords &dt) const |
| bool | operator> (const Coords &dt) const |
| bool | operator<= (const Coords &dt) const |
| bool | operator>= (const Coords &dt) const |
| void | print (FILE *out, const char *end="\n") const |
| Print to an output stream. | |
Data Fields | |
| int | lat |
| Latitude in 1/100000 of a degree (5 significant digits preserved) | |
| int | lon |
| Longitude in 1/100000 of a degree (5 significant digits preserved) and normalised between -180.0 and 180.0. | |
Coordinates.
When given as an integer, a latitude/longitude value is intended in 1/100000 of a degree, which is the maximum resolution supported by DB-All.e.
When given as a double a latitude/longitude value is intended to be in degrees.
Longitude values are normalized between -180.0 and 180.0.
| int dballe::Coords::compare | ( | const Coords & | o | ) | const |
1.8.9.1