diff options
-rw-r--r-- | generator/feature_builder.cpp | 31 | ||||
-rw-r--r-- | generator/feature_merger.cpp | 16 | ||||
-rw-r--r-- | indexer/coding_params.cpp | 2 | ||||
-rw-r--r-- | indexer/feature.hpp | 10 | ||||
-rw-r--r-- | indexer/feature_data.cpp | 11 | ||||
-rw-r--r-- | indexer/feature_data.hpp | 2 | ||||
-rw-r--r-- | indexer/indexer_tests/geometry_coding_test.cpp | 38 | ||||
-rw-r--r-- | indexer/indexer_tests/geometry_serialization_test.cpp | 69 | ||||
-rw-r--r-- | indexer/indexer_tests/indexer_tests.pro | 6 | ||||
-rw-r--r-- | indexer/indexer_tests/point_to_int64_test.cpp | 44 | ||||
-rw-r--r-- | indexer/indexer_tests/test_polylines.cpp | 6 | ||||
-rw-r--r-- | indexer/indexer_tests/test_polylines.hpp | 9 |
12 files changed, 204 insertions, 40 deletions
diff --git a/generator/feature_builder.cpp b/generator/feature_builder.cpp index 0dc2293395..c9c1d1cecf 100644 --- a/generator/feature_builder.cpp +++ b/generator/feature_builder.cpp @@ -9,6 +9,8 @@ #include "../coding/byte_stream.hpp" +#include "../base/logging.hpp" + using namespace feature; @@ -56,7 +58,15 @@ void FeatureBuilder1::SetAreaAddHoles(list<points_t> const & holes) ASSERT ( !i->empty(), (*this) ); if (rgn.Contains(i->front())) + { +#ifdef DEBUG + m2::RectD r; + CalcRect(*i, r); + ASSERT ( m_LimitRect.IsRectInside(r), (m_LimitRect, r) ); +#endif + m_Polygons.push_back(*i); + } } } @@ -199,7 +209,10 @@ bool FeatureBuilder1::operator == (FeatureBuilder1 const & fb) const } if (!is_equal(m_LimitRect, fb.m_LimitRect)) + { + //LOG(LERROR, ("Different rects: ", m_LimitRect, fb.m_LimitRect)); return false; + } if (m_Polygons.size() != fb.m_Polygons.size()) return false; @@ -208,7 +221,10 @@ bool FeatureBuilder1::operator == (FeatureBuilder1 const & fb) const list<points_t>::const_iterator j = fb.m_Polygons.begin(); for (; i != m_Polygons.end(); ++i, ++j) if (!is_equal(*i, *j)) + { + //LOG(LERROR, ("Different points: ", *i, *j)); return false; + } return true; } @@ -272,7 +288,7 @@ void FeatureBuilder1::Serialize(buffer_t & data) const buffer_t tmp(data); FeatureBuilder1 fb; fb.Deserialize(tmp); - ASSERT ( fb == *this, (*this) ); + ASSERT ( fb == *this, ("Source feature: ", *this, "Deserialized feature: ", fb) ); #endif } @@ -283,8 +299,9 @@ void FeatureBuilder1::Deserialize(buffer_t & data) ArrayByteSource source(&data[0]); m_Params.Read(source); - EGeomType const type = m_Params.GetGeomType(); + m_LimitRect.MakeEmpty(); + EGeomType const type = m_Params.GetGeomType(); if (type == GEOM_POINT) { CoordPointT const center = PointU2PointD( @@ -333,12 +350,16 @@ string debug_print(FeatureBuilder1 const & f) switch (f.GetGeomType()) { case GEOM_POINT: out << "(" << f.m_Center << ")"; break; - case GEOM_LINE: out << "line with " << f.GetPointsCount() << "points"; break; - case GEOM_AREA: out << "area with " << f.GetPointsCount() << "points"; break; + case GEOM_LINE: out << "line with " << f.GetPointsCount() << " points"; break; + case GEOM_AREA: out << "area with " << f.GetPointsCount() << " points"; break; default: out << "ERROR: unknown geometry type"; break; } - return out.str(); + + return (out.str() + " " + + debug_print(f.m_LimitRect) + " " + + debug_print(f.m_Params) + " " + + debug_print(f.m_Polygons)); } /////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/generator/feature_merger.cpp b/generator/feature_merger.cpp index cbc8a5df43..359c93a66e 100644 --- a/generator/feature_merger.cpp +++ b/generator/feature_merger.cpp @@ -1,5 +1,6 @@ #include "feature_merger.hpp" +#include "../indexer/feature.hpp" #include "../indexer/point_to_int64.hpp" #include "../indexer/classificator.hpp" @@ -41,22 +42,33 @@ void MergedFeatureBuilder1::AppendFeature(MergedFeatureBuilder1 const & fb, bool m_isRound = false; - for (size_t i = 0; i < fbG.size(); ++i) - m_LimitRect.Add(fbG[i]); + using namespace feature; if (fromBegin) { if (toBack) + { thisG.insert(thisG.end(), fbG.begin() + 1, fbG.end()); + CalcRect(fbG.begin() + 1, fbG.end(), m_LimitRect); + } else + { thisG.insert(thisG.begin(), fbG.begin(), fbG.end() - 1); + CalcRect(fbG.begin(), fbG.end() - 1, m_LimitRect); + } } else { if (toBack) + { thisG.insert(thisG.end(), fbG.rbegin() + 1, fbG.rend()); + CalcRect(fbG.rbegin() + 1, fbG.rend(), m_LimitRect); + } else + { thisG.insert(thisG.begin(), fbG.rbegin(), fbG.rend() - 1); + CalcRect(fbG.rbegin(), fbG.rend() - 1, m_LimitRect); + } } } diff --git a/indexer/coding_params.cpp b/indexer/coding_params.cpp index 05cd0ea077..985513e492 100644 --- a/indexer/coding_params.cpp +++ b/indexer/coding_params.cpp @@ -7,7 +7,7 @@ namespace serial { CodingParams::CodingParams() - : m_BasePointUint64(0), m_CoordBits(30) + : m_BasePointUint64(0), m_CoordBits(POINT_COORD_BITS) { m_BasePoint = m2::Uint64ToPointU(m_BasePointUint64); } diff --git a/indexer/feature.hpp b/indexer/feature.hpp index 7095f2f214..075c041309 100644 --- a/indexer/feature.hpp +++ b/indexer/feature.hpp @@ -281,10 +281,16 @@ private: namespace feature { + template <class IterT> + void CalcRect(IterT b, IterT e, m2::RectD & rect) + { + while (b != e) + rect.Add(*b++); + } + template <class TCont> void CalcRect(TCont const & points, m2::RectD & rect) { - for (size_t i = 0; i < points.size(); ++i) - rect.Add(points[i]); + CalcRect(points.begin(), points.end(), rect); } } diff --git a/indexer/feature_data.cpp b/indexer/feature_data.cpp index 3392688305..26da481e22 100644 --- a/indexer/feature_data.cpp +++ b/indexer/feature_data.cpp @@ -143,3 +143,14 @@ uint8_t FeatureParams::GetHeader() const return header; } + +string debug_print(FeatureParams const & p) +{ + ostringstream out; + + out << "Types: "; + for (size_t i = 0; i < p.m_Types.size(); ++i) + out << p.m_Types[i] << "; "; + + return out.str(); +} diff --git a/indexer/feature_data.hpp b/indexer/feature_data.hpp index 3a1fe60b2d..0b57aefbd4 100644 --- a/indexer/feature_data.hpp +++ b/indexer/feature_data.hpp @@ -210,3 +210,5 @@ public: BaseT::Read(src, header, GetGeomType()); } }; + +string debug_print(FeatureParams const & p); diff --git a/indexer/indexer_tests/geometry_coding_test.cpp b/indexer/indexer_tests/geometry_coding_test.cpp index 0dc3e3c7f3..f666a18448 100644 --- a/indexer/indexer_tests/geometry_coding_test.cpp +++ b/indexer/indexer_tests/geometry_coding_test.cpp @@ -1,20 +1,21 @@ -#include "../geometry_coding.hpp" #include "../../testing/testing.hpp" -//#include "../../indexer/mercator.hpp" -//#include "../../indexer/point_to_int64.hpp" +#include "../geometry_coding.hpp" +#include "../point_to_int64.hpp" +#include "../mercator.hpp" +#include "../coding_params.hpp" + +#include "test_polylines.hpp" #include "../../geometry/geometry_tests/large_polygon.hpp" #include "../../geometry/distance.hpp" #include "../../geometry/simplification.hpp" -//#include "../../geometry/pointu_to_uint64.hpp" #include "../../coding/byte_stream.hpp" #include "../../coding/varint.hpp" #include "../../coding/writer.hpp" #include "../../base/logging.hpp" -//#include "../../base/array_adapters.hpp" typedef m2::PointU PU; @@ -95,7 +96,7 @@ void TestPolylineEncode(string testName, size_t const count = points.size(); if (count == 0) return; - m2::PointU const basePoint = points[count / 2]; + m2::PointU const basePoint = serial::CodingParams().GetBasePoint(); vector<uint64_t> deltas; deltas.resize(count); @@ -171,3 +172,28 @@ UNIT_TEST(EncodePolyline) } // see 476c1d1d125f0c2deb8c commit for special decode test + +namespace +{ + inline m2::PointU D2U(m2::PointD const & p) + { + return PointD2PointU(p, POINT_COORD_BITS); + } + + inline m2::PointU GetMaxPoint() + { + return D2U(m2::PointD(MercatorBounds::maxX, MercatorBounds::maxY)); + } +} + +UNIT_TEST(DecodeEncodePolyline_DataSet1) +{ + size_t const count = ARRAY_SIZE(index_test::arr1); + vector<m2::PointU> points; + points.reserve(count); + for (size_t i = 0; i < count; ++i) + points.push_back(D2U(index_test::arr1[i])); + + TestPolylineEncode("DataSet1", points, GetMaxPoint(), + &geo_coding::EncodePolyline, &geo_coding::DecodePolyline); +} diff --git a/indexer/indexer_tests/geometry_serialization_test.cpp b/indexer/indexer_tests/geometry_serialization_test.cpp new file mode 100644 index 0000000000..e42f0bfe3c --- /dev/null +++ b/indexer/indexer_tests/geometry_serialization_test.cpp @@ -0,0 +1,69 @@ +#include "../../testing/testing.hpp" + +#include "test_polylines.hpp" + +#include "../geometry_serialization.hpp" +#include "../coding_params.hpp" +#include "../mercator.hpp" + +#include "../../coding/reader.hpp" +#include "../../coding/byte_stream.hpp" + +#include "../../base/logging.hpp" + + +// Copy-Paste from feature_builder.cpp +namespace +{ + bool is_equal(double d1, double d2) + { + //return my::AlmostEqual(d1, d2, 100000000); + return (fabs(d1 - d2) < MercatorBounds::GetCellID2PointAbsEpsilon()); + } + + bool is_equal(m2::PointD const & p1, m2::PointD const & p2) + { + return p1.EqualDxDy(p2, MercatorBounds::GetCellID2PointAbsEpsilon()); + } + + bool is_equal(m2::RectD const & r1, m2::RectD const & r2) + { + return (is_equal(r1.minX(), r2.minX()) && + is_equal(r1.minY(), r2.minY()) && + is_equal(r1.maxX(), r2.maxX()) && + is_equal(r1.maxY(), r2.maxY())); + } +} + + +UNIT_TEST(SaveLoadPolyline_DataSet1) +{ + using namespace index_test; + + vector<m2::PointD> data1(arr1, arr1 + ARRAY_SIZE(arr1)); + + vector<char> buffer; + PushBackByteSink<vector<char> > w(buffer); + + serial::CodingParams cp; + serial::SaveOuterPath(data1, cp, w); + + vector<m2::PointD> data2; + ArrayByteSource r(&buffer[0]); + serial::LoadOuterPath(r, cp, data2); + + TEST_EQUAL(data1.size(), data2.size(), ()); + + m2::RectD r1, r2; + for (size_t i = 0; i < data1.size(); ++i) + { + r1.Add(data1[i]); + r2.Add(data2[i]); + + TEST(is_equal(data1[i], data2[i]), (data1[i], data2[i])); + } + + LOG(LINFO, (data2)); + + TEST(is_equal(r1, r2), (r1, r2)); +} diff --git a/indexer/indexer_tests/indexer_tests.pro b/indexer/indexer_tests/indexer_tests.pro index c230eeb797..9e5b971e87 100644 --- a/indexer/indexer_tests/indexer_tests.pro +++ b/indexer/indexer_tests/indexer_tests.pro @@ -14,6 +14,7 @@ win32:LIBS += -lopengl32 -lShell32 win32-g++:LIBS += -lpthread HEADERS += \ + test_polylines.hpp SOURCES += \ @@ -31,3 +32,8 @@ SOURCES += \ geometry_coding_test.cpp \ triangles_tree_coding_test.cpp \ scales_test.cpp \ + test_polylines.cpp \ + geometry_serialization_test.cpp \ + + + diff --git a/indexer/indexer_tests/point_to_int64_test.cpp b/indexer/indexer_tests/point_to_int64_test.cpp index e3a48788a1..6e24f13bd6 100644 --- a/indexer/indexer_tests/point_to_int64_test.cpp +++ b/indexer/indexer_tests/point_to_int64_test.cpp @@ -1,12 +1,16 @@ #include "../../testing/testing.hpp" + +#include "test_polylines.hpp" + #include "../cell_id.hpp" + #include "../../std/cmath.hpp" namespace { double const eps = MercatorBounds::GetCellID2PointAbsEpsilon(); - uint32_t const coordBits = 30; + uint32_t const coordBits = POINT_COORD_BITS; void CheckEqualPoints(CoordPointT const & p1, CoordPointT const & p2) { @@ -42,29 +46,6 @@ UNIT_TEST(PointToInt64_Smoke) } } -/* -UNIT_TEST(PointToInt64_908175295886057813) -{ - int64_t const id1 = 908175295886057813LL; - CoordPointT const pt1 = Int64ToPoint(id1); - int64_t const id2 = PointToInt64(pt1); - TEST_EQUAL(id1, id2, (pt1)); -} -*/ - -/* -UNIT_TEST(PointToInt64_Values) -{ - CoordPointT const p = PointU2PointD(m2::PointU(3225901878, 23488265)); - - TEST_GREATER_OR_EQUAL(p.first, -180.0, ()); - TEST_GREATER_OR_EQUAL(p.second, -180.0, ()); - - TEST_LESS_OR_EQUAL(p.first, 180.0, ()); - TEST_LESS_OR_EQUAL(p.second, 180.0, ()); -} -*/ - UNIT_TEST(PointToInt64_Grid) { int const delta = 5; @@ -102,3 +83,18 @@ UNIT_TEST(PointToInt64_Bounds) fabs(pt.second - pt1.second) <= (fabs(arrEps[iY]) + eps), (pt, pt1)); } } + +UNIT_TEST(PointToInt64_DataSet1) +{ + for(size_t i = 0; i < ARRAY_SIZE(index_test::arr1); ++i) + { + CoordPointT const pt(index_test::arr1[i].x, index_test::arr1[i].y); + int64_t const id = PointToInt64(pt, coordBits); + CoordPointT const pt1 = Int64ToPoint(id, coordBits); + + CheckEqualPoints(pt, pt1); + + int64_t const id1 = PointToInt64(pt1, coordBits); + TEST_EQUAL(id, id1, (pt, pt1)); + } +} diff --git a/indexer/indexer_tests/test_polylines.cpp b/indexer/indexer_tests/test_polylines.cpp new file mode 100644 index 0000000000..ed64a82693 --- /dev/null +++ b/indexer/indexer_tests/test_polylines.cpp @@ -0,0 +1,6 @@ +#include "test_polylines.hpp" + +namespace index_test +{ + P arr1[376] = { P(25.624035299999999182, 72.26346513007850092), P(25.624273200000001083, 72.263461698303601111), P(25.624488899999999347, 72.26341365347376211), P(25.624979400000000851, 72.263304218156179104), P(25.626030799999998777, 72.263025101705878228), P(25.629390999999998257, 72.261676817778678128), P(25.630162399999999678, 72.26138836631159279), P(25.631299500000000791, 72.260963603282490908), P(25.63236829999999955, 72.26051310574631259), P(25.63325580000000059, 72.260190152533994024), P(25.633720499999999021, 72.260019906865807116), P(25.634314799999998513, 72.259865485075735592), P(25.634578999999998672, 72.259830215951140531), P(25.635424199999999217, 72.259772832171691448), P(25.635776400000001018, 72.259834791404088605), P(25.638406499999998545, 72.260604806439260983), P(25.639231599999998679, 72.260931765228107793), P(25.639867699999999928, 72.261237563690428942), P(25.640699399999999031, 72.261850499331046649), P(25.643624299999999039, 72.264447578158552687), P(25.644772700000000754, 72.265904403664706024), P(25.645413800000000037, 72.267106341816230497), P(25.646751600000001758, 72.270404536824941033), P(25.64890219999999843, 72.275985791150915816), P(25.649064599999999103, 72.276404165523842948), P(25.650549500000000336, 72.279974564589863917), P(25.651433600000000723, 72.281545386607334081), P(25.652029899999998719, 72.282193025251160634), P(25.652814700000000414, 72.282915237415323872), P(25.654197199999998702, 72.283799562153532747), P(25.656540400000000801, 72.285055792411071707), P(25.658162999999998277, 72.286263412818769325), P(25.661959599999999426, 72.289916920742129491), P(25.663380199999998865, 72.291039561736027963), P(25.665810499999999195, 72.292780588759853799), P(25.6700361000000008, 72.29585629709197292), P(25.670962599999999298, 72.296655718166547899), P(25.672222699999998952, 72.297961211704517837), P(25.673103499999999855, 72.29896171301187735), P(25.674837499999998869, 72.300952077677095531), P(25.676358000000000459, 72.302732468128681376), P(25.678018200000000348, 72.304444228347662715), P(25.680309600000001069, 72.306619426588397914), P(25.682252600000001763, 72.308208994982337003), P(25.685880300000000886, 72.310749482551628375), P(25.6871223999999998, 72.311619291531712861), P(25.689502399999998516, 72.313337574126506979), P(25.689994200000001001, 72.313685586072296019), P(25.691337099999998372, 72.314639003020189989), P(25.694014100000000411, 72.316465930359882464), P(25.696650399999999337, 72.318133963117716689), P(25.697924300000000386, 72.31863598381848135), P(25.699229800000001234, 72.31891418618496914), P(25.700213699999999051, 72.319045273707061483), P(25.703616300000000194, 72.319271576784373678), P(25.707311499999999427, 72.319273484907995453), P(25.715181600000001083, 72.318046763400587906), P(25.72608460000000008, 72.315978426880036523), P(25.728649600000000675, 72.31539857900408208), P(25.730824299999998317, 72.315156452495600092), P(25.732753200000001215, 72.314945427265811873), P(25.736661200000000349, 72.315042353781024076), P(25.74480259999999987, 72.315568583243575063), P(25.747831600000001373, 72.315649864883624787), P(25.749809599999998966, 72.315866807206518274), P(25.752535200000000515, 72.316023647210727177), P(25.755610000000000781, 72.315910501039496694), P(25.760463999999998919, 72.315272459413776573), P(25.762314700000001011, 72.315021747344800929), P(25.763456399999999036, 72.314812630534717641), P(25.763716200000001066, 72.31478954377344337), P(25.771413500000001306, 72.314102668549878672), P(25.779617200000000565, 72.313375160856324442), P(25.784148800000000534, 72.313357035273327256), P(25.790238899999998523, 72.313577786126856495), P(25.793676300000001334, 72.313716876708198811), P(25.796280599999999339, 72.314048100429985766), P(25.798680499999999682, 72.31463614103191162), P(25.800190700000001698, 72.315239260045032665), P(25.803071100000000371, 72.316310615756250968), P(25.806439499999999754, 72.316835901112042961), P(25.809219599999998707, 72.316657116642062419), P(25.813906700000000427, 72.315918133153061831), P(25.817769800000000657, 72.31543750249576874), P(25.819804099999998925, 72.315482531661231747), P(25.823219200000000484, 72.315995217547779816), P(25.824360999999999677, 72.316092908788874638), P(25.825752500000000111, 72.316000750836963107), P(25.833053499999998337, 72.315183355397863352), P(25.835087900000001326, 72.314863574077250519), P(25.836477299999998536, 72.314986830897922232), P(25.838510800000001666, 72.315843910886087542), P(25.84021669999999915, 72.316586137240363996), P(25.845591399999999993, 72.318366369042564656), P(25.847287900000001315, 72.318912278071522337), P(25.852937300000000675, 72.321233538069833457), P(25.857534099999998745, 72.324114950429262194), P(25.858493899999999144, 72.324638770105451613), P(25.859516599999999187, 72.325101910243901671), P(25.860960299999998568, 72.325309341574609334), P(25.864481800000000078, 72.325170990340012622), P(25.866295099999998541, 72.325066225249685203), P(25.871619400000000155, 72.324758609934391984), P(25.873917800000000966, 72.324524655307570242), P(25.875719000000000136, 72.324229064532204347), P(25.882352300000000866, 72.322516991669758113), P(25.886094899999999797, 72.321551632301222412), P(25.891463999999999146, 72.320154280548763381), P(25.892594599999998906, 72.32000410941930113), P(25.893775399999999109, 72.320041127430243932), P(25.895055100000000436, 72.320205228136387632), P(25.901716900000000265, 72.321479884460799781), P(25.905201399999999268, 72.322148897878847151), P(25.906758400000001075, 72.322300409542663147), P(25.908453200000000294, 72.322276366107203671), P(25.910453700000001476, 72.322039939449879853), P(25.912611200000000622, 72.321379323121732341), P(25.914446699999999169, 72.320507670602822259), P(25.915890699999998503, 72.319578403757603269), P(25.916971199999998987, 72.318721085380474278), P(25.923277999999999821, 72.312682767056259081), P(25.924315100000001166, 72.311643903530907096), P(25.925479700000000349, 72.310661910829537646), P(25.926380200000000542, 72.31012846985993292), P(25.927288000000000778, 72.309673827336439444), P(25.929170299999999116, 72.308742039167825055), P(25.931695000000001272, 72.307558244187632113), P(25.935542200000000435, 72.305689970006980616), P(25.936291600000000557, 72.305420216334297834), P(25.937011699999999337, 72.3052109385934898), P(25.937444899999999137, 72.305171830245583919), P(25.938065999999999178, 72.305126426436075349), P(25.939194700000001603, 72.305346959512363014), P(25.941637199999998842, 72.306187700803491225), P(25.951531899999999098, 72.309363611414866568), P(25.958591599999998323, 72.311600021678131611), P(25.961859900000000323, 72.312588133461261464), P(25.9623209000000017, 72.312845323461488078), P(25.962808800000001241, 72.313126745396871797), P(25.963783500000001681, 72.313929806056449934), P(25.964454100000001091, 72.315054565005411291), P(25.966293799999998981, 72.319575350745964215), P(25.966609900000001687, 72.320173934482440359), P(25.966938999999999993, 72.320628647970096381), P(25.968776200000000642, 72.322731857094510133), P(25.969766299999999859, 72.323772036806516894), P(25.97039970000000153, 72.324406914991570261), P(25.971057800000000526, 72.324904784282267656), P(25.972805199999999815, 72.325716763759459127), P(25.973508700000000005, 72.326106631888762877), P(25.974174900000001287, 72.326699167072590058), P(25.974623600000001034, 72.327462886785923502), P(25.97499170000000035, 72.32822527930542833), P(25.975826399999998984, 72.329784823533856297), P(25.976481499999998448, 72.330935420885211329), P(25.977230399999999833, 72.332212952428704966), P(25.978115400000000079, 72.333512265445278899), P(25.9789551000000003, 72.33474671239962106), P(25.980276700000001, 72.336402410819303554), P(25.98169719999999927, 72.337880836033434662), P(25.983172299999999666, 72.33911288186702393), P(25.984414600000000917, 72.340068567971513858), P(25.985398499999998734, 72.340636603533639004), P(25.986058100000001048, 72.340908025445514795), P(25.987230000000000274, 72.341316496490946975), P(25.988157300000001015, 72.341676869267246275), P(25.991148400000000152, 72.342299318530393748), P(25.997876999999999015, 72.343701138883602653), P(25.999752600000000768, 72.344154484369809666), P(26.001479700000000861, 72.344723890629211382), P(26.003023999999999916, 72.345420432028205937), P(26.005314899999998346, 72.346859159309715892), P(26.007066099999999409, 72.348322733682408625), P(26.008686999999998335, 72.35014618535842601), P(26.012360000000001037, 72.354910262506038521), P(26.013286199999999582, 72.355943685106993257), P(26.013858500000001328, 72.35652369166834319), P(26.014633599999999802, 72.357135968669368253), P(26.015746700000001113, 72.357673410043958029), P(26.017126499999999822, 72.358212001250265644), P(26.020520199999999988, 72.359278695677289761), P(26.021437599999998724, 72.359644892510004865), P(26.022532699999999295, 72.360275718006846546), P(26.028545999999998628, 72.365263533617877556), P(26.029226600000001213, 72.365797602942478761), P(26.030111600000001459, 72.366317546512846093), P(26.032004199999999372, 72.367306080501194288), P(26.033209299999999331, 72.367834246590078351), P(26.034265699999998844, 72.368067397148493569), P(26.035592099999998794, 72.368224167962054594), P(26.03677019999999942, 72.368129074294643033), P(26.043432299999999202, 72.366408627750374194), P(26.045431499999999403, 72.365842856777021552), P(26.048415399999999664, 72.36504242213915461), P(26.052753299999999115, 72.363920454888528866), P(26.05556269999999941, 72.363008918012667436), P(26.060303699999998628, 72.360393712052541559), P(26.065962500000001256, 72.35698705139280662), P(26.067612400000001571, 72.356026924714299753), P(26.069255399999999412, 72.355021374242639354), P(26.070335599999999943, 72.354163985856629893), P(26.071483900000000489, 72.353231772141796796), P(26.073087300000000965, 72.351530224288538307), P(26.07495580000000146, 72.349052146600300262), P(26.077375199999998756, 72.345412414793742073), P(26.079008800000000434, 72.34322240936705839), P(26.080636800000000619, 72.341554327036718064), P(26.081818800000000635, 72.340620379333103074), P(26.083176200000000478, 72.339615440891947173), P(26.085581000000001239, 72.338285853103528211), P(26.092078799999999461, 72.335142167729841844), P(26.099516500000000008, 72.332061609286498083), P(26.102282500000001164, 72.330882175026999903), P(26.105014700000001682, 72.329521843521945357), P(26.108211900000000583, 72.327720133658942814), P(26.116759299999998234, 72.322424061632020198), P(26.118289900000000614, 72.321345929920937579), P(26.124188000000000187, 72.316306990481081129), P(26.126093300000000852, 72.314456217615472156), P(26.13131840000000139, 72.308768748722727082), P(26.133807300000000851, 72.305896196846916268), P(26.135103199999999646, 72.304208818196542552), P(26.13615610000000089, 72.3027141546473473), P(26.136958199999998698, 72.301545345164157652), P(26.137658200000000619, 72.300474224549915903), P(26.140487000000000251, 72.29551524417688313), P(26.146685800000000199, 72.285760107870132174), P(26.151274499999999534, 72.277504651282583836), P(26.151979099999998368, 72.276113553331668982), P(26.152562700000000717, 72.274582520714972134), P(26.152978600000000853, 72.272986691312326002), P(26.154697899999998612, 72.264608683472175699), P(26.155105599999998844, 72.263003939235275652), P(26.155811400000001044, 72.261258344309723611), P(26.156706599999999696, 72.259655777039213831), P(26.158511799999999425, 72.257073180827120495), P(26.163497199999998344, 72.251147710512896083), P(26.164152500000000146, 72.250452144382251163), P(26.165397099999999853, 72.249370018656591697), P(26.171159400000000517, 72.245101348184562084), P(26.171824600000000771, 72.244502288299599968), P(26.172791700000001214, 72.243464858038208831), P(26.173422299999998586, 72.24251111483852128), P(26.174280599999999453, 72.240982180618559028), P(26.174924399999998315, 72.239409446329290176), P(26.175138900000000319, 72.238550480576279256), P(26.177894599999998348, 72.222417606854094174), P(26.178249600000000896, 72.220799387733251251), P(26.178700899999999052, 72.219414415122045625), P(26.179689899999999625, 72.217234222262234766), P(26.182073200000001378, 72.213506738076645775), P(26.18310470000000123, 72.211533626956168064), P(26.183614800000000855, 72.210338776927230242), P(26.18428000000000111, 72.208417574177602205), P(26.185804499999999706, 72.203266316303412964), P(26.186153000000000901, 72.202346286216979365), P(26.186549599999999316, 72.201465316811109574), P(26.187059699999998941, 72.200685882789031211), P(26.187643699999998859, 72.200064170625580573), P(26.188815999999999207, 72.199110470754774838), P(26.189986799999999789, 72.198491439723213148), P(26.190943999999998226, 72.198205925482497491), P(26.192045499999998981, 72.198064597333782899), P(26.201502200000000187, 72.19749033573828001), P(26.204289599999999183, 72.197194731015855496), P(26.212046699999998367, 72.196023752898682346), P(26.217400099999998986, 72.195033541852339454), P(26.220660899999998605, 72.194099530393685882), P(26.223864100000000121, 72.193042117073559893), P(26.227025699999998665, 72.192404096537160285), P(26.229406099999998503, 72.192154413131575552), P(26.23379059999999896, 72.191934250652863625), P(26.241092200000000645, 72.191652763688111349), P(26.247795599999999894, 72.191305763109099303), P(26.259740499999999486, 72.190710990755292187), P(26.262441899999998896, 72.190662426481935654), P(26.26396259999999927, 72.190803739092231694), P(26.265582200000000768, 72.19108065172507338), P(26.271514700000000886, 72.192273445913514252), P(26.275603900000000124, 72.192994312937273094), P(26.278289999999998372, 72.193506828374651718), P(26.280647800000000558, 72.193799369593079973), P(26.284991699999999071, 72.194193426147350579), P(26.295021899999998283, 72.194996021158502231), P(26.296629599999999272, 72.195353135208762296), P(26.298219400000000689, 72.195936520796209379), P(26.299353599999999886, 72.196573622487093758), P(26.300700500000001369, 72.19746290844136638), P(26.301440499999998224, 72.198127833072547332), P(26.302059899999999715, 72.198747051231549676), P(26.302597999999999701, 72.199118470577644757), P(26.30326700000000173, 72.200164931796578571), P(26.304018299999999186, 72.201524555689601925), P(26.305375600000001413, 72.20513574950004454), P(26.306215500000000418, 72.206942181028665573), P(26.307179600000001329, 72.208595118825385839), P(26.307805599999998236, 72.209443034325843769), P(26.308593200000000678, 72.210334966852684602), P(26.309511400000001657, 72.211171854914510959), P(26.310345000000001647, 72.211829485157878139), P(26.313103999999999161, 72.213550746524816759), P(26.313808999999999116, 72.214105903186023738), P(26.315858999999999668, 72.21616368063173752), P(26.316473599999998356, 72.216713905276705532), P(26.317261800000000704, 72.217105619191144683), P(26.318279199999999207, 72.217451609641841515), P(26.31951039999999864, 72.217778930438797147), P(26.319995200000001034, 72.217883719155963718), P(26.322028199999998321, 72.21814340535271981), P(26.323134799999998279, 72.218219615725388394), P(26.324022500000001656, 72.218280774611798734), P(26.32581220000000144, 72.218525220186265301), P(26.327261700000001099, 72.218861882068196678), P(26.330273800000000506, 72.219715642811124212), P(26.337171999999998917, 72.221928497785057743), P(26.339137900000000769, 72.222394361231621929), P(26.341438799999998821, 72.222689314479467271), P(26.343669200000000785, 72.222811640430336411), P(26.346788899999999956, 72.222677310542948703), P(26.356923500000000615, 72.222042438730937874), P(26.359536099999999692, 72.2221015051835451), P(26.36183730000000125, 72.222299854521224916), P(26.366428899999998947, 72.222842507761527031), P(26.374883000000000521, 72.223912965077033732), P(26.380090800000001394, 72.224542709845593436), P(26.39073850000000121, 72.225869670908153353), P(26.393878699999998361, 72.226187124115313054), P(26.400813700000000495, 72.226887965488728582), P(26.405969100000000083, 72.227408932782296347), P(26.434136200000001082, 72.23031015029567925), P(26.437651200000001239, 72.230672215773722655), P(26.439650799999999009, 72.230860300030158783), P(26.442400500000001529, 72.230918230849241013), P(26.444426599999999894, 72.230815518016711962), P(26.454957100000001446, 72.229639190945519545), P(26.455386699999998257, 72.229609273288744475), P(26.470600499999999755, 72.227804710557407475), P(26.485397899999998828, 72.226080035891357056), P(26.487313600000000235, 72.226084418502168205), P(26.488673999999999609, 72.226209799401686951), P(26.489974300000000085, 72.226456941463752059), P(26.493316499999998825, 72.227405883949458598), P(26.497907399999999001, 72.228727947008763977), P(26.507186099999998419, 72.231355762593423719), P(26.521764000000001005, 72.235531322949142918), P(26.522283200000000392, 72.235663963313356817), P(26.52274799999999999, 72.235808991367022713), P(26.523495799999999178, 72.236006428221017472), P(26.537509100000001183, 72.239985971537208798), P(26.540924100000001573, 72.240959309764491536), P(26.544420699999999869, 72.241674408812258434), P(26.546888100000000321, 72.242183101965366632), P(26.5518616999999999, 72.242874580127462991), P(26.562219100000000083, 72.244128903051048951), P(26.564274399999998622, 72.244315309516480283), P(26.576127799999998302, 72.245028538203385438), P(26.58263820000000166, 72.244424904560787581), P(26.591367999999999228, 72.243389190867901561), P(26.598972199999998622, 72.242452221067154028), P(26.600826200000000199, 72.242522931717928714), P(26.603627199999998254, 72.242683603364909573), P(26.606756300000000692, 72.243241096929352807), P(26.612569100000001754, 72.244800578667096147), P(26.615042299999998932, 72.246052459623328446), P(26.621848599999999863, 72.249011664844303482), P(26.627471299999999843, 72.250195383365820589), P(26.641823800000000944, 72.252710806698729584), P(26.648778100000001245, 72.254338371527666141), P(26.655288500000001051, 72.25700169234383452), P(26.660515000000000185, 72.259171735257126556), P(26.662390800000000723, 72.25996099777080417), P(26.670629300000001649, 72.263625851730935779), P(26.671595899999999801, 72.264267979553508781), P(26.676856199999999575, 72.267335711577246116), P(26.677412499999999085, 72.267929636079472289), P(26.676856199999999575, 72.267335711577246116) }; +} diff --git a/indexer/indexer_tests/test_polylines.hpp b/indexer/indexer_tests/test_polylines.hpp new file mode 100644 index 0000000000..12e80f4fe2 --- /dev/null +++ b/indexer/indexer_tests/test_polylines.hpp @@ -0,0 +1,9 @@ +#pragma once + +#include "../../geometry/point2d.hpp" + +namespace index_test +{ + typedef m2::PointD P; + extern P arr1[376]; +} |