diff options
author | Maxim Pimenov <m@maps.me> | 2018-11-26 16:44:37 +0300 |
---|---|---|
committer | Maksim Andrianov <maksimandrianov1@gmail.com> | 2018-11-26 19:11:42 +0300 |
commit | 356ac180326847a73985d69938e7baaef02882c1 (patch) | |
tree | cd81c771122a799b1c982bc28d7dd8b87d2aad4a /editor | |
parent | 9744c0c04170b07bc848611b8cca7358d3f057bb (diff) |
[coding] Removed the CellId epsilon.
In was used as eps in meters in some cases and eps in mercator in others.
Its value was hard to justify and so were its use cases. We're better off
with less epsilons for now.
Also renamed Metres to Meters in the mercator code.
Diffstat (limited to 'editor')
-rw-r--r-- | editor/server_api.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/server_api.cpp b/editor/server_api.cpp index 47784c68fe..51c3faff18 100644 --- a/editor/server_api.cpp +++ b/editor/server_api.cpp @@ -184,11 +184,11 @@ OsmOAuth::Response ServerApi06::GetXmlFeaturesInRect(double minLat, double minLo OsmOAuth::Response ServerApi06::GetXmlFeaturesAtLatLon(double lat, double lon, double radiusInMeters) const { - double const latDegreeOffset = radiusInMeters * MercatorBounds::degreeInMetres; + double const latDegreeOffset = radiusInMeters * MercatorBounds::kDegreesInMeter; double const minLat = max(-90.0, lat - latDegreeOffset); double const maxLat = min( 90.0, lat + latDegreeOffset); double const cosL = max(cos(base::DegToRad(max(fabs(minLat), fabs(maxLat)))), 0.00001); - double const lonDegreeOffset = radiusInMeters * MercatorBounds::degreeInMetres / cosL; + double const lonDegreeOffset = radiusInMeters * MercatorBounds::kDegreesInMeter / cosL; double const minLon = max(-180.0, lon - lonDegreeOffset); double const maxLon = min( 180.0, lon + lonDegreeOffset); return GetXmlFeaturesInRect(minLat, minLon, maxLat, maxLon); |