diff options
author | Vladimir Byko-Ianko <v.bykoianko@corp.mail.ru> | 2019-05-27 15:06:53 +0300 |
---|---|---|
committer | mpimenov <mpimenov@users.noreply.github.com> | 2019-05-30 18:53:51 +0300 |
commit | b0868d6d3f371a2aff5db043b219906c95502a42 (patch) | |
tree | aeac2e18d7fdae208b0e2ee919afd19c356b6614 /kml | |
parent | c0fb90a4a8b1228144e564a1fd1734136201d549 (diff) |
[geometry] LatLon refactoring.
Diffstat (limited to 'kml')
-rw-r--r-- | kml/pykmlib/bindings.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/kml/pykmlib/bindings.cpp b/kml/pykmlib/bindings.cpp index fcd6eee3f6..debb199112 100644 --- a/kml/pykmlib/bindings.cpp +++ b/kml/pykmlib/bindings.cpp @@ -262,7 +262,7 @@ void VectorAdapter<m2::PointD>::Set(std::vector<m2::PointD> & v, boost::python:: auto const latLon = python_list_to_std_vector<ms::LatLon>(iterable); v.reserve(latLon.size()); for (size_t i = 0; i < latLon.size(); ++i) - v.emplace_back(MercatorBounds::LonToX(latLon[i].lon), MercatorBounds::LatToY(latLon[i].lat)); + v.emplace_back(MercatorBounds::LonToX(latLon[i].m_lon), MercatorBounds::LatToY(latLon[i].m_lat)); } std::string LatLonToString(ms::LatLon const & latLon); @@ -362,8 +362,8 @@ std::string LatLonToString(ms::LatLon const & latLon) { std::ostringstream out; out << "[" - << "lat:" << latLon.lat << ", " - << "lon:" << latLon.lon + << "lat:" << latLon.m_lat << ", " + << "lon:" << latLon.m_lon << "]"; return out.str(); } @@ -503,7 +503,7 @@ struct LatLonConverter static void construct(PyObject * objPtr, converter::rvalue_from_python_stage1_data * data) { ms::LatLon latLon = extract<ms::LatLon>(objPtr); - m2::PointD pt(MercatorBounds::LonToX(latLon.lon), MercatorBounds::LatToY(latLon.lat)); + m2::PointD pt(MercatorBounds::LonToX(latLon.m_lon), MercatorBounds::LatToY(latLon.m_lat)); void * storage = reinterpret_cast<converter::rvalue_from_python_storage<m2::PointD> *>(data)->storage.bytes; new (storage) m2::PointD(pt); @@ -730,8 +730,8 @@ BOOST_PYTHON_MODULE(pykmlib) .def("__str__", &VectorAdapter<uint8_t>::ToString); class_<ms::LatLon>("LatLon", init<double, double>()) - .def_readwrite("lat", &ms::LatLon::lat) - .def_readwrite("lon", &ms::LatLon::lon) + .def_readwrite("lat", &ms::LatLon::m_lat) + .def_readwrite("lon", &ms::LatLon::m_lon) .def("__str__", &LatLonToString); class_<m2::PointD>("PointD"); |