Compare commits

..

6 Commits

Author SHA1 Message Date
zyphlar
0941c7b2bd turn off exceptions and notifications for diff
Signed-off-by: zyphlar <zyphlar@noreply.codeberg.org>
2026-01-21 18:36:36 +01:00
zyphlar
e714138ce7 [ci] fix subway cicd (#3011)
Signed-off-by: zyphlar <zyphlar@noreply.codeberg.org>
Reviewed-on: https://codeberg.org/comaps/comaps/pulls/3011
Reviewed-by: Konstantin Pastbin <pastk@noreply.codeberg.org>
2026-01-21 17:12:48 +01:00
Yannik Bloscheck
9969508193 [styles] Display names for trees and make those slightly better visibible in forests
Signed-off-by: Yannik Bloscheck <git@yannikbloscheck.com>
2026-01-21 14:10:47 +01:00
Yannik Bloscheck
08daf740e2 Display subtypes in search results
Signed-off-by: Yannik Bloscheck <git@yannikbloscheck.com>
2026-01-21 14:10:22 +01:00
vikiawv
c34c109abf Minor fix to Subway Vienna Color after some further investigation
Signed-off-by: vikiawv <vikiawv@noreply.codeberg.org>
2026-01-20 22:01:23 +01:00
vikiawv
e4c2961a5e Minor fix to Subway Vienna Color after some further investigation
Signed-off-by: vikiawv <vikiawv@noreply.codeberg.org>
2026-01-20 22:01:23 +01:00
16 changed files with 151 additions and 49 deletions

View File

@@ -1,13 +1,23 @@
name: process_subways
name: compare_subways
on:
workflow_dispatch: # Manual trigger
inputs:
subways-branch:
description: 'Check out a different subways repo branch?'
required: true
type: string
default: master
schedule:
# Run daily at 00:00 UTC
- cron: '0 0 * * *'
env:
PLANET: /home/planet/planet/planet.o5m
TMPDIR: /tmp
#PLANET: /home/planet/planet/planet-latest.pbf
#TMPDIR: /tmp
HTML_DIR: "/mnt/4tbexternal/osm-planet/subway/validator"
DUMP: "$HTML_DIR"
SKIP_PLANET_UPDATE: "1"
#DUMP: "$HTML_DIR"
#SKIP_PLANET_UPDATE: "1"
SPREADSHEET_ID: "1SEW1-NiNOnA2qDwievcxYV1FOaQl1mb1fdeyqAxHu3k"
DEBIAN_FRONTEND: nonnteractive
TZ: Etc/UTC
@@ -22,20 +32,61 @@ jobs:
volumes:
- /mnt/4tbexternal:/mnt/4tbexternal
concurrency:
group: ${{ github.workflow }}-process-subways-${{ github.event.pull_request.number || github.ref }}
group: ${{ github.workflow }}-compare-subways-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
steps:
- uses: actions/cache@v4
with:
path: "~"
key: cache-${{ github.run_id }}-${{ github.run_attempt }}
key: cache-${{ github.run_id }}-${{ github.run_attempt }}}
- name: Checkout main repo
shell: bash
run: |
echo "Cloning $FORGEJO_SERVER_URL/$FORGEJO_REPOSITORY branch $FORGEJO_REF_NAME"
cd ~
git clone --depth 1 -b $FORGEJO_REF_NAME --single-branch $FORGEJO_SERVER_URL/$FORGEJO_REPOSITORY.git comaps
# --recurse-submodules --shallow-submodules
- name: Checkout subways repo
shell: bash
run: |
cd ~
git clone --depth 1 --single-branch https://codeberg.org/comaps/subways.git
git clone --depth 1 -b ${{ inputs.subways-branch }} --single-branch https://codeberg.org/comaps/subways.git
update-planet-pbf:
name: Update PBF Planet
runs-on: mapfilemaker
container:
image: codeberg.org/comaps/maps_generator:f6d53d54f794
volumes:
- /mnt/4tbexternal/:/mnt/4tbexternal/
- /mnt/4tbexternal/osm-planet:/home/planet
concurrency:
group: ${{ github.workflow }}-compare-subways-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
steps:
- name: Download Planet File if Absent
shell: bash
# TODO: replace wget2 with curl -Z
run: |
if [ ! -d /home/planet/planet/ ]; then
mkdir -p /home/planet/planet/
fi
if [ ! -f /home/planet/planet/planet-latest.osm.pbf ]; then
cd /home/planet/planet/
wget2 --verbose --progress=bar --continue https://ftpmirror.your.org/pub/openstreetmap/pbf/planet-latest.osm.pbf
else
echo "planet-latest.osm.pbf was found, raw download not required."
fi
- name: Update PBF Planet
shell: bash
run: |
cd /home/planet/planet/
rm -f planet-latest-new.osm.pbf
pyosmium-up-to-date planet-latest.osm.pbf -o planet-latest-new.osm.pbf -v --size 16384
mv planet-latest-new.osm.pbf planet-latest.osm.pbf
update-planet-o5m:
if: false
name: Update O5M Planet
runs-on: mapfilemaker
container:
@@ -44,7 +95,7 @@ jobs:
- /mnt/4tbexternal/:/mnt/4tbexternal/
- /mnt/4tbexternal/osm-planet:/home/planet
concurrency:
group: ${{ github.workflow }}-process-subways-${{ github.event.pull_request.number || github.ref }}
group: ${{ github.workflow }}-compare-subways-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
steps:
- name: Check for O5M Planet File
@@ -73,18 +124,9 @@ jobs:
osmupdate -v --drop-author --drop-version --hash-memory=4000 --max-merge=32 --out-o5m planet.o5m planet-new.o5m
mv planet-new.o5m planet.o5m
echo "Done."
- name: Notify Zulip
run: |
curl -X POST https://comaps.zulipchat.com/api/v1/messages \
-u $ZULIP_BOT_EMAIL:$ZULIP_API_KEY \
--data-urlencode type=stream \
--data-urlencode 'to="DevOps"' \
--data-urlencode topic=codeberg-bot \
--data-urlencode 'content=O5M planet update is done!'
update-subways:
if: inputs.run-subways
name: Update Subways
compare-subways:
name: Compare Subways
runs-on: mapfilemaker
needs:
- clone-repos
@@ -94,31 +136,19 @@ jobs:
- /mnt/4tbexternal/:/mnt/4tbexternal/
- /mnt/4tbexternal/osm-planet:/home/planet
concurrency:
group: ${{ github.workflow }}-map-generator-${{ github.event.pull_request.number || github.ref }}
group: ${{ github.workflow }}-compare-subways-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
steps:
- uses: actions/cache@v4
with:
path: "~"
key: cache-${{ github.run_id }}-${{ github.run_attempt }}
- name: Update Subways
- name: Compare Subways
shell: bash
run: |
cd ~/comaps/
cp tools/unix/maps/settings.sh.prod tools/unix/maps/settings.sh
./tools/unix/maps/generate_subways.sh
- name: Compare with VK validation
shell: bash
run: |
cd ~/subways
if [ -f "$HTML_DIR/index.html" ]; then
echo "Comparing local validation with VK's validation..."
python3 ./scripts/compare_html_validation.py "$HTML_DIR/index.html" \
--vk-url "https://maps.vk.com/osm/tools/subways/latest/index.html"
else
echo "Local index.html not found at $HTML_DIR/index.html"
exit 1
fi
- name: Notify Zulip
run: |
curl -X POST https://comaps.zulipchat.com/api/v1/messages \
@@ -127,3 +157,48 @@ jobs:
--data-urlencode 'to="DevOps"' \
--data-urlencode topic=codeberg-bot \
--data-urlencode 'content=Subways are done!'
- name: Compare with VK validation
shell: bash
run: |
#set -e
cd ~/subways
if [ -f "$HTML_DIR/cities.txt" ]; then
echo "Comparing local validation with VK's validation..."
python3 ./scripts/compare_html_validation.py "$HTML_DIR/cities.txt" \
--remote-url "https://maps.vk.com/osm/tools/subways/latest/cities.txt"
exit 0
else
echo "Local cities.txt not found at $HTML_DIR/cities.txt"
exit 1
fi
- name: Compare Google Sheets Data
shell: bash
run: |
set -e
# Download the Google Sheets data
GOOGLE_SHEETS_URL="https://docs.google.com/spreadsheets/d/${SPREADSHEET_ID}/export?format=csv"
echo "Downloading Google Sheets data from: $GOOGLE_SHEETS_URL"
curl -sL "$GOOGLE_SHEETS_URL" -o /tmp/google_sheets.csv
# Normalize line endings to avoid spurious diffs
sed 's/\r$//' source_data/Rapid.csv > /tmp/local_normalized.csv
sed 's/\r$//' /tmp/google_sheets.csv > /tmp/google_normalized.csv
# Generate unified diff
echo ""
echo "Differences between local Rapid.csv and Google Sheets:"
echo ""
if diff -u /tmp/local_normalized.csv /tmp/google_normalized.csv > /tmp/full_diff.txt; then
echo "No differences found! Local Rapid.csv is in sync with Google Sheets."
exit 0
else
cat /tmp/full_diff.txt
echo ""
echo "The above diff can be saved as a patch and applied with:"
echo " patch source_data/Rapid.csv < patch-file"
echo "or by manually reviewing and applying the changes."
exit 1
fi

View File

@@ -42,7 +42,7 @@ public class ChooseBookmarkCategoryFragment
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
View root = inflater.inflate(R.layout.choose_bookmark_category_fragment, container, false);
getDialog().getWindow().setBackgroundDrawableResource(R.drawable.bg_transparent_dlg);
getDialog().getWindow().setBackgroundDrawableResource(android.R.color.transparent);
mRecycler = root.findViewById(R.id.recycler);
mRecycler.setLayoutManager(new LinearLayoutManager(requireActivity()));
return root;

View File

@@ -77,7 +77,7 @@ public class ChooseBookmarksSortingTypeFragment
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState)
{
super.onViewCreated(view, savedInstanceState);
getDialog().getWindow().setBackgroundDrawableResource(R.drawable.bg_transparent_dlg);
getDialog().getWindow().setBackgroundDrawableResource(android.R.color.transparent);
final Bundle args = getArguments();
if (args == null)

View File

@@ -61,7 +61,7 @@ public class StackedButtonsDialog extends AppCompatDialog implements View.OnClic
setCancelable(mCancelable);
setOnCancelListener(mCancelListener);
setContentView(R.layout.dialog_stacked_buttons);
getWindow().setBackgroundDrawableResource(R.drawable.bg_transparent_dlg);
getWindow().setBackgroundDrawableResource(android.R.color.transparent);
TextView title = findViewById(R.id.tv__title);
UiUtils.setTextAndHideIfEmpty(title, mTitle);

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@android:color/transparent"/>
<corners android:radius="28dp"/>
</shape>

View File

@@ -0,0 +1 @@
<svg height="15" viewBox="0 0 15 15" width="15" xmlns="http://www.w3.org/2000/svg"><g fill="none" transform="translate(.0562 .4152)"><path d="m7.76536687 1.02582924 2.91781373 1.20859801c.4900562.20298792.8794043.59233606 1.0823922 1.08239221l1.208598 2.91781372c.2029879.49005615.2029879 1.04067751 0 1.5307337l-1.208598 2.91781362c-.2029879.4900562-.5923361.8794044-1.0823922 1.0823923l-2.91781376 1.208598c-.49005615.2029879-1.04067751.2029879-1.53073369 0l-2.91781366-1.208598c-.49005618-.2029879-.87940432-.592336-1.08239223-1.0823922l-1.20859802-2.91781373c-.2029879-.49005617-.2029879-1.04067755.00000001-1.53073373l1.208598-2.91781368c.20298791-.49005618.59233603-.8794043 1.0823922-1.0823922l2.9178137-1.20859802c.49005617-.2029879 1.04067755-.2029879 1.53073372 0z" fill="#181715"/><path d="m7.57402516 1.48776901 2.91781374 1.20859801c.3675421.15224093.6595532.44425202.8117941.81179415l1.208598 2.91781369c.1522409.36754213.1522409.78050817 0 1.1480503l-1.208598 2.91781374c-.1522409.3675421-.444252.6595532-.8117941.8117941l-2.91781374 1.208598c-.36754213.1522409-.78050817.1522409-1.1480503 0l-2.91781369-1.208598c-.36754213-.1522409-.65955322-.444252-.81179415-.8117941l-1.20859801-2.91781374c-.15224093-.36754213-.15224093-.78050817 0-1.1480503l1.20859801-2.91781369c.15224093-.36754213.44425202-.65955322.81179415-.81179415l2.91781369-1.20859801c.36754213-.15224093.78050817-.15224093 1.1480503 0z" fill="202510" fill-rule="evenodd"/></g></svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -70,6 +70,7 @@ node|z14-[natural=geyser],
node|z16-[natural=beach],
area|z14-[natural=bare_rock],
node|z17-[natural=rock],
node|z17-[natural=tree],
{text: name;text-color: @poi_label;text-position: center;text-offset: 1;}
node|z13-[natural=peak][!name],
@@ -206,7 +207,9 @@ node|z19-[man_made=water_well][drinking_water=not],
node|z19-[amenity=water_point][drinking_water=not],
{icon-image: drinking-water-no-m.svg;}
node|z18-[natural=tree],
node|z17-[natural=tree][name],
{icon-image: tree-special-m.svg;}
node|z18-[natural=tree][!name],
{icon-image: tree-m.svg;}
node|z18-[xmas:feature=tree],

View File

@@ -2460,7 +2460,7 @@ emergency-life_ring # icon z19- (also has captio
power-substation # icon z17- (also has caption(optional) z18-, area z13-)
=== -9990
natural-tree # icon z18-
natural-tree # icon z17- (also has caption(optional) z17-)
=== -9991
# amenity-bench # caption(optional) z19- (also has icon z18-)
@@ -2499,6 +2499,7 @@ entrance-service # icon z19- (also has captio
# man_made-survey_point # caption(optional) z18- (also has icon z18-)
# man_made-telescope # caption(optional) z18- (also has icon z18-)
# man_made-telescope-optical # caption(optional) z17- (also has icon z17-)
# natural-tree # caption(optional) z17- (also has icon z17-)
# power-substation # caption(optional) z18- (also has icon z17-, area z13-)
# tourism-information # caption(optional) z16- (also has icon z16-)
# tourism-information-board # caption(optional) z16- (also has icon z16-)

View File

@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="18" height="18" version="1.1" viewBox="0 0 24 24" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="12" fill="#fff" opacity=".6"/><circle cx="12" cy="12" r="11" fill="#3b87c9"/><path d="m12 19.141c-2.6667 0-6-1.8076-6-6.141v-7.0295h4v6.9295c0 0.66086 0.66667 1.9 2 1.9 1.3333 0 2-1.0119 2-1.8v-7.0295h4v6.8295c0 4.5333-3.3333 6.341-6 6.341z" fill="#fff"/></svg>
<svg width="18" height="18" version="1.1" viewBox="0 0 24 24" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="12" fill="#fff" opacity=".6"/><circle cx="12" cy="12" r="11" fill="#1267CE"/><path d="m12 19.141c-2.6667 0-6-1.8076-6-6.141v-7.0295h4v6.9295c0 0.66086 0.66667 1.9 2 1.9 1.3333 0 2-1.0119 2-1.8v-7.0295h4v6.8295c0 4.5333-3.3333 6.341-6 6.341z" fill="#fff"/></svg>

Before

Width:  |  Height:  |  Size: 446 B

After

Width:  |  Height:  |  Size: 446 B

View File

@@ -2,7 +2,7 @@
<svg width="14" height="14" version="1.1" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg">
<g stroke-width=".75">
<circle cx="9" cy="9" r="9" fill="#fff" opacity=".6"/>
<circle cx="9" cy="9" r="8.25" fill="#3b87c9"/>
<circle cx="9" cy="9" r="8.25" fill="#1267CE"/>
<path d="m9 14.356c-2 0-4.5-1.3557-4.5-4.6057v-5.2722h3v5.1972c0 0.49565 0.5 1.425 1.5 1.425 1 0 1.5-0.75896 1.5-1.35v-5.2722h3v5.1222c0 3.4-2.5 4.7557-4.5 4.7557z" fill="#fff"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 462 B

After

Width:  |  Height:  |  Size: 462 B

View File

@@ -0,0 +1 @@
<svg height="15" viewBox="0 0 15 15" width="15" xmlns="http://www.w3.org/2000/svg"><g fill="none" transform="translate(.0562 .4152)"><path d="m7.76536687 1.02582924 2.91781373 1.20859801c.4900562.20298792.8794043.59233606 1.0823922 1.08239221l1.208598 2.91781372c.2029879.49005615.2029879 1.04067751 0 1.5307337l-1.208598 2.91781362c-.2029879.4900562-.5923361.8794044-1.0823922 1.0823923l-2.91781376 1.208598c-.49005615.2029879-1.04067751.2029879-1.53073369 0l-2.91781366-1.208598c-.49005618-.2029879-.87940432-.592336-1.08239223-1.0823922l-1.20859802-2.91781373c-.2029879-.49005617-.2029879-1.04067755.00000001-1.53073373l1.208598-2.91781368c.20298791-.49005618.59233603-.8794043 1.0823922-1.0823922l2.9178137-1.20859802c.49005617-.2029879 1.04067755-.2029879 1.53073372 0z" fill="#f5eada"/><path d="m7.57402516 1.48776901 2.91781374 1.20859801c.3675421.15224093.6595532.44425202.8117941.81179415l1.208598 2.91781369c.1522409.36754213.1522409.78050817 0 1.1480503l-1.208598 2.91781374c-.1522409.3675421-.444252.6595532-.8117941.8117941l-2.91781374 1.208598c-.36754213.1522409-.78050817.1522409-1.1480503 0l-2.91781369-1.208598c-.36754213-.1522409-.65955322-.444252-.81179415-.8117941l-1.20859801-2.91781374c-.15224093-.36754213-.15224093-.78050817 0-1.1480503l1.20859801-2.91781369c.15224093-.36754213.44425202-.65955322.81179415-.81179415l2.91781369-1.20859801c.36754213-.15224093.78050817-.15224093 1.1480503 0z" fill="#a2ba4e" fill-rule="evenodd"/></g></svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -31,6 +31,7 @@ node|z15-[natural=hot_spring],
node|z12-[natural=geyser],
node|z14-[natural=beach],
area|z13-[natural=bare_rock][name],
node|z16-[natural=tree],
{text: name;text-color: @poi_label;text-position: center;text-offset: 1;font-size: 10;}
node|z11-[natural=peak][!name],
area|z13-[natural=bare_rock][!name],
@@ -148,6 +149,11 @@ node|z15-[man_made=water_well][drinking_water=not],
node|z15-[amenity=water_point][drinking_water=not],
{icon-image: drinking-water-no-m.svg;}
node|z16-[natural=tree][name],
{icon-image: tree-special-m.svg;}
node|z18-[natural=tree][!name],
{icon-image: tree-m.svg;}
/* 3.5 Ferry terminal & seamarks */

View File

@@ -2466,7 +2466,7 @@ emergency-life_ring # icon z19- (also has captio
power-substation # icon z17- (also has caption(optional) z18-, area z13-)
=== -9990
natural-tree # icon z18-
natural-tree # icon z16- (also has caption(optional) z16-)
=== -9991
# amenity-bench # caption(optional) z19- (also has icon z18-)
@@ -2505,6 +2505,7 @@ entrance-service # icon z19- (also has captio
# man_made-survey_point # caption(optional) z15- (also has icon z14-)
# man_made-telescope # caption(optional) z18- (also has icon z18-)
# man_made-telescope-optical # caption(optional) z17- (also has icon z17-)
# natural-tree # caption(optional) z16- (also has icon z16-)
# power-substation # caption(optional) z18- (also has icon z17-, area z13-)
# tourism-information # caption(optional) z15- (also has icon z15-)
# tourism-information-board # caption(optional) z15- (also has icon z15-)

View File

@@ -4,6 +4,7 @@
#include "indexer/feature_data.hpp"
#include "indexer/feature_visibility.hpp"
#include "indexer/ftypes_matcher.hpp"
#include "indexer/ftypes_subtypes.hpp"
#include "indexer/scales.hpp"
#include "platform/distance.hpp"
@@ -440,6 +441,17 @@ vector<int8_t> GetDescriptionLangPriority(RegionData const & regionData)
return PrioritizedLanguages(preferredLangs, DefaultLanguage(regionData, preferredLangs));
}
vector<string> GetLocalizedSubtypes(TypesHolder const & types)
{
auto const & classificator = classif();
auto subtypes = ftypes::Subtypes::Instance();
vector<string> localizedSubtypes;
for (auto const & type : types)
if (subtypes.IsSubtype(type))
localizedSubtypes.push_back(platform::GetLocalizedTypeName(classificator.GetReadableObjectName(type)));
return localizedSubtypes;
}
vector<string> GetCuisines(TypesHolder const & types)
{
auto const & isCuisine = ftypes::IsCuisineChecker::Instance();

View File

@@ -149,6 +149,9 @@ bool GetPreferredName(StringUtf8Multilang const & src, int8_t deviceLang, std::s
/// - default language code;
std::vector<int8_t> GetDescriptionLangPriority(RegionData const & regionData);
// Returns vector of subtypes localized by platform.
std::vector<std::string> GetLocalizedSubtypes(TypesHolder const & types);
// Returns vector of cuisines readable names from classificator.
std::vector<std::string> GetCuisines(TypesHolder const & types);

View File

@@ -279,7 +279,8 @@ void FillDetails(FeatureType & ft, std::string const & name, Result::Details & d
}
}
feature::TypesHolder const typesHolder(ft);
feature::TypesHolder typesHolder(ft);
typesHolder.SortBySpec();
std::string stars;
uint8_t starsCount = 0;
@@ -287,6 +288,8 @@ void FillDetails(FeatureType & ft, std::string const & name, Result::Details & d
if (isHotel && strings::to_uint(ft.GetMetadata(feature::Metadata::FMD_STARS), starsCount))
stars = feature::FormatStars(starsCount);
auto const subtypes = strings::JoinStrings(feature::GetLocalizedSubtypes(typesHolder), feature::kFieldsSeparator);
auto const cuisines = feature::GetLocalizedCuisines(typesHolder);
auto const cuisine = strings::JoinStrings(cuisines, feature::kFieldsSeparator);
@@ -314,6 +317,7 @@ void FillDetails(FeatureType & ft, std::string const & name, Result::Details & d
append(brand);
append(elevation);
append(cuisine);
append(subtypes);
append(fee);
details.m_description = std::move(description);