1#ifndef OSMSCOUT_UTIL_GEOBOX_H
2#define OSMSCOUT_UTIL_GEOBOX_H
43 GeoCoord minCoord=GeoCoord(0.0,0.0);
44 GeoCoord maxCoord=GeoCoord(0.0,0.0);
81 minCoord.Set(0.0,0.0);
82 maxCoord.Set(0.0,0.0);
114 bool openInterval=
true)
const
121 return minCoord.GetLat()<=
coord.GetLat() &&
122 maxCoord.GetLat()>
coord.GetLat() &&
123 minCoord.GetLon()<=
coord.GetLon() &&
124 maxCoord.GetLon()>
coord.GetLon();
127 return minCoord.GetLat()<=
coord.GetLat() &&
128 maxCoord.GetLat()>=
coord.GetLat() &&
129 minCoord.GetLon()<=
coord.GetLon() &&
130 maxCoord.GetLon()>=
coord.GetLon();
145 bool openInterval=
true)
const
147 if (!valid || !other.valid) {
152 return !(other.GetMaxLon()<minCoord.GetLon() ||
153 other.GetMinLon()>=maxCoord.GetLon() ||
154 other.GetMaxLat()<minCoord.GetLat() ||
155 other.GetMinLat()>=maxCoord.GetLat());
158 return !(other.GetMaxLon()<minCoord.GetLon() ||
159 other.GetMinLon()>maxCoord.GetLon() ||
160 other.GetMaxLat()<minCoord.GetLat() ||
161 other.GetMinLat()>maxCoord.GetLat());
210 return minCoord.GetLat();
218 return minCoord.GetLon();
226 return maxCoord.GetLat();
234 return maxCoord.GetLon();
242 return maxCoord.GetLon()-minCoord.GetLon();
250 return maxCoord.GetLat()-minCoord.GetLat();
#define OSMSCOUT_API
Definition CoreImportExport.h:45
double GetWidth() const
Definition GeoBox.h:240
double GetHeight() const
Definition GeoBox.h:248
const GeoCoord coord
Definition RouteStateAgent.h:49
GeoCoord GetMaxCoord() const
Definition GeoBox.h:198
GeoCoord GetMinCoord() const
Definition GeoBox.h:190
GeoCoord GetBottomLeft() const
Definition GeoBox.h:266
GeoCoord GetBottomRight() const
Definition GeoBox.h:274
double GetMaxLon() const
Definition GeoBox.h:232
double GetMaxLat() const
Definition GeoBox.h:224
GeoBox & operator=(const GeoBox &other)=default
GeoBox CropTo(const GeoBox &other) const
double GetMinLon() const
Definition GeoBox.h:216
bool operator==(const GeoBox &other) const
Definition GeoBox.h:65
GeoCoord GetCenter() const
GeoCoord GetTopRight() const
Definition GeoBox.h:292
GeoBox(const GeoBox &other)=default
bool Includes(const P &coord, bool openInterval=true) const
Definition GeoBox.h:113
bool IsValid() const
Definition GeoBox.h:182
void Invalidate()
Definition GeoBox.h:78
void Include(const GeoBox &other)
bool operator!=(const GeoBox &other) const
Definition GeoBox.h:70
bool Intersects(const GeoBox &other, bool openInterval=true) const
Definition GeoBox.h:144
double GetMinLat() const
Definition GeoBox.h:208
GeoBox Intersection(const GeoBox &other) const
void Include(const GeoCoord &point)
GeoCoord GetTopLeft() const
Definition GeoBox.h:283
double GetSize() const
Definition GeoBox.h:258
static GeoBox BoxByCenterAndRadius(const GeoCoord ¢er, const Distance &radius)
std::string GetDisplayText() const
void Set(const GeoCoord &coordA, const GeoCoord &coordB)
GeoBox(const GeoCoord &coordA, const GeoCoord &coordB)