Compare commits

..

1 Commits

Author SHA1 Message Date
Konstantin Pastbin
17a6c34e7f [generator] Make Taiwan_North use 5 threads for Index stage
Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
2025-12-03 20:44:03 +07:00
26 changed files with 101 additions and 103 deletions

View File

@@ -105,17 +105,17 @@ jobs:
run: | run: |
echo "Cloning $FORGEJO_SERVER_URL/$FORGEJO_REPOSITORY branch $FORGEJO_REF_NAME" echo "Cloning $FORGEJO_SERVER_URL/$FORGEJO_REPOSITORY branch $FORGEJO_REF_NAME"
cd ~ cd ~
git clone --depth 1 --recurse-submodules --shallow-submodules -b $FORGEJO_REF_NAME --single-branch $FORGEJO_SERVER_URL/$FORGEJO_REPOSITORY.git comaps git clone --recurse-submodules --shallow-submodules -b $FORGEJO_REF_NAME --single-branch $FORGEJO_SERVER_URL/$FORGEJO_REPOSITORY.git comaps
- name: Checkout wikiparser repo - name: Checkout wikiparser repo
shell: bash shell: bash
run: | run: |
cd ~ cd ~
git clone --depth 1 --single-branch https://codeberg.org/comaps/wikiparser.git git clone https://codeberg.org/comaps/wikiparser.git
- name: Checkout subways repo - name: Checkout subways repo
shell: bash shell: bash
run: | run: |
cd ~ cd ~
git clone --depth 1 --single-branch https://codeberg.org/comaps/subways.git git clone https://codeberg.org/comaps/subways.git
copy-coasts: copy-coasts:
# if: inputs.run-copy-coasts # if: inputs.run-copy-coasts

View File

@@ -1,16 +1,15 @@
This file contains a list of people who have contributed to this project. This file contains a list of people who have contributed to this project.
It is not necessarily comprehensive as contributors must manually add themselves. Its not neccesarily comprehensive.
Feel free to add yourself here along with your first contribution! Feel free to add yourself here along with your first contribution!
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
CoMaps contributors: CoMaps contributors:
(in alphabetical order) (in alphabetic order)
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
Bastian Greshake Tzovaras Bastian Greshake Tzovaras
clover sage clover sage
Harry Bond <me@hbond.xyz> Harry Bond <me@hbond.xyz>
thesupertechie
vikiawv vikiawv
Yannik Bloscheck Yannik Bloscheck

View File

@@ -6,6 +6,7 @@ import android.os.Bundle;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.ProgressBar;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import androidx.core.view.ViewCompat; import androidx.core.view.ViewCompat;
@@ -22,7 +23,6 @@ import app.organicmaps.util.Utils;
import app.organicmaps.util.WindowInsetUtils; import app.organicmaps.util.WindowInsetUtils;
import app.organicmaps.widget.StackedButtonDialogFragment; import app.organicmaps.widget.StackedButtonDialogFragment;
import com.google.android.material.imageview.ShapeableImageView; import com.google.android.material.imageview.ShapeableImageView;
import com.google.android.material.progressindicator.CircularProgressIndicator;
import com.google.android.material.textview.MaterialTextView; import com.google.android.material.textview.MaterialTextView;
import java.text.NumberFormat; import java.text.NumberFormat;
@@ -50,7 +50,7 @@ public class ProfileFragment extends BaseMwmToolbarFragment
private MaterialTextView mEditsSent; private MaterialTextView mEditsSent;
private MaterialTextView mProfileName; private MaterialTextView mProfileName;
private ShapeableImageView mProfileImage; private ShapeableImageView mProfileImage;
private CircularProgressIndicator mProfileInfoLoading; private ProgressBar mProfileInfoLoading;
@Nullable @Nullable
@Override @Override

View File

@@ -33,13 +33,9 @@
style="@style/MwmWidget.TextView.NavStreet" style="@style/MwmWidget.TextView.NavStreet"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:padding="@dimen/margin_quarter_plus"
android:maxLines="2" android:maxLines="2"
android:layout_gravity="center_vertical" android:layout_gravity="center_horizontal"
android:gravity="center" android:gravity="center"
android:autoSizeTextType="uniform"
android:autoSizeMinTextSize="16sp"
android:autoSizeMaxTextSize="25sp"
android:textColor="@android:color/white" android:textColor="@android:color/white"
tools:text="Sample street name.\nLong looooooooong!!!!"/> tools:text="Sample street name.\nLong looooooooong!!!!"/>
</RelativeLayout> </RelativeLayout>

View File

@@ -30,14 +30,12 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="@dimen/margin_base" android:padding="@dimen/margin_base"
android:background="?colorPrimary"> android:background="?colorPrimary">
<com.google.android.material.progressindicator.CircularProgressIndicator <ProgressBar
android:id="@+id/user_profile_loading" android:id="@+id/user_profile_loading"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:trackColor="@color/text_light"
app:indicatorColor="@color/text_light"
android:layout_gravity="center" android:layout_gravity="center"
android:indeterminate="true" android:indeterminateTint="@color/text_light"
android:visibility="invisible" android:visibility="invisible"
tools:visibility="visible" /> tools:visibility="visible" />
<LinearLayout <LinearLayout

View File

@@ -10,12 +10,12 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:visibility="gone" /> android:visibility="gone" />
<com.google.android.material.progressindicator.CircularProgressIndicator <ProgressBar
android:id="@+id/progress" android:id="@+id/progress"
style="@style/Widget.AppCompat.ProgressBar"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center" />
android:indeterminate="true"/>
<include <include
layout="@layout/feedback_fab" layout="@layout/feedback_fab"
android:layout_width="match_parent" android:layout_width="match_parent"

View File

@@ -10,12 +10,12 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:visibility="gone"/> android:visibility="gone"/>
<com.google.android.material.progressindicator.CircularProgressIndicator <ProgressBar
android:id="@+id/progress" android:id="@+id/progress"
style="@style/Widget.AppCompat.ProgressBar"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"/>
android:indeterminate="true"/>
<include layout="@layout/shadow_top"/> <include layout="@layout/shadow_top"/>
</FrameLayout> </FrameLayout>

View File

@@ -35,10 +35,6 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:maxLines="2" android:maxLines="2"
android:padding="@dimen/margin_quarter"
android:autoSizeTextType="uniform"
android:autoSizeMinTextSize="19sp"
android:autoSizeMaxTextSize="25sp"
android:minHeight="60dp" android:minHeight="60dp"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:gravity="center" android:gravity="center"

View File

@@ -6,10 +6,11 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:gravity="center" android:gravity="center"
android:orientation="vertical"> android:orientation="vertical">
<com.google.android.material.progressindicator.CircularProgressIndicator <ProgressBar
style="@style/Widget.AppCompat.ProgressBar"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:indeterminate="true"/> android:background="@null" />
<com.google.android.material.textview.MaterialTextView <com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View File

@@ -6,8 +6,9 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:contentDescription="@string/search_show_on_map" android:contentDescription="@string/search_show_on_map"
style="@style/MwmWidget.ExtendedFAB" style="@style/FAB"
app:icon="@drawable/ic_show_on_map" app:icon="@drawable/ic_show_on_map"
android:text="@string/search_show_on_map" android:text="@string/search_show_on_map"
android:clickable="true" android:clickable="true"
android:focusable="true" /> android:focusable="true"
app:fabSize="mini"/>

View File

@@ -1,10 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.progressindicator.CircularProgressIndicator <ProgressBar
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" style="@style/Widget.AppCompat.ProgressBar"
android:layout_width="@dimen/height_block_base" android:layout_width="@dimen/height_block_base"
android:layout_height="@dimen/height_block_base" android:layout_height="@dimen/height_block_base"
android:padding="@dimen/margin_half" android:padding="@dimen/margin_half"
android:indeterminate="true" android:background="@null"/>
app:trackColor="@color/text_light"
app:indicatorColor="@color/text_light" />

View File

@@ -34,17 +34,16 @@
android:singleLine="true" android:singleLine="true"
android:textCursorDrawable="@drawable/cursor_drawable" /> android:textCursorDrawable="@drawable/cursor_drawable" />
<com.google.android.material.progressindicator.CircularProgressIndicator <ProgressBar
android:id="@+id/progress" android:id="@+id/progress"
style="@style/Widget.AppCompat.ProgressBar"
android:layout_width="@dimen/search_progress_size" android:layout_width="@dimen/search_progress_size"
android:layout_height="@dimen/search_progress_size" android:layout_height="@dimen/search_progress_size"
android:layout_marginEnd="@dimen/margin_half" android:layout_marginEnd="@dimen/margin_half"
android:layout_weight="0" android:layout_weight="0"
android:background="@null"
android:minHeight="@dimen/search_progress_size" android:minHeight="@dimen/search_progress_size"
android:minWidth="@dimen/search_progress_size" android:minWidth="@dimen/search_progress_size"/>
app:trackColor="@color/text_light"
app:indicatorColor="@color/text_light"
android:indeterminate="true"/>
<com.google.android.material.imageview.ShapeableImageView <com.google.android.material.imageview.ShapeableImageView
android:id="@+id/clear" android:id="@+id/clear"

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools"> <resources xmlns:tools="http://schemas.android.com/tools">
<style name="MwmTheme.Base" parent="Theme.Material3.DayNight.NoActionBar"> <style name="MwmTheme.Base" parent="Theme.Material3.DayNight.NoActionBar">
<item name="materialCalendarStyle">@style/Widget.Material3.MaterialCalendar</item> <item name="materialCalendarStyle">@style/Widget.MaterialComponents.MaterialCalendar</item>
<item name="materialCalendarFullscreenTheme">@style/MwmWidget.MaterialCalendar.Theme.FullScreen.Dark</item> <item name="materialCalendarFullscreenTheme">@style/MwmWidget.MaterialCalendar.Theme.FullScreen.Dark</item>
<item name="materialCalendarTheme">@style/MwmWidget.MaterialCalendar.Theme.Dark</item> <item name="materialCalendarTheme">@style/MwmWidget.MaterialCalendar.Theme.Dark</item>
<item name="android:listViewStyle">@style/MwmWidget.ListView</item> <item name="android:listViewStyle">@style/MwmWidget.ListView</item>
@@ -111,7 +111,7 @@
<item name="elevationProfileSelectedPointTriangle">@drawable/ic_ascent</item> <item name="elevationProfileSelectedPointTriangle">@drawable/ic_ascent</item>
<item name="elevationProfileFloatingTriangle">@drawable/ic_triangle_elevation</item> <item name="elevationProfileFloatingTriangle">@drawable/ic_triangle_elevation</item>
<item name="elevationProfileColor">@color/elevation_profile</item> <item name="elevationProfileColor">@color/elevation_profile</item>
<item name="android:popupMenuStyle">@style/Widget.Material3.PopupMenu</item> <item name="android:popupMenuStyle">@style/PopupMenu</item>
<item name="bottomSheetStyle">@style/MwmWidget.BottomSheet</item> <item name="bottomSheetStyle">@style/MwmWidget.BottomSheet</item>
<item name="bottomSheetDialogTheme">@style/MwmTheme.BottomSheetDialog</item> <item name="bottomSheetDialogTheme">@style/MwmTheme.BottomSheetDialog</item>

View File

@@ -100,7 +100,7 @@
<!-- Nav menu --> <!-- Nav menu -->
<dimen name="nav_elevation">6dp</dimen> <dimen name="nav_elevation">6dp</dimen>
<dimen name="nav_street_height">50dp</dimen> <dimen name="nav_street_height">44dp</dimen>
<dimen name="nav_street_left">100dp</dimen> <dimen name="nav_street_left">100dp</dimen>
<dimen name="nav_next_turn_frame">88dp</dimen> <dimen name="nav_next_turn_frame">88dp</dimen>
<dimen name="nav_next_turn_top">8dp</dimen> <dimen name="nav_next_turn_top">8dp</dimen>

View File

@@ -364,13 +364,23 @@
<item name="behavior_hideable">false</item> <item name="behavior_hideable">false</item>
</style> </style>
<style name="MwmWidget.ExtendedFAB" parent="Widget.Material3.ExtendedFloatingActionButton.Primary"> <style name="FAB" parent="Widget.MaterialComponents.ExtendedFloatingActionButton">
<item name="android:minHeight">30dp</item> <item name="android:minHeight">30dp</item>
<item name="android:minWidth">30dp</item>
<item name="android:paddingTop">7dp</item>
<item name="android:paddingBottom">7dp</item>
<item name="android:paddingStart">12dp</item>
<item name="android:paddingEnd">12dp</item>
<item name="android:paddingLeft">12dp</item>
<item name="android:paddingRight">12dp</item>
<item name="iconPadding">4dp</item> <item name="iconPadding">4dp</item>
<item name="iconSize">20dp</item> <item name="iconSize">20dp</item>
<item name="iconTint">?accentButtonTextColor</item> <item name="iconTint">?accentButtonTextColor</item>
<item name="android:textColor">?accentButtonTextColor</item> <item name="android:textColor">?accentButtonTextColor</item>
<item name="backgroundTint">?colorSecondary</item> <item name="backgroundTint">?colorSecondary</item>
<item name="android:textSize">14sp</item>
<item name="textAllCaps">false</item>
<item name="android:textAllCaps">false</item>
</style> </style>
<style name="MwmWidget.M3.Button" parent="Widget.Material3.Button"> <style name="MwmWidget.M3.Button" parent="Widget.Material3.Button">

View File

@@ -116,7 +116,7 @@
<item name="elevationProfileSelectedPointTriangle">@drawable/ic_ascent</item> <item name="elevationProfileSelectedPointTriangle">@drawable/ic_ascent</item>
<item name="elevationProfileFloatingTriangle">@drawable/ic_triangle_elevation</item> <item name="elevationProfileFloatingTriangle">@drawable/ic_triangle_elevation</item>
<item name="elevationProfileColor">@color/elevation_profile</item> <item name="elevationProfileColor">@color/elevation_profile</item>
<item name="android:popupMenuStyle">@style/Widget.Material3.PopupMenu</item> <item name="android:popupMenuStyle">@style/PopupMenu</item>
<!-- Style used for bottom sheet behavior components --> <!-- Style used for bottom sheet behavior components -->
<item name="bottomSheetStyle">@style/MwmWidget.BottomSheet</item> <item name="bottomSheetStyle">@style/MwmWidget.BottomSheet</item>

View File

@@ -13,7 +13,6 @@ node[shop],
node[amenity=car_wash], node[amenity=car_wash],
node[amenity=fuel], node[amenity=fuel],
node[amenity=studio], node[amenity=studio],
node[amenity=toilets],
node[amenity=vehicle_inspection], node[amenity=vehicle_inspection],
node[craft], node[craft],
node[landuse=industrial][industrial=mine], node[landuse=industrial][industrial=mine],

View File

@@ -541,8 +541,8 @@
/* Voice */ /* Voice */
"voice" = "Voice"; "voice" = "Voice";
"voice_explanation" = "It's possible to pick a better voice in the system settings under *Accessibility*, *Read & Speak*, *Voices*."; "voice_explanation" = "It's possible to pick a better voice in the system settings under *Accesibility*, *Read & Speak*, *Voices*.";
"voice_explanation_before_version26" = "It's possible to pick a better voice in the system settings under *Accessibility*, *Spoken Content*, *Voices*."; "voice_explanation_before_version26" = "It's possible to pick a better voice in the system settings under *Accesibility*, *Spoken Content*, *Voices*.";
"unknown" = "Unknown"; "unknown" = "Unknown";
/* Place page confirmation messages and time ago formatting */ /* Place page confirmation messages and time ago formatting */
@@ -1045,25 +1045,25 @@
/* Message for the bug report alert. */ /* Message for the bug report alert. */
"bugreport_alert_message" = "Would you like to send a bug report to the developers?\nWe rely on our users as CoMaps doesn't collect any error information automatically. Thank you in advance for supporting CoMaps!"; "bugreport_alert_message" = "Would you like to send a bug report to the developers?\nWe rely on our users as CoMaps doesn't collect any error information automatically. Thank you in advance for supporting CoMaps!";
/* Title for the iCloud synchronization setting */ /* Title for the iCloud syncronization setting */
"icloud_sync" = "iCloud Synchronization (Beta)"; "icloud_sync" = "iCloud Syncronization (Beta)";
/* Title for the "Enable iCloud Synchronization" alert. */ /* Title for the "Enable iCloud Syncronization" alert. */
"enable_icloud_synchronization_title" = "Enable iCloud Synchronization"; "enable_icloud_synchronization_title" = "Enable iCloud Syncronization";
/* Message for the "Enable iCloud Synchronization" alert. */ /* Message for the "Enable iCloud Syncronization" alert. */
"enable_icloud_synchronization_message" = "iCloud synchronization is an experimental feature under development. Make sure that you have made a backup of all your bookmarks and tracks."; "enable_icloud_synchronization_message" = "iCloud synchronization is an experimental feature under development. Make sure that you have made a backup of all your bookmarks and tracks.";
/* Title for the "iCloud Is Disabled" alert. */ /* Title for the "iCloud Is Disabled" alert. */
"icloud_disabled_title" = "iCloud Is Disabled"; "icloud_disabled_title" = "iCloud Is Disabled";
/* Message for the "iCloud is Disabled" alert. */ /* Message for the "iCloud is Disabled" alert. */
"icloud_disabled_message" = "Please enable iCloud for CoMaps in your Apple Account's settings to use this feature."; "icloud_disabled_message" = "Please enable iCloud in your device's settings to use this feature.";
/* Title for the "Enable iCloud Synchronization" alert's "Enable" action button. */ /* Title for the "Enable iCloud Syncronization" alert's "Enable" action button. */
"enable" = "Enable"; "enable" = "Enable";
/* Title for the "Enable iCloud Synchronization" alert's "Backup" action button. */ /* Title for the "Enable iCloud Syncronization" alert's "Backup" action button. */
"backup" = "Backup"; "backup" = "Backup";
/* Title for the "iCloud synchronization failure" alert. */ /* Title for the "iCloud synchronization failure" alert. */

View File

@@ -560,8 +560,8 @@
/* Voice */ /* Voice */
"voice" = "Voice"; "voice" = "Voice";
"voice_explanation" = "It's possible to pick a better voice in the system settings under *Accessibility*, *Read & Speak*, *Voices*."; "voice_explanation" = "It's possible to pick a better voice in the system settings under *Accesibility*, *Read & Speak*, *Voices*.";
"voice_explanation_before_version26" = "It's possible to pick a better voice in the system settings under *Accessibility*, *Spoken Content*, *Voices*."; "voice_explanation_before_version26" = "It's possible to pick a better voice in the system settings under *Accesibility*, *Spoken Content*, *Voices*.";
"unknown" = "Unknown"; "unknown" = "Unknown";
/* Place page confirmation messages and time ago formatting */ /* Place page confirmation messages and time ago formatting */
@@ -1070,25 +1070,25 @@
/* Message for the bug report alert. */ /* Message for the bug report alert. */
"bugreport_alert_message" = "Would you like to send a bug report to the developers?\nWe rely on our users as CoMaps doesn't collect any error information automatically. Thank you in advance for supporting CoMaps!"; "bugreport_alert_message" = "Would you like to send a bug report to the developers?\nWe rely on our users as CoMaps doesn't collect any error information automatically. Thank you in advance for supporting CoMaps!";
/* Title for the iCloud synchronization setting */ /* Title for the iCloud syncronization setting */
"icloud_sync" = "iCloud Synchronization (Beta)"; "icloud_sync" = "iCloud Syncronization (Beta)";
/* Title for the "Enable iCloud Synchronization" alert. */ /* Title for the "Enable iCloud Syncronization" alert. */
"enable_icloud_synchronization_title" = "Enable iCloud Synchronization"; "enable_icloud_synchronization_title" = "Enable iCloud Syncronization";
/* Message for the "Enable iCloud Synchronization" alert. */ /* Message for the "Enable iCloud Syncronization" alert. */
"enable_icloud_synchronization_message" = "iCloud synchronization is an experimental feature under development. Make sure that you have made a backup of all your bookmarks and tracks."; "enable_icloud_synchronization_message" = "iCloud synchronization is an experimental feature under development. Make sure that you have made a backup of all your bookmarks and tracks.";
/* Title for the "iCloud Is Disabled" alert. */ /* Title for the "iCloud Is Disabled" alert. */
"icloud_disabled_title" = "iCloud Is Disabled"; "icloud_disabled_title" = "iCloud Is Disabled";
/* Message for the "iCloud is Disabled" alert. */ /* Message for the "iCloud is Disabled" alert. */
"icloud_disabled_message" = "Please enable iCloud for CoMaps in your Apple Account's settings to use this feature."; "icloud_disabled_message" = "Please enable iCloud in your device's settings to use this feature.";
/* Title for the "Enable iCloud Synchronization" alert's "Enable" action button. */ /* Title for the "Enable iCloud Syncronization" alert's "Enable" action button. */
"enable" = "Enable"; "enable" = "Enable";
/* Title for the "Enable iCloud Synchronization" alert's "Backup" action button. */ /* Title for the "Enable iCloud Syncronization" alert's "Backup" action button. */
"backup" = "Backup"; "backup" = "Backup";
/* Title for the "iCloud synchronization failure" alert. */ /* Title for the "iCloud synchronization failure" alert. */

View File

@@ -11,7 +11,6 @@
#include "base/assert.hpp" #include "base/assert.hpp"
#include "base/buffer_vector.hpp" #include "base/buffer_vector.hpp"
#include <execution>
#include <string> #include <string>
#include <unordered_map> #include <unordered_map>
#include <vector> #include <vector>
@@ -118,31 +117,27 @@ public:
template <class FnT> template <class FnT>
void ForEachEnter(FnT && fn) const void ForEachEnter(FnT && fn) const
{ {
std::for_each(std::execution::par_unseq, m_transitions.begin(), m_transitions.end(), [&](auto const & pair) for (auto const & [key, transit] : m_transitions)
{ {
auto const & [key, transit] = pair;
if (transit.m_forwardIsEnter) if (transit.m_forwardIsEnter)
fn(transit.m_enterIdx, Segment(m_mwmId, key.m_featureId, key.m_segmentIdx, true)); fn(transit.m_enterIdx, Segment(m_mwmId, key.m_featureId, key.m_segmentIdx, true));
if (!transit.m_oneWay && !transit.m_forwardIsEnter) if (!transit.m_oneWay && !transit.m_forwardIsEnter)
fn(transit.m_enterIdx, Segment(m_mwmId, key.m_featureId, key.m_segmentIdx, false)); fn(transit.m_enterIdx, Segment(m_mwmId, key.m_featureId, key.m_segmentIdx, false));
}); }
} }
template <class FnT> template <class FnT>
void ForEachExit(FnT && fn) const void ForEachExit(FnT && fn) const
{ {
std::for_each(std::execution::par_unseq, m_transitions.begin(), m_transitions.end(), [&](auto const & pair) for (auto const & [key, transit] : m_transitions)
{ {
auto const & [key, transit] = pair;
if (!transit.m_forwardIsEnter) if (!transit.m_forwardIsEnter)
fn(transit.m_exitIdx, Segment(m_mwmId, key.m_featureId, key.m_segmentIdx, true)); fn(transit.m_exitIdx, Segment(m_mwmId, key.m_featureId, key.m_segmentIdx, true));
if (!transit.m_oneWay && transit.m_forwardIsEnter) if (!transit.m_oneWay && transit.m_forwardIsEnter)
fn(transit.m_exitIdx, Segment(m_mwmId, key.m_featureId, key.m_segmentIdx, false)); fn(transit.m_exitIdx, Segment(m_mwmId, key.m_featureId, key.m_segmentIdx, false));
}); }
} }
void GetOutgoingEdgeList(Segment const & segment, EdgeListT & edges) const void GetOutgoingEdgeList(Segment const & segment, EdgeListT & edges) const

View File

@@ -4,14 +4,16 @@
#include "routing/routing_options.hpp" #include "routing/routing_options.hpp"
#include "routing/world_graph.hpp" #include "routing/world_graph.hpp"
#include "platform/settings.hpp"
#include "base/assert.hpp" #include "base/assert.hpp"
#include "base/checked_cast.hpp" #include "base/checked_cast.hpp"
#include "base/exception.hpp"
#include "base/timer.hpp" #include "base/timer.hpp"
#include "geometry/distance_on_sphere.hpp" #include "geometry/distance_on_sphere.hpp"
#include <algorithm> #include <algorithm>
#include <execution>
#include <limits> #include <limits>
#include <utility> #include <utility>
@@ -319,9 +321,7 @@ void IndexGraph::ReconstructJointSegment(astar::VertexData<JointSegment, RouteWe
auto const & weightTimeToParent = parentVertexData.m_realDistance; auto const & weightTimeToParent = parentVertexData.m_realDistance;
auto const & parentJoint = parentVertexData.m_vertex; auto const & parentJoint = parentVertexData.m_vertex;
for (size_t i = 0; i < firstChildren.size(); ++i)
auto const range = std::ranges::views::iota(0uz, firstChildren.size());
std::for_each(std::execution::par_unseq, range.begin(), range.end(), [&, this](auto const i)
{ {
auto const & firstChild = firstChildren[i]; auto const & firstChild = firstChildren[i];
auto const lastPointId = lastPointIds[i]; auto const lastPointId = lastPointIds[i];
@@ -335,21 +335,22 @@ void IndexGraph::ReconstructJointSegment(astar::VertexData<JointSegment, RouteWe
{ return currentPointId < lastPointId ? pointId + 1 : pointId - 1; }; { return currentPointId < lastPointId ? pointId + 1 : pointId - 1; };
if (IsAccessNoForSure(firstChild.GetFeatureId(), weightTimeToParent, true /* useAccessConditional */)) if (IsAccessNoForSure(firstChild.GetFeatureId(), weightTimeToParent, true /* useAccessConditional */))
return; continue;
if (IsAccessNoForSure(parent.GetRoadPoint(isOutgoing), weightTimeToParent, true /* useAccessConditional */)) if (IsAccessNoForSure(parent.GetRoadPoint(isOutgoing), weightTimeToParent, true /* useAccessConditional */))
return; continue;
if (IsUTurn(parent, firstChild) && IsUTurnAndRestricted(parent, firstChild, isOutgoing)) if (IsUTurn(parent, firstChild) && IsUTurnAndRestricted(parent, firstChild, isOutgoing))
return; continue;
if (IsRestricted(parentJoint, parent.GetFeatureId(), firstChild.GetFeatureId(), isOutgoing, parents)) if (IsRestricted(parentJoint, parent.GetFeatureId(), firstChild.GetFeatureId(), isOutgoing, parents))
return; continue;
RouteWeight summaryWeight; RouteWeight summaryWeight;
// Check current JointSegment for bad road access between segments. // Check current JointSegment for bad road access between segments.
RoadPoint rp = firstChild.GetRoadPoint(isOutgoing); RoadPoint rp = firstChild.GetRoadPoint(isOutgoing);
uint32_t start = currentPointId; uint32_t start = currentPointId;
bool noRoadAccess = false;
do do
{ {
// This is optimization: we calculate accesses of road points before calculating weight of // This is optimization: we calculate accesses of road points before calculating weight of
@@ -359,13 +360,19 @@ void IndexGraph::ReconstructJointSegment(astar::VertexData<JointSegment, RouteWe
// until this |rp|. But we assume that segments have small length and inaccuracy will not // until this |rp|. But we assume that segments have small length and inaccuracy will not
// affect user. // affect user.
if (IsAccessNoForSure(rp, weightTimeToParent, true /* useAccessConditional */)) if (IsAccessNoForSure(rp, weightTimeToParent, true /* useAccessConditional */))
return; {
noRoadAccess = true;
break;
}
start = increment(start); start = increment(start);
rp.SetPointId(start); rp.SetPointId(start);
} }
while (start != lastPointId); while (start != lastPointId);
if (noRoadAccess)
continue;
bool forward = currentPointId < lastPointId; bool forward = currentPointId < lastPointId;
Segment current = firstChild; Segment current = firstChild;
Segment prev = parent; Segment prev = parent;
@@ -389,7 +396,7 @@ void IndexGraph::ReconstructJointSegment(astar::VertexData<JointSegment, RouteWe
jointEdges.emplace_back(isOutgoing ? JointSegment(firstChild, prev) : JointSegment(prev, firstChild), jointEdges.emplace_back(isOutgoing ? JointSegment(firstChild, prev) : JointSegment(prev, firstChild),
summaryWeight); summaryWeight);
}); }
} }
void IndexGraph::GetNeighboringEdge(astar::VertexData<Segment, RouteWeight> const & fromVertexData, Segment const & to, void IndexGraph::GetNeighboringEdge(astar::VertexData<Segment, RouteWeight> const & fromVertexData, Segment const & to,

View File

@@ -18,6 +18,8 @@
#include "indexer/feature_meta.hpp" #include "indexer/feature_meta.hpp"
#include "geometry/point2d.hpp"
#include <memory> #include <memory>
#include <optional> #include <optional>
#include <unordered_map> #include <unordered_map>

View File

@@ -13,7 +13,6 @@
#include "3party/skarupke/bytell_hash_map.hpp" // needed despite of IDE warning #include "3party/skarupke/bytell_hash_map.hpp" // needed despite of IDE warning
#include <algorithm> #include <algorithm>
#include <execution>
#include <map> #include <map>
#include <optional> #include <optional>
#include <queue> #include <queue>
@@ -475,8 +474,7 @@ void IndexGraphStarterJoints<Graph>::GetEdgeList(astar::VertexData<Vertex, Weigh
CHECK(it != m_savedWeight.cend(), ("Can not find weight for:", vertex)); CHECK(it != m_savedWeight.cend(), ("Can not find weight for:", vertex));
Weight const weight = it->second; Weight const weight = it->second;
auto const range = std::ranges::views::iota(0uz, edges.size()); for (size_t i = 0; i < edges.size(); ++i)
std::for_each(std::execution::par_unseq, range.begin(), range.end(), [&, this](auto const i)
{ {
// Saving weight of current edges for returning in the next iterations. // Saving weight of current edges for returning in the next iterations.
auto & w = edges[i].GetWeight(); auto & w = edges[i].GetWeight();
@@ -492,7 +490,7 @@ void IndexGraphStarterJoints<Graph>::GetEdgeList(astar::VertexData<Vertex, Weigh
// |parentWeights[]|. So the weight of an ith edge is a cached "weight of parent JointSegment" + // |parentWeights[]|. So the weight of an ith edge is a cached "weight of parent JointSegment" +
// "parentWeight[i]". // "parentWeight[i]".
w = weight + parentWeights[i]; w = weight + parentWeights[i];
}); }
// Delete useless weight of parent JointSegment. // Delete useless weight of parent JointSegment.
m_savedWeight.erase(vertex); m_savedWeight.erase(vertex);
@@ -500,9 +498,8 @@ void IndexGraphStarterJoints<Graph>::GetEdgeList(astar::VertexData<Vertex, Weigh
else else
{ {
// This needs for correct weights calculation of FakeJointSegments during forward A* search. // This needs for correct weights calculation of FakeJointSegments during forward A* search.
auto const range = std::ranges::views::iota(firstFakeId, edges.size()); for (size_t i = firstFakeId; i < edges.size(); ++i)
std::for_each(std::execution::par_unseq, range.begin(), range.end(), edges[i].GetWeight() += parentWeights[i];
[&edges, &parentWeights](auto const i) { edges[i].GetWeight() += parentWeights[i]; });
} }
auto const vertexMwmId = vertex.GetMwmId(); auto const vertexMwmId = vertex.GetMwmId();
@@ -513,12 +510,12 @@ void IndexGraphStarterJoints<Graph>::GetEdgeList(astar::VertexData<Vertex, Weigh
/// a weight of v1->v2 transition moving backward (v2 ingoing). This is impossible in current (m_savedWeight) /// a weight of v1->v2 transition moving backward (v2 ingoing). This is impossible in current (m_savedWeight)
/// logic, so I moved Cross-MWM penalty into separate block here after _all_ weights calculations. /// logic, so I moved Cross-MWM penalty into separate block here after _all_ weights calculations.
std::for_each(std::execution::par_unseq, edges.begin(), edges.end(), [&, this](auto & e) for (auto & e : edges)
{ {
auto const targetMwmId = e.GetTarget().GetMwmId(); auto const targetMwmId = e.GetTarget().GetMwmId();
if (targetMwmId != kFakeNumMwmId && vertexMwmId != targetMwmId) if (targetMwmId != kFakeNumMwmId && vertexMwmId != targetMwmId)
e.GetWeight() += m_graph.GetCrossBorderPenalty(vertexMwmId, targetMwmId); e.GetWeight() += m_graph.GetCrossBorderPenalty(vertexMwmId, targetMwmId);
}); }
} }
} }

View File

@@ -38,7 +38,7 @@ def multithread_run_if_one_country(func):
kwargs.update({"threads_count": settings.THREADS_COUNT}) kwargs.update({"threads_count": settings.THREADS_COUNT})
# Otherwise index stage of Taiwan_* mwms continues to run after all other mwms have finished: # Otherwise index stage of Taiwan_* mwms continues to run after all other mwms have finished:
elif country == 'Taiwan_North': elif country == 'Taiwan_North':
kwargs.update({"threads_count": 3}) kwargs.update({"threads_count": 5})
elif country == 'Taiwan_South': elif country == 'Taiwan_South':
kwargs.update({"threads_count": 2}) kwargs.update({"threads_count": 2})
func(env, country, **kwargs) func(env, country, **kwargs)

View File

@@ -20,7 +20,7 @@ MAIN_OUT_PATH: /mnt/4tbexternal/osm-maps
# Path to the data/ folder in the repository: # Path to the data/ folder in the repository:
USER_RESOURCE_PATH: ${Developer:OMIM_PATH}/data USER_RESOURCE_PATH: ${Developer:OMIM_PATH}/data
# Features stage only parallelism level. Set to 0 for auto detection. # Features stage only parallelism level. Set to 0 for auto detection.
THREADS_COUNT_FEATURES_STAGE: 64 THREADS_COUNT_FEATURES_STAGE: 0
# Do not change it. This is determined automatically. # Do not change it. This is determined automatically.
NODE_STORAGE: mem NODE_STORAGE: mem

View File

@@ -31,22 +31,22 @@ python3 -m venv /tmp/venv
echo "<$(date +%T)> Copying map generator INI..." echo "<$(date +%T)> Copying map generator INI..."
cp var/etc/map_generator.ini.prod var/etc/map_generator.ini cp var/etc/map_generator.ini.prod var/etc/map_generator.ini
GENARGS="" $GENARGS=""
if [ $MWMTEST == "true" ]; then if [ $MWMTEST -gt 0 ]; then
echo "Marking as a test (non-prod) generation" echo "Marking as a test (non-prod) generation"
# TODO: output test maps into e.g. osm-maps-test/ and use a different generation.log # TODO: output test maps into e.g. osm-maps-test/ and use a different generation.log
GENARGS="$GENARGS -s=test" $GENARGS="$GENARGS -s=test"
fi fi
if [ $MWMCONTINUE == "true" ]; then if [ $MWMCONTINUE -gt 0 ]; then
echo "Continuing from preexisting generator run" echo "Continuing from preexisting generator run"
GENARGS="$GENARGS --continue" $GENARGS="$GENARGS --continue"
fi fi
if [[ -n $MWMCOUNTRIES ]]; then if [[ -n $MWMCOUNTRIES ]]; then
echo "Generating only specific maps for [$MWMCOUNTRIES]" echo "Generating only specific maps for [$MWMCOUNTRIES]"
GENARGS="$GENARGS --countries=$MWMCOUNTRIES" $GENARGS="$GENARGS --countries=$MWMCOUNTRIES"
fi fi
cd ~/comaps/tools/python cd ~/comaps/tools/python