31#ifndef DRAIN_BOUNDING_BOX_H_
32#define DRAIN_BOUNDING_BOX_H_
98 Unit guessUnit(
double x,
double y){
104 if (isWithin(x, -M_PI,+M_PI) && isWithin(y, -M_PI,+M_PI)){
107 else if (isWithin(x, -180.0,+180.0) && isWithin(y, -90.0,+90.0)){
117 bool isWithin(
double x,
double min,
double max){
118 return (x > min) && (x < max);
Container for geographical extent spanned by lowerLeft(x,y) and upperRight(x,y). Assumes longitude=x ...
Definition BoundingBox.h:47
bool isMetric() const
Check if this Bounding Box has metric coordinates, instead of degrees.
Definition BoundingBox.h:92
static bool isMetric(const Point2D< double > &p)
Checks if a coordinate (x,y) == (lon,lat) looks like metric, that is, beyond [-90,...
Definition BoundingBox.h:74
static bool isMetric(double x, double limit)
Checks if a coordinate looks like metric, that is, beyond [-90,+90] or [-180,+180].
Definition BoundingBox.h:81
Definition DataSelector.cpp:1277
Rectange defined through lower left and upper right coordinates.
Definition Rectangle.h:65
bool limit(const double &lowerBound, const double &upperBound, double &x)
Limits x between interval [lowerBound, upperBound].
Definition Rectangle.h:167