get rid of libboost dependency
This commit is contained in:
parent
4674f0f116
commit
d387314715
18 changed files with 282 additions and 104 deletions
|
|
@ -31,10 +31,10 @@ bool BBoxIdx::contains(const Point<float>& p) const {
|
|||
// _____________________________________________________________________________
|
||||
util::geo::Box<float> BBoxIdx::getFullWebMercBox() const {
|
||||
return util::geo::FBox(
|
||||
util::geo::latLngToWebMerc<float>(_root.box.min_corner().get<1>(),
|
||||
_root.box.min_corner().get<0>()),
|
||||
util::geo::latLngToWebMerc<float>(_root.box.max_corner().get<1>(),
|
||||
_root.box.max_corner().get<0>()));
|
||||
util::geo::latLngToWebMerc<float>(_root.box.getLowerLeft().getY(),
|
||||
_root.box.getLowerLeft().getX()),
|
||||
util::geo::latLngToWebMerc<float>(_root.box.getUpperRight().getY(),
|
||||
_root.box.getUpperRight().getX()));
|
||||
}
|
||||
|
||||
// _____________________________________________________________________________
|
||||
|
|
|
|||
|
|
@ -991,7 +991,7 @@ double OsmBuilder::webMercDistFactor(const util::geo::FPoint& a) const {
|
|||
// euclidean distance on web mercator is in meters on equator,
|
||||
// and proportional to cos(lat) in both y directions
|
||||
|
||||
double lat = 2 * atan(exp(a.get<1>() / 6378137.0)) - 1.5707965;
|
||||
double lat = 2 * atan(exp(a.getY() / 6378137.0)) - 1.5707965;
|
||||
return cos(lat);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue