libdballe
9.11
|
Range of latitudes. More...
#include <types.h>
Public Member Functions | |
LatRange ()=default | |
Construct a LatRange matching any latitude. | |
LatRange (int min, int max) | |
Construct a LatRange given integer extremes. | |
LatRange (double min, double max) | |
Construct a LatRange given extremes in degrees. | |
bool | operator== (const LatRange &lr) const |
bool | operator!= (const LatRange &lr) const |
bool | is_missing () const |
Return true if the LatRange matches any latitude. | |
double | dmin () const |
Get the lower extreme as double. | |
double | dmax () const |
Get the upper extreme as double. | |
void | get (double &min, double &max) const |
Get the extremes as double. | |
void | set (int min, int max) |
Set the extremes as integers. | |
void | set (double min, double max) |
Set the extremes in degrees. | |
bool | contains (int lat) const |
Check if a point is inside this range (extremes included) | |
bool | contains (double lat) const |
Check if a point is inside this range (extremes included) | |
bool | contains (const LatRange &lr) const |
Check if a range is inside this range (extremes included) | |
int | print (FILE *out, const char *end="\) const |
Print the LatRange to a FILE*. More... | |
Public Attributes | |
int | imin = IMIN |
Minimum latitude. | |
int | imax = IMAX |
Maximum latitude. | |
Static Public Attributes | |
static constexpr int | IMIN = -9000000 |
Minimum possible integer value. | |
static constexpr int | IMAX = 9000000 |
Maximum possible integer value. | |
static constexpr double | DMIN = -90.0 |
Minimum possible double value. | |
static constexpr double | DMAX = 90.0 |
Maximum possible double value. | |
Range of latitudes.
When given as an integer, a latitude 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 value is intended to be in degrees.
Values are matched between imin and imax, both extremes are considered part of the range.
Invariant: imin <= imax.
int dballe::LatRange::print | ( | FILE * | out | ) |