mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-16 13:44:42 +00:00
Compare commits
5 Commits
zy-docker-
...
jb_imp_fr_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7f4887db2e | ||
|
|
62a55abeec | ||
|
|
393a26e82b | ||
|
|
1d10e25761 | ||
|
|
64e13fde0f |
@@ -34,79 +34,28 @@ on:
|
||||
- track_generator/**
|
||||
- xcode/**
|
||||
|
||||
env:
|
||||
SUBMODULE_CACHE_PATHS: |
|
||||
.git/modules
|
||||
3party/CMake-MetalShaderSupport
|
||||
3party/Vulkan-Headers
|
||||
3party/boost
|
||||
3party/expat
|
||||
3party/fast_double_parser
|
||||
3party/fast_obj
|
||||
3party/freetype/freetype
|
||||
3party/gflags
|
||||
3party/glaze
|
||||
3party/glfw
|
||||
3party/glm
|
||||
3party/googletest
|
||||
3party/harfbuzz/harfbuzz
|
||||
3party/icu/icu
|
||||
3party/imgui/imgui
|
||||
3party/jansson/jansson
|
||||
3party/just_gtfs
|
||||
3party/protobuf/protobuf
|
||||
3party/pugixml/pugixml
|
||||
3party/utfcpp
|
||||
tools/kothic
|
||||
tools/osmctools
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: Android Lint
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: codeberg.org/comaps/docker-android-sdk:latest
|
||||
options: --user root
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Cache world map
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: data/world_mwm
|
||||
key: world-mwm
|
||||
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ env.SUBMODULE_CACHE_PATHS }}
|
||||
key: submodules-${{ hashFiles('.gitmodules') }}
|
||||
restore-keys: |
|
||||
submodules-
|
||||
|
||||
- name: Sync and update submodules
|
||||
- name: Parallel submodules checkout
|
||||
shell: bash
|
||||
run: |
|
||||
git submodule sync --recursive
|
||||
git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20))
|
||||
run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20))
|
||||
|
||||
- name: Lint
|
||||
shell: bash
|
||||
working-directory: android
|
||||
run: |
|
||||
# cd ..
|
||||
# ./configure.sh
|
||||
# cd android
|
||||
./gradlew -Pandroidauto=true lint
|
||||
run: ./gradlew -Pandroidauto=true lint
|
||||
|
||||
android-check:
|
||||
name: Build Android Debug
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: codeberg.org/comaps/docker-android-sdk:latest
|
||||
options: --user root
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -122,32 +71,23 @@ jobs:
|
||||
cancel-in-progress: true
|
||||
|
||||
steps:
|
||||
- name: Install build tools and dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y ninja-build
|
||||
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 200 # enough to get all commits for the current day
|
||||
|
||||
- name: Cache world map
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: data/world_mwm
|
||||
key: world-mwm
|
||||
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ env.SUBMODULE_CACHE_PATHS }}
|
||||
key: submodules-${{ hashFiles('.gitmodules') }}
|
||||
restore-keys: |
|
||||
submodules-
|
||||
|
||||
- name: Sync and update submodules
|
||||
- name: Parallel submodules checkout
|
||||
shell: bash
|
||||
run: |
|
||||
git submodule sync --recursive
|
||||
git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20))
|
||||
run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20))
|
||||
|
||||
- name: Configure ccache
|
||||
uses: https://github.com/hendrikmuhs/ccache-action@v1.2
|
||||
uses: hendrikmuhs/ccache-action@v1.2
|
||||
with:
|
||||
key: ${{ github.workflow }}-${{ matrix.flavor }}
|
||||
|
||||
@@ -158,14 +98,13 @@ jobs:
|
||||
CMAKE_C_COMPILER_LAUNCHER: ccache
|
||||
CMAKE_CXX_COMPILER_LAUNCHER: ccache
|
||||
run: |
|
||||
cd ..
|
||||
./configure.sh
|
||||
cd android
|
||||
cmake --version
|
||||
ninja --version
|
||||
./gradlew -P${{ matrix.arch }} assemble${{ matrix.flavor }}
|
||||
|
||||
- name: Upload ${{ matrix.flavor }} apk
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: android-${{ matrix.flavor }}
|
||||
path: android/app/build/outputs/apk/**/*.apk
|
||||
path: android/app/build/outputs/apk/**/OrganicMaps-*.apk
|
||||
if-no-files-found: error
|
||||
|
||||
@@ -104,7 +104,8 @@ if (${CMAKE_BUILD_TYPE} STREQUAL "Debug")
|
||||
elseif (${CMAKE_BUILD_TYPE} MATCHES "Rel")
|
||||
add_definitions(-DRELEASE)
|
||||
if (NOT MSVC)
|
||||
add_compile_options(-O3 $<$<CXX_COMPILER_ID:GNU>:-flto=auto>)
|
||||
add_compile_options(-O3)
|
||||
set (CMAKE_INTERPROCEDURAL_OPTIMIZATION True)
|
||||
endif()
|
||||
else()
|
||||
message(FATAL_ERROR "Unknown build type: " ${CMAKE_BUILD_TYPE})
|
||||
|
||||
@@ -41,5 +41,5 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_gravity="bottom|start"
|
||||
android:background="?colorSurfaceContainerLow"/>
|
||||
android:background="?appBackground"/>
|
||||
</FrameLayout>
|
||||
|
||||
@@ -40,5 +40,5 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_gravity="bottom|center"
|
||||
android:background="?colorSurfaceContainerLow"/>
|
||||
android:background="?appBackground"/>
|
||||
</FrameLayout>
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
<item name="colorSurfaceContainerHigh">@color/md_theme_surfaceContainerHigh</item>
|
||||
<item name="colorSurfaceContainerHighest">@color/md_theme_surfaceContainerHighest</item>
|
||||
|
||||
<item name="appBackground">?android:attr/colorBackground</item>
|
||||
<item name="appBackground">@color/bg_app</item>
|
||||
</style>
|
||||
|
||||
<style name="MwmTheme" parent="MwmTheme.Base"/>
|
||||
|
||||
@@ -287,13 +287,13 @@
|
||||
</style>
|
||||
|
||||
<style name="MwmWidget.BottomSheetDialog" parent="Widget.Material3.BottomSheet.Modal">
|
||||
<item name="backgroundTint">?colorSurfaceContainerLow</item>
|
||||
<item name="backgroundTint">?appBackground</item>
|
||||
<item name="elevationOverlayEnabled">false</item>
|
||||
<item name="shapeAppearance">@style/ShapeAppearance.Material3.LargeComponent</item>
|
||||
</style>
|
||||
|
||||
<style name="MwmWidget.BottomSheet" parent="MwmWidget.BottomSheetDialog">
|
||||
<item name="android:background">?colorSurfaceContainerLow</item>
|
||||
<item name="android:background">?appBackground</item>
|
||||
<item name="behavior_hideable">false</item>
|
||||
</style>
|
||||
|
||||
|
||||
1
android/sdk/src/main/assets/subtypes.csv
Symbolic link
1
android/sdk/src/main/assets/subtypes.csv
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../../../data/subtypes.csv
|
||||
|
@@ -186,7 +186,7 @@
|
||||
"place-state": "Щат|провинция",
|
||||
"place-region": "Район|Регион",
|
||||
"place-island|place-islet": "Остров",
|
||||
"place-suburb|place-quarter|place-neighbourhood|landuse-residential": "Район|микрорайон|окръг|квартал|Предградие|Жилищен комплекс|ж.к.|ЖК",
|
||||
"place-suburb|place-quarter|place-neighbourhood|landuse-residential": "Район|микрорайон|окръг|квартал|Предградие|Жилищен комплекс|ЖК",
|
||||
"place-hamlet": "Село",
|
||||
"place-village": "Село",
|
||||
"place-locality": "местност|регион|Място",
|
||||
|
||||
@@ -199,7 +199,7 @@
|
||||
"place-state": "Штат|провинция",
|
||||
"place-region": "Район",
|
||||
"place-island|place-islet": "Остров",
|
||||
"place-suburb|place-quarter|place-neighbourhood|landuse-residential": "Район|микрорайон|квартал|Жилая зона|Жилой комплекс|ж.к.|ЖК",
|
||||
"place-suburb|place-quarter|place-neighbourhood|landuse-residential": "Район|микрорайон|квартал|Жилая зона|Жилой комплекс|ЖК",
|
||||
"place-hamlet": "Посёлок|деревня",
|
||||
"place-village": "Деревня|поселок",
|
||||
"place-locality": "Местность|регион",
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
"place-state": "Штат|провінція|регіон",
|
||||
"place-region": "Район|область",
|
||||
"place-island|place-islet": "Острів",
|
||||
"place-suburb|place-quarter|place-neighbourhood|landuse-residential": "Район|мікрорайон|квартал|округа|Сусідство|Житловий комплекс|ж.к.|ЖК",
|
||||
"place-suburb|place-quarter|place-neighbourhood|landuse-residential": "Район|мікрорайон|квартал|округа|Сусідство|Житловий комплекс|ЖК",
|
||||
"place-hamlet": "Поселення|селище|село",
|
||||
"place-village": "Село|хутір|поселення",
|
||||
"place-locality": "Місцевість|регіон|Місце",
|
||||
|
||||
2
data/subtypes.csv
Normal file
2
data/subtypes.csv
Normal file
@@ -0,0 +1,2 @@
|
||||
Types;Related Subtypes
|
||||
amenity|charging_station;amenity|charging_station|motorcar,amenity|charging_station|motorcycle,amenity|charging_station|bicycle,amenity|charging_station|small,amenity|charging_station|carless
|
||||
|
@@ -11,6 +11,7 @@
|
||||
#include "indexer/classificator.hpp"
|
||||
#include "indexer/feature_impl.hpp"
|
||||
#include "indexer/ftypes_matcher.hpp"
|
||||
#include "indexer/ftypes_subtypes.hpp"
|
||||
|
||||
#include "platform/platform.hpp"
|
||||
|
||||
@@ -351,9 +352,11 @@ private:
|
||||
// - both amenity-charging_station-motorcar and amenity-charging_station-bicycle are left;
|
||||
void LeaveLongestTypes(std::vector<generator::TypeStrings> & matchedTypes)
|
||||
{
|
||||
auto const isChargingStation = [](auto const & lhs, auto const & rhs)
|
||||
// Prevents types, that either have subtypes or are subtypes, from being removed
|
||||
auto subtypes = ftypes::Subtypes::Instance();
|
||||
auto const hasSubtypeRelatedTypes = [subtypes](auto const & lhs, auto const & rhs)
|
||||
{
|
||||
return lhs.size() > 1 && rhs.size() > 1 && lhs.at(1) == "charging_station" && rhs.at(1) == "charging_station" && lhs.at(0) == "amenity" && rhs.at(0) == "amenity";
|
||||
return subtypes.IsPathOfTypeWithSubtypesOrSubtype(lhs) || subtypes.IsPathOfTypeWithSubtypesOrSubtype(rhs);
|
||||
};
|
||||
|
||||
auto const equalPrefix = [](auto const & lhs, auto const & rhs)
|
||||
@@ -374,9 +377,10 @@ void LeaveLongestTypes(std::vector<generator::TypeStrings> & matchedTypes)
|
||||
return lhs < rhs;
|
||||
};
|
||||
|
||||
auto const isEqual = [&equalPrefix, &isChargingStation](auto const & lhs, auto const & rhs)
|
||||
// `true` means it will be deleted, because being equal means it isn't unique
|
||||
auto const isEqual = [&equalPrefix, &hasSubtypeRelatedTypes](auto const & lhs, auto const & rhs)
|
||||
{
|
||||
if (isChargingStation(lhs, rhs))
|
||||
if (hasSubtypeRelatedTypes(lhs, rhs))
|
||||
return false;
|
||||
|
||||
if (equalPrefix(lhs, rhs))
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
270C9C282E16AB6F00ABA688 /* Profile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 270C9C252E16AB6300ABA688 /* Profile.swift */; };
|
||||
27176A862E65B0150015F25F /* Icon.icon in Resources */ = {isa = PBXBuildFile; fileRef = 27176A852E65B0150015F25F /* Icon.icon */; };
|
||||
27176A8A2E65B01B0015F25F /* Debug Icon.icon in Resources */ = {isa = PBXBuildFile; fileRef = 27176A892E65B01B0015F25F /* Debug Icon.icon */; };
|
||||
272CA4492F127221005A3F5B /* subtypes.csv in Resources */ = {isa = PBXBuildFile; fileRef = 272CA4482F127221005A3F5B /* subtypes.csv */; };
|
||||
272F1F392E0EE09000FA52EF /* ExistingProfileView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 272F1F382E0EE08A00FA52EF /* ExistingProfileView.swift */; };
|
||||
272F1F3B2E0EE0A300FA52EF /* NoExistingProfileView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 272F1F3A2E0EE09500FA52EF /* NoExistingProfileView.swift */; };
|
||||
272F1F3D2E0EE0C800FA52EF /* ProfileView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 272F1F3C2E0EE0C400FA52EF /* ProfileView.swift */; };
|
||||
@@ -764,6 +765,7 @@
|
||||
270C9C252E16AB6300ABA688 /* Profile.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Profile.swift; sourceTree = "<group>"; };
|
||||
27176A852E65B0150015F25F /* Icon.icon */ = {isa = PBXFileReference; lastKnownFileType = folder.iconcomposer.icon; path = Icon.icon; sourceTree = "<group>"; };
|
||||
27176A892E65B01B0015F25F /* Debug Icon.icon */ = {isa = PBXFileReference; lastKnownFileType = folder.iconcomposer.icon; path = "Debug Icon.icon"; sourceTree = "<group>"; };
|
||||
272CA4482F127221005A3F5B /* subtypes.csv */ = {isa = PBXFileReference; lastKnownFileType = text; name = subtypes.csv; path = ../../data/subtypes.csv; sourceTree = SOURCE_ROOT; };
|
||||
272F1F382E0EE08A00FA52EF /* ExistingProfileView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExistingProfileView.swift; sourceTree = "<group>"; };
|
||||
272F1F3A2E0EE09500FA52EF /* NoExistingProfileView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NoExistingProfileView.swift; sourceTree = "<group>"; };
|
||||
272F1F3C2E0EE0C400FA52EF /* ProfileView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileView.swift; sourceTree = "<group>"; };
|
||||
@@ -3954,6 +3956,7 @@
|
||||
F623DA6A1C9C2731006A3436 /* opening_hours_how_to_edit.html */,
|
||||
FA85F632145DDDC20090E1A0 /* packed_polygons.bin */,
|
||||
451950391B7A3E070085DA05 /* patterns.txt */,
|
||||
272CA4482F127221005A3F5B /* subtypes.csv */,
|
||||
FAAEA7D0161BD26600CCD661 /* synonyms.txt */,
|
||||
BB25B1A51FB32767007276FA /* transit_colors.txt */,
|
||||
FA64D9A813F975AD00350ECF /* types.txt */,
|
||||
@@ -4281,6 +4284,7 @@
|
||||
34AB66681FC5AA330078E451 /* TransportTransitPedestrian.xib in Resources */,
|
||||
F6D67CDE2062BBA60032FD38 /* MWMBCCreateCategoryAlert.xib in Resources */,
|
||||
3490D2E31CE9DD2500D0B838 /* MWMSideButtonsView.xib in Resources */,
|
||||
272CA4492F127221005A3F5B /* subtypes.csv in Resources */,
|
||||
F6E2FE2E1E097BA00083EBEC /* MWMStreetEditorEditTableViewCell.xib in Resources */,
|
||||
3463BA691DE81DB90082417F /* MWMTrafficButtonViewController.xib in Resources */,
|
||||
F623DA6C1C9C2731006A3436 /* opening_hours_how_to_edit.html in Resources */,
|
||||
|
||||
@@ -88,6 +88,8 @@ set(SRC
|
||||
ftraits.hpp
|
||||
ftypes_matcher.cpp
|
||||
ftypes_matcher.hpp
|
||||
ftypes_subtypes.cpp
|
||||
ftypes_subtypes.hpp
|
||||
house_to_street_iface.hpp
|
||||
index_builder.cpp
|
||||
index_builder.hpp
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "indexer/classificator.hpp"
|
||||
#include "indexer/feature.hpp"
|
||||
#include "indexer/ftypes_matcher.hpp"
|
||||
#include "indexer/ftypes_subtypes.hpp"
|
||||
|
||||
#include "base/assert.hpp"
|
||||
#include "base/macros.hpp"
|
||||
@@ -191,25 +192,13 @@ void TypesHolder::SortBySpec()
|
||||
auto const getPriority = [&cl](uint32_t type) { return cl.GetObject(type)->GetMaxOverlaysPriority(); };
|
||||
|
||||
auto const & checker = UselessTypesChecker::Instance();
|
||||
auto const & isChargingStationChecker = ftypes::IsCharingStationChecker::Instance();
|
||||
auto const & isChargingStationSmallChecker = ftypes::IsCharingStationSmallChecker::Instance();
|
||||
auto const & subtypes = ftypes::Subtypes::Instance();
|
||||
|
||||
std::stable_sort(begin(), end(), [&checker, &getPriority, &isChargingStationChecker, &isChargingStationSmallChecker](uint32_t t1, uint32_t t2)
|
||||
std::stable_sort(begin(), end(), [&checker, &getPriority, &subtypes](uint32_t t1, uint32_t t2)
|
||||
{
|
||||
if (isChargingStationChecker(t1) && isChargingStationChecker(t2))
|
||||
{
|
||||
if (isChargingStationSmallChecker(t1) && !isChargingStationSmallChecker(t2))
|
||||
return false;
|
||||
else if (!isChargingStationSmallChecker(t1) && isChargingStationSmallChecker(t2))
|
||||
return true;
|
||||
|
||||
uint8_t const t1Level = ftype::GetLevel(t1);
|
||||
uint8_t const t2Level = ftype::GetLevel(t2);
|
||||
if (t1Level == 2 && t2Level != 2)
|
||||
return true;
|
||||
else if (t1Level != 2 && t2Level == 2)
|
||||
return false;
|
||||
}
|
||||
std::optional<bool> const comaprisonResultBasedOnTypeRelation = subtypes.ComaprisonResultBasedOnTypeRelation(t1, t2);
|
||||
if (comaprisonResultBasedOnTypeRelation.has_value())
|
||||
return comaprisonResultBasedOnTypeRelation.value();
|
||||
|
||||
int const p1 = getPriority(t1);
|
||||
int const p2 = getPriority(t2);
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "indexer/feature.hpp"
|
||||
#include "indexer/feature_data.hpp"
|
||||
#include "indexer/ftypes_matcher.hpp"
|
||||
#include "indexer/ftypes_subtypes.hpp"
|
||||
#include "indexer/scales.hpp"
|
||||
|
||||
#include "base/assert.hpp"
|
||||
@@ -135,6 +136,9 @@ bool TypeAlwaysExists(uint32_t type, GeomType geomType = GeomType::Undefined)
|
||||
if (IsUsefulStandaloneType(type, geomType))
|
||||
return true;
|
||||
|
||||
if (ftypes::Subtypes::Instance().IsTypeWithSubtypesOrSubtype(type))
|
||||
return true;
|
||||
|
||||
uint8_t const typeLevel = ftype::GetLevel(type);
|
||||
ftype::TruncValue(type, 1);
|
||||
|
||||
|
||||
@@ -753,12 +753,6 @@ IsDirectionalChecker::IsDirectionalChecker() : ftypes::BaseChecker(1 /* level */
|
||||
m_types.push_back(c.GetTypeByPath({"lateral"}));
|
||||
}
|
||||
|
||||
IsCharingStationChecker::IsCharingStationChecker() : ftypes::BaseChecker(2 /* level */)
|
||||
{
|
||||
Classificator const & c = classif();
|
||||
m_types.push_back(c.GetTypeByPath({"amenity", "charging_station"}));
|
||||
}
|
||||
|
||||
IsCharingStationCarChecker::IsCharingStationCarChecker() : ftypes::BaseChecker(3 /* level */)
|
||||
{
|
||||
Classificator const & c = classif();
|
||||
|
||||
@@ -519,14 +519,6 @@ public:
|
||||
DECLARE_CHECKER_INSTANCE(IsDirectionalChecker);
|
||||
};
|
||||
|
||||
class IsCharingStationChecker : public ftypes::BaseChecker
|
||||
{
|
||||
IsCharingStationChecker();
|
||||
|
||||
public:
|
||||
DECLARE_CHECKER_INSTANCE(IsCharingStationChecker);
|
||||
};
|
||||
|
||||
class IsCharingStationCarChecker : public ftypes::BaseChecker
|
||||
{
|
||||
IsCharingStationCarChecker();
|
||||
|
||||
94
libs/indexer/ftypes_subtypes.cpp
Normal file
94
libs/indexer/ftypes_subtypes.cpp
Normal file
@@ -0,0 +1,94 @@
|
||||
#include "indexer/ftypes_subtypes.hpp"
|
||||
|
||||
#include "base/assert.hpp"
|
||||
#include "coding/csv_reader.hpp"
|
||||
#include "indexer/classificator.hpp"
|
||||
#include "platform/platform.hpp"
|
||||
|
||||
namespace ftypes
|
||||
{
|
||||
/// Constructor
|
||||
Subtypes::Subtypes()
|
||||
{
|
||||
auto const & classificator = classif();
|
||||
|
||||
// Get the actual path to the CSV file.
|
||||
Platform & platform = GetPlatform();
|
||||
string const filePath = platform.ReadPathForFile("subtypes.csv");
|
||||
|
||||
// Load the CSV file and go through the lines of it one by one.
|
||||
for (auto const & columns : coding::CSVRunner(coding::CSVReader(filePath, true, ';')))
|
||||
{
|
||||
// Skip empty lines.
|
||||
if (columns.empty())
|
||||
continue;
|
||||
|
||||
// There only should be two columns.
|
||||
if (columns.size() != 2)
|
||||
{
|
||||
ASSERT(false, ("Parsing of subtypes file: Invalid columns \"", columns, "\""));
|
||||
break;
|
||||
}
|
||||
|
||||
// Parse the column. The first column has the type definitions(s) and the second one has the associated subtype definitions(s).
|
||||
vector<uint32_t> types;
|
||||
vector<uint32_t> subtypes;
|
||||
for (int columnIndex = 0; columnIndex < 2; columnIndex++) {
|
||||
string_view const column = columns[columnIndex];
|
||||
|
||||
// Separate the different type definitions by the `,`. There needs to be at least one.
|
||||
vector<string_view> const typeDefinitions = strings::Tokenize(column, ",");
|
||||
if (typeDefinitions.size() < 1)
|
||||
{
|
||||
ASSERT(columnIndex != 0, ("Parsing of subtypes file: Invalid or missing types definition \"", column, "\""));
|
||||
ASSERT(columnIndex == 0, ("Parsing of subtypes file: Invalid or missing subtypes definition \"", column, "\""));
|
||||
break;
|
||||
}
|
||||
|
||||
// Parse the type definitions and convert them to actual types. Invalid types are getting skipped.
|
||||
vector<uint32_t> typesInColumn;
|
||||
for (auto typeDefinition : typeDefinitions)
|
||||
{
|
||||
vector<string_view> const typePath = strings::Tokenize(typeDefinition, "|");
|
||||
uint32_t const type = classificator.GetTypeByPathSafe(typePath);
|
||||
if (type != IndexAndTypeMapping::INVALID_TYPE)
|
||||
{
|
||||
typesInColumn.push_back(type);
|
||||
|
||||
vector<string> typesAndSubtypesPath(typePath.begin(), typePath.end());
|
||||
if (find(m_typesAndSubtypesPaths.begin(), m_typesAndSubtypesPaths.end(), typesAndSubtypesPath) == m_typesAndSubtypesPaths.end())
|
||||
m_typesAndSubtypesPaths.push_back(typesAndSubtypesPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
ASSERT(columnIndex != 0, ("Parsing of subtypes file: Invalid type \"", typeDefinition, "\""));
|
||||
ASSERT(columnIndex == 0, ("Parsing of subtypes file: Invalid subtype \"", typeDefinition, "\""));
|
||||
}
|
||||
}
|
||||
|
||||
if (columnIndex == 0)
|
||||
types = typesInColumn;
|
||||
else
|
||||
subtypes = typesInColumn;
|
||||
}
|
||||
|
||||
for (auto type : types)
|
||||
{
|
||||
m_types.insert(type);
|
||||
m_typesWithSubtypes[type] = subtypes;
|
||||
}
|
||||
|
||||
for (auto subtype : subtypes)
|
||||
{
|
||||
m_subtypes.insert(subtype);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Static instance
|
||||
Subtypes const & Subtypes::Instance()
|
||||
{
|
||||
static Subtypes instance;
|
||||
return instance;
|
||||
}
|
||||
} // namespace ftypes
|
||||
122
libs/indexer/ftypes_subtypes.hpp
Normal file
122
libs/indexer/ftypes_subtypes.hpp
Normal file
@@ -0,0 +1,122 @@
|
||||
#pragma once
|
||||
|
||||
#include <map>
|
||||
#include <unordered_set>
|
||||
#include <vector>
|
||||
|
||||
namespace ftypes
|
||||
{
|
||||
using namespace std;
|
||||
|
||||
class Subtypes
|
||||
{
|
||||
public:
|
||||
/// Static instance
|
||||
static Subtypes const & Instance();
|
||||
|
||||
/**
|
||||
* Checks if the given type is a type with subtypes or a subtype
|
||||
* @param type The type to check
|
||||
* @return `true` if it is a type with subtypes or a subtype, otherwise `false`
|
||||
*/
|
||||
bool IsTypeWithSubtypesOrSubtype(uint32_t const type) const
|
||||
{
|
||||
return IsTypeWithSubtypes(type) || IsSubtype(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the given type is a type with subtypes
|
||||
* @param type The type to check
|
||||
* @return `true` if it is a type with subtypes, otherwise `false`
|
||||
*/
|
||||
bool IsTypeWithSubtypes(uint32_t const type) const
|
||||
{
|
||||
return find(m_types.begin(), m_types.end(), type) != m_types.end();
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the given type is a subtype
|
||||
* @param type The type to check
|
||||
* @return `true` if it is a subtype, otherwise `false`
|
||||
*/
|
||||
bool IsSubtype(uint32_t const type) const
|
||||
{
|
||||
return find(m_subtypes.begin(), m_subtypes.end(), type) != m_subtypes.end();
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the given type is a subtype of a given parent type
|
||||
* @param type The type to check
|
||||
* @param parentType The possible parent type
|
||||
* @return `true` if it is a subtype of the parent type, otherwise `false`
|
||||
*/
|
||||
bool IsSubtypeOfParentType(uint32_t const type, uint32_t const parentType) const
|
||||
{
|
||||
auto position = m_typesWithSubtypes.find(parentType);
|
||||
if (position != m_typesWithSubtypes.end()) {
|
||||
vector<uint32_t> subtypes = position->second;
|
||||
return find(subtypes.begin(), subtypes.end(), type) != subtypes.end();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Compares to given types based on their type relation
|
||||
* @param firstType The first type to compare
|
||||
* @param secondType The type to compare
|
||||
* @return `true` if the first type is a subtype but the second one isn't, `false` if it is the other way around
|
||||
*/
|
||||
optional<bool> ComaprisonResultBasedOnTypeRelation(uint32_t const firstType, uint32_t const secondType) const
|
||||
{
|
||||
bool const firstTypeIsSubtype = IsSubtype(firstType);
|
||||
bool const secondTypeIsSubtype = IsSubtype(secondType);
|
||||
if (!firstTypeIsSubtype && !secondTypeIsSubtype)
|
||||
return {};
|
||||
else if (firstTypeIsSubtype && !secondTypeIsSubtype)
|
||||
return false;
|
||||
else if (!firstTypeIsSubtype && secondTypeIsSubtype)
|
||||
return true;
|
||||
|
||||
// If they got to here, both are subtypes. So use the order of the subtypes for the comparison.
|
||||
for (auto [types, subtypes] : m_typesWithSubtypes)
|
||||
{
|
||||
for (auto const subtype : subtypes)
|
||||
{
|
||||
if (subtype == firstType)
|
||||
return true;
|
||||
else if (subtype == secondType)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the given type path belongs to a type with subtypes or a subtype
|
||||
* @param typePath The type path to check
|
||||
* @return `true` if it is a type with subtypes or a subtype, otherwise `false`
|
||||
*/
|
||||
bool IsPathOfTypeWithSubtypesOrSubtype(vector<string> const typePath) const
|
||||
{
|
||||
return find(m_typesAndSubtypesPaths.begin(), m_typesAndSubtypesPaths.end(), typePath) != m_typesAndSubtypesPaths.end();
|
||||
}
|
||||
|
||||
private:
|
||||
/// Constructor
|
||||
Subtypes();
|
||||
|
||||
/// Types, which have subtypes, as unordered set for faster check performance
|
||||
unordered_set<uint32_t> m_types;
|
||||
|
||||
/// Subypes as unordered set for faster check performance
|
||||
unordered_set<uint32_t> m_subtypes;
|
||||
|
||||
/// Types with their associated subtypes
|
||||
map<uint32_t, vector<uint32_t>> m_typesWithSubtypes;
|
||||
|
||||
/// Paths of types, which have subtypes, and subtypes for the generator
|
||||
vector<vector<string>> m_typesAndSubtypesPaths;
|
||||
};
|
||||
} // namespace ftypes
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "indexer/feature.hpp"
|
||||
#include "indexer/feature_algo.hpp"
|
||||
#include "indexer/ftypes_matcher.hpp"
|
||||
#include "indexer/ftypes_subtypes.hpp"
|
||||
#include "indexer/road_shields_parser.hpp"
|
||||
|
||||
#include "geometry/mercator.hpp"
|
||||
@@ -119,6 +120,7 @@ std::string MapObject::GetLocalizedAllTypes(bool withMainType) const
|
||||
copy.SortBySpec();
|
||||
|
||||
auto const & isPoi = ftypes::IsPoiChecker::Instance();
|
||||
auto const & subtypes = ftypes::Subtypes::Instance();
|
||||
auto const & isDirectional = ftypes::IsDirectionalChecker::Instance();
|
||||
auto const & amenityChecker = ftypes::IsAmenityChecker::Instance();
|
||||
auto const & charingStationCarChecker = ftypes::IsCharingStationCarChecker::Instance();
|
||||
@@ -141,7 +143,7 @@ std::string MapObject::GetLocalizedAllTypes(bool withMainType) const
|
||||
}
|
||||
|
||||
// Ignore types that are not POI
|
||||
if (!isMainType && !isPoi(type) && !isDirectional(type))
|
||||
if (!isMainType && !isPoi(type) && !subtypes.IsTypeWithSubtypesOrSubtype(type) && !isDirectional(type))
|
||||
continue;
|
||||
|
||||
// Ignore general amenity
|
||||
|
||||
@@ -127,6 +127,7 @@ static std::pair<UniString, UniString> const kPreprocessReplacements[] = {
|
||||
{MakeUniString("пр-д"), MakeUniString("проезд")},
|
||||
{MakeUniString("пр-т"), MakeUniString("проспект")},
|
||||
{MakeUniString("р-н"), MakeUniString("район")},
|
||||
{MakeUniString("ж.к."), MakeUniString("жк")},
|
||||
{MakeUniString("আ/এ"), MakeUniString("আবাসিক এলাকা")},
|
||||
};
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ unordered_map<string, vector<string>> const kSynonyms = {
|
||||
{"9", {"nove", "nueve", "تسع", "nueve", "novena", "noveno", "nona", "nono"}},
|
||||
{"9o", {"noveno", "nono"}},
|
||||
{"9th", {"ninth"}},
|
||||
{"a", {"am", "auto-estrada", "aikštė"}},
|
||||
{"a", {"am", "auto-estrada", "aikštė", "autoroute"}},
|
||||
{"abe", {"abbaye"}},
|
||||
{"accs", {"access"}},
|
||||
{"aceq", {"acequia"}},
|
||||
@@ -97,6 +97,8 @@ unordered_map<string, vector<string>> const kSynonyms = {
|
||||
//{"a.d", {"auf der", "an der"}}, // unreachable
|
||||
{"adi", {"ambodi"}},
|
||||
{"adm", {"admirała", "admirał"}},
|
||||
{"aerd", {"aérodrome"}},
|
||||
{"aerg", {"aérogare"}},
|
||||
{"afb", {"air force base"}},
|
||||
{"agl", {"agglomération"}},
|
||||
{"aha", {"andoha"}},
|
||||
@@ -161,9 +163,12 @@ unordered_map<string, vector<string>> const kSynonyms = {
|
||||
{"awg", {"awang"}},
|
||||
{"az", {"azinhaga"}},
|
||||
{"ba", {"banan"}},
|
||||
{"balc", {"balcon"}},
|
||||
{"balnr", {"balneario"}},
|
||||
{"barda", {"barriada"}},
|
||||
{"barr", {"barrière"}},
|
||||
{"basn", {"basin"}},
|
||||
{"bass", {"bassin"}},
|
||||
{"bast", {"baston"}},
|
||||
{"bat", {"batalionu", "batalion", "batalionów", "bataliony"}},
|
||||
{"bayer", {"bayerische", "bayerisch", "bayerischer", "bayerisches"}},
|
||||
@@ -217,6 +222,7 @@ unordered_map<string, vector<string>> const kSynonyms = {
|
||||
{"brg", {"brigadeiro", "bourg", "bundesrealgymnasium"}},
|
||||
{"brgy", {"barangay"}},
|
||||
{"bri", {"bridge"}},
|
||||
{"brg", {"barrage"}},
|
||||
{"brk", {"break", "brook"}},
|
||||
{"bro", {"brother"}},
|
||||
{"brw", {"brow"}},
|
||||
@@ -258,17 +264,19 @@ unordered_map<string, vector<string>> const kSynonyms = {
|
||||
{"care", {"carrières", "carrière"}},
|
||||
{"carr", {"carré"}},
|
||||
{"carref", {"carrefour"}},
|
||||
{"cas", {"caserne"}},
|
||||
{"cau", {"carreau"}},
|
||||
{"caus", {"causeway"}},
|
||||
{"cav", {"cavée"}},
|
||||
{"cbtiz", {"cobertizo"}},
|
||||
{"cc", {"calçada", "centro comercial"}},
|
||||
{"ccal", {"centre commercial"}},
|
||||
{"c", {"cesta", "carrer", "calle", "centre"}},
|
||||
{"cckq", {"căn cứ không quân"}},
|
||||
{"ccnh", {"calçadinha"}},
|
||||
{"cct", {"circuit"}},
|
||||
{"ccvcn", {"circunvalación"}},
|
||||
{"cd", {"cadde", "caddesi"}},
|
||||
{"cd", {"cadde", "caddesi", "chemin départemental"}},
|
||||
{"cđ", {"cao đẳng"}},
|
||||
{"cds", {"cul-de-sac"}},
|
||||
{"ceb", {"ciclo do ensino básico"}},
|
||||
@@ -282,12 +290,13 @@ unordered_map<string, vector<string>> const kSynonyms = {
|
||||
{"cft", {"croft"}},
|
||||
{"cgne", {"campagne"}},
|
||||
{"ch", {"church", "chaussee", "chemin", "chairman", "chase"}},
|
||||
{"chau", {"chaussée"}},
|
||||
{"che", {"chemins", "chemin"}},
|
||||
{"chem", {"cheminements", "cheminement"}},
|
||||
{"chi", {"charmille"}},
|
||||
{"chl", {"chalet"}},
|
||||
{"chal", {"chalet"}},
|
||||
{"chor", {"chorążego", "chorąży"}},
|
||||
{"chp", {"chapelle"}},
|
||||
{"chp", {"chapelle", "champ"}},
|
||||
{"chs", {"chaussée", "chaussées"}},
|
||||
{"cht", {"château"}},
|
||||
{"chv", {"chemins vicinaux", "chemin vicinal"}},
|
||||
@@ -303,6 +312,7 @@ unordered_map<string, vector<string>> const kSynonyms = {
|
||||
{"ck", {"creek"}},
|
||||
{"clb", {"câu lạc bộ"}},
|
||||
{"cl", {"close", "calle"}},
|
||||
{"clr", {"clairiere"}},
|
||||
{"cllja", {"calleja"}},
|
||||
{"cllón", {"callejón"}},
|
||||
{"cllzo", {"callizo"}},
|
||||
@@ -346,9 +356,11 @@ unordered_map<string, vector<string>> const kSynonyms = {
|
||||
{"cpl", {"corporal"}},
|
||||
{"cps", {"copse"}},
|
||||
{"cpt", {"captain"}},
|
||||
{"cr", {"cour"}},
|
||||
{"cra", {"colexio rural agrupado", "carrera", "colegio rural agrupado"}},
|
||||
{"crc", {"circus"}},
|
||||
{"cr", {"creek", "crescent", "county route", "county road"}},
|
||||
{"crs", {"cours"}},
|
||||
{"crcs", {"circus"}},
|
||||
{"crd", {"crossroad"}},
|
||||
{"cres", {"crescent"}},
|
||||
@@ -496,8 +508,8 @@ unordered_map<string, vector<string>> const kSynonyms = {
|
||||
{"estda", {"estrada"}},
|
||||
{"est", {"estate", "estació"}},
|
||||
{"estr", {"estrada"}},
|
||||
{"etg", {"étang"}},
|
||||
{"etang", {"étang"}},
|
||||
{"étang", {"étang"}},
|
||||
{"etar", {"estação de tratamento de águas residuais"}},
|
||||
{"etorb", {"etorbidea"}},
|
||||
{"eu", {"escola universitària"}},
|
||||
@@ -513,6 +525,7 @@ unordered_map<string, vector<string>> const kSynonyms = {
|
||||
{"fac", {"facultat"}},
|
||||
{"fawy", {"fairway"}},
|
||||
{"fb", {"fabrik"}},
|
||||
{"fbg", {"faubourg"}},
|
||||
{"fbrca", {"fábrica"}},
|
||||
{"fca", {"fábrica", "finca"}},
|
||||
{"fc", {"futebol clube"}},
|
||||
@@ -538,6 +551,7 @@ unordered_map<string, vector<string>> const kSynonyms = {
|
||||
{"fr", {"father", "frontage", "frei"}},
|
||||
{"frm", {"ferme", "fermes"}},
|
||||
{"frnt", {"front"}},
|
||||
{"frt", {"forêt"}},
|
||||
{"frtg", {"frontage"}},
|
||||
{"frwy", {"freeway"}},
|
||||
{"fshr", {"foreshore"}},
|
||||
@@ -552,11 +566,14 @@ unordered_map<string, vector<string>> const kSynonyms = {
|
||||
{"gal", {"galerie", "general", "galeries"}},
|
||||
{"garn", {"garenne"}},
|
||||
{"gbd", {"grand boulevard"}},
|
||||
{"gdav", {"grande avenue"}},
|
||||
{"gde", {"gemeinde"}},
|
||||
{"gden", {"grands ensembles", "grand ensemble"}},
|
||||
{"gd", {"gasilski dom"}},
|
||||
{"gdpl", {"grande place"}},
|
||||
{"gdn", {"gardens", "garden"}},
|
||||
{"gdns", {"gardens"}},
|
||||
{"gdr", {"grande rue"}},
|
||||
{"gebr", {"gebroeders"}},
|
||||
{"gen", {"generaal", "generała", "generála", "general"}},
|
||||
{"geo", {"george"}},
|
||||
@@ -580,8 +597,9 @@ unordered_map<string, vector<string>> const kSynonyms = {
|
||||
{"gra", {"grange"}},
|
||||
{"grg", {"gymnasium und realgymnasium"}},
|
||||
{"gr",
|
||||
{"grande rue", "grandes rues", "gracht", "grand’rue", "gränd", "graben", "grovet", "gränden", "grove", "großes",
|
||||
{"grande rue", "grandes rues", "gracht", "grand’rue", "gränd", "graben", "grovet", "gränden", "grove", "großes",
|
||||
"große", "großer"}},
|
||||
{"grge", {"grange"}},
|
||||
{"gri", {"grille"}},
|
||||
{"grim", {"grimpette"}},
|
||||
{"grnd", {"ground"}},
|
||||
@@ -622,7 +640,7 @@ unordered_map<string, vector<string>> const kSynonyms = {
|
||||
{"hse", {"house"}},
|
||||
{"hs", {"haus", "high school"}},
|
||||
{"hst", {"haltestelle"}},
|
||||
{"ht", {"heights", "hinteres", "hinterer", "hinter…", "hintere"}},
|
||||
{"ht", {"heights", "hinteres", "hinterer", "hinter", "hintere"}},
|
||||
{"htl", {"höhere technische lehranstalt"}},
|
||||
{"hts", {"heights"}},
|
||||
{"htt", {"hütte"}},
|
||||
@@ -680,12 +698,12 @@ unordered_map<string, vector<string>> const kSynonyms = {
|
||||
{"kel", {"kelurahan"}},
|
||||
{"kga", {"kleingartenanlage"}},
|
||||
{"kgg", {"kagalang-galang"}},
|
||||
{"kg", {"katastralgemeinde", "…kogel", "kampong", "kogel"}},
|
||||
{"kg", {"katastralgemeinde", "kampong", "kogel"}},
|
||||
{"kgv", {"kleingartenverein"}},
|
||||
{"kh", {"krankenhaus"}},
|
||||
{"kj", {"kuja"}},
|
||||
{"k", {"kalea", "katu", "koło", "kolo", "kort(e)"}},
|
||||
{"kl", {"konzentrationslager", "klein…", "kleines", "kleiner", "kleine", "kylä"}},
|
||||
{"k", {"kalea", "katu", "koło", "kolo", "kort", "korte"}},
|
||||
{"kl", {"konzentrationslager", "klein", "kleines", "kleiner", "kleine", "kylä"}},
|
||||
{"knm", {"khu nghỉ mát"}},
|
||||
{"kol", {"kolonel", "kolonia"}},
|
||||
{"kon", {"koning", "koningin"}},
|
||||
@@ -740,7 +758,9 @@ unordered_map<string, vector<string>> const kSynonyms = {
|
||||
{"mans", {"mansions"}},
|
||||
{"mar", {"marche", "marches"}},
|
||||
{"marsz", {"marszałka (marszałek)"}},
|
||||
{"mais", {"maison"}},
|
||||
{"maz", {"mazowiecka", "mazowiecki", "mazowieckie"}},
|
||||
{"mch", {"marché"}},
|
||||
{"md", {"mead"}},
|
||||
{"mdr", {"meander"}},
|
||||
{"mdw", {"meadow", "meadows"}},
|
||||
@@ -769,7 +789,7 @@ unordered_map<string, vector<string>> const kSynonyms = {
|
||||
{"mndr", {"meander"}},
|
||||
{"mn", {"mossèn"}},
|
||||
{"mnr", {"manor"}},
|
||||
{"mnt", {"muntele", "maantee"}},
|
||||
{"mnt", {"muntele", "maantee", "montée"}},
|
||||
{"mon", {"monument"}},
|
||||
{"mons", {"monsenhor"}},
|
||||
{"mpal", {"municipal"}},
|
||||
@@ -900,6 +920,7 @@ unordered_map<string, vector<string>> const kSynonyms = {
|
||||
{"pi", {"polígon industrial"}},
|
||||
{"pje", {"pasaje"}},
|
||||
{"pj", {"polícia judiciária"}},
|
||||
{"pk", {"point kilométrique"}},
|
||||
{"pkg", {"parking"}},
|
||||
{"pkld", {"parklands"}},
|
||||
{"pko", {"puistikko"}},
|
||||
@@ -962,6 +983,7 @@ unordered_map<string, vector<string>> const kSynonyms = {
|
||||
{"prq", {"presqu’île"}},
|
||||
{"prtco", {"pórtico"}},
|
||||
{"prt", {"petite route"}},
|
||||
{"prte", {"porte"}},
|
||||
{"prv", {"parvis"}},
|
||||
{"przla", {"prazuela"}},
|
||||
{"psge", {"passage"}},
|
||||
@@ -1021,7 +1043,7 @@ unordered_map<string, vector<string>> const kSynonyms = {
|
||||
{"rdge", {"ridge"}},
|
||||
{"rdg", {"ridge"}},
|
||||
{"rdpt", {"rond-point"}},
|
||||
{"rd", {"road"}},
|
||||
{"rd", {"road", "route départementale"}},
|
||||
{"rdsd", {"roadside"}},
|
||||
{"rds", {"roads"}},
|
||||
{"rdtj", {"raudteejaam"}},
|
||||
@@ -1048,7 +1070,7 @@ unordered_map<string, vector<string>> const kSynonyms = {
|
||||
{"rnde", {"ronde"}},
|
||||
{"rnd", {"round"}},
|
||||
{"rnge", {"range"}},
|
||||
{"rn", {"rinne"}},
|
||||
{"rn", {"rinne", "route nationale"}},
|
||||
{"robt", {"robert"}},
|
||||
{"roc", {"roc", "rocade"}},
|
||||
{"roqt", {"roquet"}},
|
||||
@@ -1199,7 +1221,7 @@ unordered_map<string, vector<string>> const kSynonyms = {
|
||||
{"tercera", {"3", "3a"}},
|
||||
{"tercero", {"3", "3o"}},
|
||||
{"term", {"terminal"}},
|
||||
{"terr", {"terrace"}},
|
||||
{"terr", {"terrace", "terrasse"}},
|
||||
{"ter", {"terrace"}},
|
||||
{"tg", {"tanjong"}},
|
||||
{"thcs", {"trung học cơ sở"}},
|
||||
@@ -1270,6 +1292,7 @@ unordered_map<string, vector<string>> const kSynonyms = {
|
||||
{"va", {"vale"}},
|
||||
{"v:a", {"västra"}},
|
||||
{"vbt", {"viện bảo tàng"}},
|
||||
{"vc", {"voie communale"}},
|
||||
{"vche", {"vieux chemin"}},
|
||||
{"vcto", {"viaducto"}},
|
||||
{"vda", {"viuda"}},
|
||||
@@ -1507,12 +1530,11 @@ void QueryParams::ClearStreetIndices()
|
||||
AdditionalCommonTokens()
|
||||
{
|
||||
char const * arr[] = {
|
||||
"a", "and", "s", "the", // English
|
||||
"am", "an", "auf", "der", "im", "und", "zum", // German
|
||||
"as", "d", "da", "das", "de", "del", "di", "do",
|
||||
"dos", "du", "e", "el", "et", "la", "las", "le",
|
||||
"les", "los", "o", "os", "y", // French, Italian, Portuguese, Spanish
|
||||
"в", "и", "на", "я" // Cyrillic
|
||||
"a", "and", "s", "the", // English
|
||||
"am", "an", "auf", "der", "im", "und", "zum", // German
|
||||
"as", "d", "da", "das", "de", "del", "di", "do", "dos", "du", "e",
|
||||
"el", "et", "la", "las", "le", "les", "los", "o", "os", "y", // French, Italian, Portuguese, Spanish
|
||||
"в", "и", "за", "к", "на", "я" // Cyrillic
|
||||
};
|
||||
for (char const * s : arr)
|
||||
m_strings.insert(NormalizeAndSimplifyString(s));
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
272CA4462F126795005A3F5B /* ftypes_subtypes.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 272CA4442F126795005A3F5B /* ftypes_subtypes.hpp */; };
|
||||
272CA4472F126795005A3F5B /* ftypes_subtypes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 272CA4452F126795005A3F5B /* ftypes_subtypes.cpp */; };
|
||||
272CA44D2F12723B005A3F5B /* subtypes.csv in Resources */ = {isa = PBXBuildFile; fileRef = 272CA44C2F12723B005A3F5B /* subtypes.csv */; };
|
||||
27BCD5272E93E625002C50F0 /* feature_charge_sockets.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 27BCD5262E93E625002C50F0 /* feature_charge_sockets.cpp */; };
|
||||
27BCD5282E93E625002C50F0 /* feature_charge_sockets.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 27BCD5252E93E625002C50F0 /* feature_charge_sockets.hpp */; };
|
||||
27BCD52A2E93E670002C50F0 /* feature_charge_sockets_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 27BCD5292E93E670002C50F0 /* feature_charge_sockets_test.cpp */; };
|
||||
@@ -230,6 +233,9 @@
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
272CA4442F126795005A3F5B /* ftypes_subtypes.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = ftypes_subtypes.hpp; sourceTree = "<group>"; };
|
||||
272CA4452F126795005A3F5B /* ftypes_subtypes.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ftypes_subtypes.cpp; sourceTree = "<group>"; };
|
||||
272CA44C2F12723B005A3F5B /* subtypes.csv */ = {isa = PBXFileReference; lastKnownFileType = text; name = subtypes.csv; path = ../../data/subtypes.csv; sourceTree = "<group>"; };
|
||||
27BCD5252E93E625002C50F0 /* feature_charge_sockets.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = feature_charge_sockets.hpp; sourceTree = "<group>"; };
|
||||
27BCD5262E93E625002C50F0 /* feature_charge_sockets.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = feature_charge_sockets.cpp; sourceTree = "<group>"; };
|
||||
27BCD5292E93E670002C50F0 /* feature_charge_sockets_test.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = feature_charge_sockets_test.cpp; sourceTree = "<group>"; };
|
||||
@@ -499,6 +505,7 @@
|
||||
3496AB9C1DC1FA5200C5DDBA /* drules_proto.bin */,
|
||||
3496ABA21DC1FA7200C5DDBA /* editor.config */,
|
||||
3496ABAE1DC1FAC900C5DDBA /* minsk-pass.mwm */,
|
||||
272CA44C2F12723B005A3F5B /* subtypes.csv */,
|
||||
3496AB961DC1FA2000C5DDBA /* types.txt */,
|
||||
);
|
||||
name = Resources;
|
||||
@@ -689,6 +696,8 @@
|
||||
3D74ABBB1EA67C1E0063A898 /* ftypes_mapping.hpp */,
|
||||
675340D51A3F540F00A0A8C3 /* ftypes_matcher.cpp */,
|
||||
675340D61A3F540F00A0A8C3 /* ftypes_matcher.hpp */,
|
||||
272CA4452F126795005A3F5B /* ftypes_subtypes.cpp */,
|
||||
272CA4442F126795005A3F5B /* ftypes_subtypes.hpp */,
|
||||
675340DB1A3F540F00A0A8C3 /* index_builder.cpp */,
|
||||
675340DC1A3F540F00A0A8C3 /* index_builder.hpp */,
|
||||
675340DF1A3F540F00A0A8C3 /* interval_index_builder.hpp */,
|
||||
@@ -815,6 +824,7 @@
|
||||
675341411A3F540F00A0A8C3 /* scales.hpp in Headers */,
|
||||
675341321A3F540F00A0A8C3 /* interval_index_builder.hpp in Headers */,
|
||||
40009062201F5CB000963E18 /* cell_value_pair.hpp in Headers */,
|
||||
272CA4462F126795005A3F5B /* ftypes_subtypes.hpp in Headers */,
|
||||
347F337C1C454242009758CC /* rank_table.hpp in Headers */,
|
||||
40D62CEF23F2E8BE009A20F5 /* dat_section_header.hpp in Headers */,
|
||||
F61F83071E4B187500B37B7A /* road_shields_parser.hpp in Headers */,
|
||||
@@ -935,6 +945,7 @@
|
||||
3496ABA31DC1FA7200C5DDBA /* editor.config in Resources */,
|
||||
3496AB9D1DC1FA5200C5DDBA /* drules_proto_clear.bin in Resources */,
|
||||
3496AB9E1DC1FA5200C5DDBA /* drules_proto_dark.bin in Resources */,
|
||||
272CA44D2F12723B005A3F5B /* subtypes.csv in Resources */,
|
||||
FA67C84F26BB36D700B33DCA /* categories_brands.txt in Resources */,
|
||||
FA67C84626BB356800B33DCA /* categories_cuisines.txt in Resources */,
|
||||
3496ABA11DC1FA5200C5DDBA /* drules_proto.bin in Resources */,
|
||||
@@ -1027,6 +1038,7 @@
|
||||
4043C0B924ACBA3300545FD8 /* transliteration_loader.cpp in Sources */,
|
||||
6753411C1A3F540F00A0A8C3 /* shared_load_info.cpp in Sources */,
|
||||
67BC92F41D21476500A4A378 /* string_slice.cpp in Sources */,
|
||||
272CA4472F126795005A3F5B /* ftypes_subtypes.cpp in Sources */,
|
||||
BBB7060F23E46E0100A7F29A /* isolines_info.cpp in Sources */,
|
||||
408FE47724FEB95600F5D06D /* metadata_serdes.cpp in Sources */,
|
||||
34583BCB1C88552100F94664 /* map_object.cpp in Sources */,
|
||||
|
||||
Reference in New Issue
Block a user