[planet] New data from 240528. #8178

Merged
vng merged 4 commits from vng-data into release/2024.06.02 2024-06-02 17:45:52 +00:00
9 changed files with 2397 additions and 2325 deletions

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load diff

View file

@ -206,12 +206,13 @@ void RoadGeometry::Load(VehicleModelInterface const & vehicleModel, FeatureType
// Since we store integer altitudes, 1 is a possible error for 2 points.
geometry::Altitude constexpr kError = 1;
auto const altDiff = abs((*altitudes)[i] - (*altitudes)[i-1]);
if (altDiff > kError)
auto const altDiff = (*altitudes)[i] - (*altitudes)[i-1];
auto const absDiff = abs(altDiff) - kError;
if (absDiff > 0)
{
double const dist = ms::DistanceOnEarth(m_junctions[i-1].GetLatLon(), m_junctions[i].GetLatLon());
if ((altDiff - kError) / dist > 0.3)
LOG(LWARNING, ("Altitudes jump:", m_junctions[i-1], m_junctions[i]));
if (absDiff / dist >= 1.0)
LOG(LWARNING, ("Altitudes jump:", altDiff, "/", dist, m_junctions[i-1], m_junctions[i]));
}
}
#endif

View file

@ -278,7 +278,7 @@ UNIT_TEST(Russia_UseTrunk)
// Similar with GraphHopper.
CalculateRouteAndTestRouteLength(GetVehicleComponents(VehicleType::Bicycle),
mercator::FromLatLon(66.271, 33.048), {0.0, 0.0},
mercator::FromLatLon(68.95, 33.045), 412359 /* expectedRouteMeters */);
mercator::FromLatLon(68.95, 33.045), 412795 /* expectedRouteMeters */);
}
// https://github.com/organicmaps/organicmaps/issues/3920

View file

@ -501,13 +501,15 @@ UNIT_TEST(RussiaMoscowNotCrossingTollRoadTest)
CalculateRouteAndTestRouteLength(vehicleComponents, start, {0.0, 0.0}, finish[0], 8427.71);
// 2. End point is near the service road via the motorway toll road, but choose a minor track as end segment.
CalculateRouteAndTestRouteLength(vehicleComponents, start, {0.0, 0.0},finish[1], 8361.27);
CalculateRouteAndTestRouteLength(vehicleComponents, start, {0.0, 0.0}, finish[1], 8361.27);
}
{
// Normal route via the motorway toll road (long but fast).
CalculateRouteAndTestRouteLength(vehicleComponents, start, {0.0, 0.0}, finish[0], 20604.9);
CalculateRouteAndTestRouteLength(vehicleComponents, start, {0.0, 0.0}, finish[1], 20689.6);
// Normal route via the motorway toll road - long but fast (like Valhalla).
// - 20595.3 is OK (Graphopper)
// - 19203.7 is OK (OSRM)
CalculateRouteAndTestRouteLength(vehicleComponents, start, {0.0, 0.0}, finish[0], 21930.7);
CalculateRouteAndTestRouteLength(vehicleComponents, start, {0.0, 0.0}, finish[1], 22015.4);
}
}

View file

@ -1269,10 +1269,12 @@ UNIT_TEST(Cyprus_Governors_Beach_TurnTestNextRoad)
TurnItem turn;
route.GetNearestTurn(d, turn);
TEST_EQUAL(turn.m_turn, CarDirection::ExitHighwayToLeft, ());
RouteSegment::RoadNameInfo ri;
route.GetNextTurnStreetName(ri);
TEST_EQUAL(ri.m_destination, "Governer's Beach; Pentakomo", ());
TEST_EQUAL(ri.m_destination_ref, "B1", ());
// Aggregated network/ref tags.
TEST_EQUAL(ri.m_destination_ref, "CY:B/B1", ());
}
// Exit which is marked as non-link, but has link tags m_destination_ref and m_destination.

View file

@ -32,8 +32,8 @@ SpeedKMpH constexpr kSpeedOnFootwayKMpH = {5.0 /* weight */, 7.0 /* eta */};
HighwayBasedSpeeds const kDefaultSpeeds = {
// {highway class : InOutCitySpeedKMpH(in city(weight, eta), out city(weight eta))}
/// @see Russia_UseTrunk for Trunk weights.
{HighwayType::HighwayTrunk, InOutCitySpeedKMpH(SpeedKMpH(5.0, 18.0))},
{HighwayType::HighwayTrunkLink, InOutCitySpeedKMpH(SpeedKMpH(5.0, 18.0))},
{HighwayType::HighwayTrunk, InOutCitySpeedKMpH(SpeedKMpH(5.5, 18.0))},
{HighwayType::HighwayTrunkLink, InOutCitySpeedKMpH(SpeedKMpH(5.5, 18.0))},
{HighwayType::HighwayPrimary, InOutCitySpeedKMpH(SpeedKMpH(10.0, 18.0), SpeedKMpH(14.0, 18.0))},
{HighwayType::HighwayPrimaryLink, InOutCitySpeedKMpH(SpeedKMpH(10.0, 18.0), SpeedKMpH(14.0, 18.0))},
{HighwayType::HighwaySecondary, InOutCitySpeedKMpH(SpeedKMpH(15.0, 18.0), SpeedKMpH(20.0, 18.0))},

View file

@ -197,12 +197,12 @@ UNIT_CLASS_TEST(MwmTestsFixture, TopPOIs_Smoke)
auto const & results = request->Results();
TEST_GREATER(results.size(), kTopPoiResultsCount, ());
Range const range(results, 0, 4);
Range const range(results, 0, 5);
EqualClassifType(range, GetClassifTypes({{"shop"}}));
TEST_LESS(SortedByDistance(range, center).first, 5000, ());
// parking (< 6km) should be on top.
EqualClassifType(Range(results, 4, 6), GetClassifTypes({{"leisure", "playground"}, {"amenity", "parking"}}));
EqualClassifType(Range(results, 5, 7), GetClassifTypes({{"leisure", "playground"}, {"amenity", "parking"}}));
}
// https://github.com/organicmaps/organicmaps/issues/2470
@ -1316,4 +1316,71 @@ UNIT_CLASS_TEST(MwmTestsFixture, CityWithCountry)
}
}
UNIT_CLASS_TEST(MwmTestsFixture, UK_Postcodes)
{
using namespace mercator;
auto const & cl = classif();
// "UK_Scotland_South", "UK_England_South East_Brighton" should present!
RegisterLocalMapsByPrefix("UK_");
// London
ms::LatLon const center(51.5074515, -0.1277805);
SetViewportAndLoadMaps(center);
{
auto request = MakeRequest("G4 9HS");
auto const & results = request->Results();
TEST(!results.empty(), ());
TEST_EQUAL(results[0].GetResultType(), search::Result::Type::Postcode, ());
TEST(FromLatLon({55.8735083, -4.2764288}).EqualDxDy(results[0].GetFeatureCenter(), kPointEqualityEps), ());
}
{
auto request = MakeRequest("Nero G4 9HS");
auto const & results = request->Results();
TEST_GREATER(results.size(), kTopPoiResultsCount, ());
TEST_EQUAL(results[0].GetResultType(), search::Result::Type::Feature, ());
/// @todo We should rank POIs that are closest to the Postcode on top!
// TEST(FromLatLon({55.8736446, -4.2768748}).EqualDxDy(results[0].GetFeatureCenter(), kPointEqualityEps), ());
TEST_EQUAL(results[0].GetFeatureType(), cl.GetTypeByPath({"amenity", "cafe"}), ());
}
std::string const houseName = "St. Nicholas Lodge";
{
auto request = MakeRequest("BN1 3LJ " + houseName);
auto const & results = request->Results();
TEST_GREATER(results.size(), kTopPoiResultsCount, ());
TEST_EQUAL(results[0].GetResultType(), search::Result::Type::Feature, ());
TEST_EQUAL(results[0].GetString(), houseName, ());
}
{
auto request = MakeRequest("BN3 " + houseName);
auto const & results = request->Results();
TEST_GREATER(results.size(), kTopPoiResultsCount, ());
TEST_EQUAL(results[0].GetResultType(), search::Result::Type::Feature, ());
TEST_EQUAL(results[0].GetString(), houseName, ());
}
}
UNIT_CLASS_TEST(MwmTestsFixture, UK_Postcodes_Timing)
{
using namespace std::chrono;
ms::LatLon const center(50.8214626, -0.1400561);
SetViewportAndLoadMaps(center);
{
auto request = MakeRequest("bn1 butterfly");
auto const & results = request->Results();
TEST(!results.empty(), ());
TEST_LESS(duration_cast<seconds>(request->ResponseTime()).count(), 3, ());
}
}
} // namespace real_mwm_tests