Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLev Dragunov <l.dragunov@corp.mail.ru>2015-07-03 17:00:24 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:54:20 +0300
commit1fa6d796e4d7e1426f588103b1be22a09fd4a8d1 (patch)
tree7a5066bcb661875a5500987fc736b42333da604f /indexer
parent005724e44e35b7619ab513049ad4b97adc1de0da (diff)
PR fixes
Diffstat (limited to 'indexer')
-rw-r--r--indexer/mercator.hpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/indexer/mercator.hpp b/indexer/mercator.hpp
index 5191821bc1..c24028f88d 100644
--- a/indexer/mercator.hpp
+++ b/indexer/mercator.hpp
@@ -6,6 +6,7 @@
// I sugest considering moving this compiation unit to another place. Probably to geometry.
#pragma once
+#include "geometry/latlon.hpp"
#include "geometry/point2d.hpp"
#include "geometry/rect2d.hpp"
@@ -107,6 +108,16 @@ struct MercatorBounds
return m2::PointD(LonToX(lon), LatToY(lat));
}
+ inline static m2::PointD FromLatLon(ms::LatLon const & point)
+ {
+ return FromLatLon(point.lat, point.lon);
+ }
+
+ inline static ms::LatLon ToLatLon(m2::PointD const & point)
+ {
+ return {YToLat(point.y), XToLon(point.x)};
+ }
+
/// Converts lat lon rect to mercator one
inline static m2::RectD FromLatLonRect(m2::RectD const & latLonRect)
{