diff options
author | vng <viktor.govako@gmail.com> | 2012-02-14 00:16:49 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:34:04 +0300 |
commit | 0acd6d0d35646ffdd73b9f936e0ddb7f62c4cb34 (patch) | |
tree | 3694c5ab5fb2ab5f7992b937c6f88dc1f00bf01e /indexer/mercator.hpp | |
parent | 3214717687427989cea51e5000d6813917233657 (diff) |
Remove dummy MercatorBounds functions.
Diffstat (limited to 'indexer/mercator.hpp')
-rw-r--r-- | indexer/mercator.hpp | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/indexer/mercator.hpp b/indexer/mercator.hpp index 24bfe0ddc2..ae41831b61 100644 --- a/indexer/mercator.hpp +++ b/indexer/mercator.hpp @@ -50,25 +50,17 @@ struct MercatorBounds static double const degreeInMetres; - // TODO: - inline static double ConvertMetresToY(double lat, double metresValue) - { - return LatToY(lat + metresValue * degreeInMetres) - LatToY(lat); - } - - // TODO: - inline static double ConvertMetresToX(double lon, double metresValue) - { - return LonToX(lon + metresValue * degreeInMetres) - LonToX(lon); - } - - /// @return mercator bound points in rect + /// @name Get rect for center point (lon, lat) and dimensions in metres. + //@{ + /// @return mercator rect. static m2::RectD MetresToXY(double lon, double lat, double lonMetresR, double latMetresR); + inline static m2::RectD MetresToXY(double lon, double lat, double metresR) { return MetresToXY(lon, lat, metresR, metresR); } + //@} inline static m2::RectD RectByCenterXYAndSizeInMeters(double centerX, double centerY, double sizeX, double sizeY) @@ -79,5 +71,10 @@ struct MercatorBounds return MetresToXY(XToLon(centerX), YToLat(centerY), sizeX, sizeY); } + inline static m2::RectD RectByCenterXYAndSizeInMeters(m2::PointD const & center, double size) + { + return RectByCenterXYAndSizeInMeters(center.x, center.y, size, size); + } + static double GetCellID2PointAbsEpsilon() { return 1.0E-4; } }; |