Tweaks, get subway hooks proper

Signed-off-by: zyphlar <zyphlar@gmail.com>
This commit is contained in:
zyphlar
2025-05-17 21:06:25 +00:00
committed by Konstantin Pastbin
parent ac9b70d229
commit be70c34eba
6 changed files with 15 additions and 33 deletions

1
.gitignore vendored
View File

@@ -9,6 +9,7 @@ Makefile.Release
object_script.*.Debug object_script.*.Debug
object_script.*.Release object_script.*.Release
compile_commands.json compile_commands.json
*.local.*
stxxl.errlog stxxl.errlog
stxxl.log stxxl.log

View File

@@ -21,7 +21,7 @@ MAIN_OUT_PATH: ${Developer:OMIM_PATH}/../maps_build
# 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: 16 THREADS_COUNT_FEATURES_STAGE: 12
# Do not change it. This is determined automatically. # Do not change it. This is determined automatically.
NODE_STORAGE: mem NODE_STORAGE: mem
@@ -66,7 +66,7 @@ PLANET_COASTS_URL: file:///home/planet/
# Subway file location, see docs/SUBWAY_GENERATION.md if you want to generate your own file. # Subway file location, see docs/SUBWAY_GENERATION.md if you want to generate your own file.
# Comment to disable subway layer generation. # Comment to disable subway layer generation.
SUBWAY_URL: file:///home/planet/subways/subways.transit.json SUBWAY_URL: file:///home/planet/subway/subway.transit.json
# Location of the EXPERIMENTAL GTFS-extracted public transport transit files: # Location of the EXPERIMENTAL GTFS-extracted public transport transit files:
# TRANSIT_URL: # TRANSIT_URL:

View File

@@ -1,25 +1,4 @@
# Check out this whole repo with submodules and shallow: # See run-docker.sh for cloning, building, and running the maps generator Docker routine
# cd /path/to/4tb
# git clone --recurse-submodules --shallow-submodules https://codeberg.org/comaps/comaps.git
# cd /path/to/4tb/comaps
# git checkout docker_maps_generator
#TODO: shaders_complier ? //pastk - not needed
# Get static data:
# cd /path/to/4tb/comaps/data/
# wget World.mwm //pastk - not needed
# wget WorldCoasts.mwm
#TODO: isolines, postcodes, subways, wiki
# Build with: docker build . -t maps_generator
# Edit as appropriate and run with:
# docker run \
# -e S3_KEY_ID=foo -e S3_SECRET_KEY=bar -e S3_HOST_BASE=digitaloceanspaces.com -e S3_BUCKET=comaps-map-files \
# -v /path/to/comaps:/root/OM/organicmaps -v /path/to/4tb/osm-planet:/home/planet \
# -v /path/to/4tb/osm-maps:/root/OM/maps_build -it maps_generator
FROM ubuntu:noble FROM ubuntu:noble
ARG DEBIAN_FRONTEND=noninteractive ARG DEBIAN_FRONTEND=noninteractive

View File

@@ -100,7 +100,9 @@ fi
echo "<$(date +%T)> Generating maps..." echo "<$(date +%T)> Generating maps..."
cd ~/OM/organicmaps/tools/python cd ~/OM/organicmaps/tools/python
/tmp/venv/bin/python -m maps_generator --skip="MwmDiffs" #/tmp/venv/bin/python -m maps_generator --skip="MwmDiffs"
/tmp/venv/bin/python -m maps_generator --skip="MwmDiffs" --continue
# do not use --production except for Kayak/recommendation/popularity/food data # do not use --production except for Kayak/recommendation/popularity/food data
#/tmp/venv/bin/python -m maps_generator --countries="World, WorldCoasts, US_Oregon_*, US_California_*, US_Washington_*" --production #/tmp/venv/bin/python -m maps_generator --countries="World, WorldCoasts, US_Oregon_*, US_California_*, US_Washington_*" --production
#/tmp/venv/bin/python -m maps_generator --countries="US_Oregon_Portland" --skip="MwmDiffs" #/tmp/venv/bin/python -m maps_generator --countries="US_Oregon_Portland" --skip="MwmDiffs"
@@ -119,9 +121,9 @@ if (( ${#mwmfiles[@]} )); then
#exit #exit
#EOF #EOF
s3cmd put ~/OM/maps_build/generation.log "s3://$S3_BUCKET/$(date +%y%m%d)/" #s3cmd put ~/OM/maps_build/generation.log "s3://$S3_BUCKET/$(date +%y%m%d)/"
s3cmd put ~/OM/maps_build/*/*/*.mwm "s3://$S3_BUCKET/$(date +%y%m%d)/" --recursive #s3cmd put ~/OM/maps_build/*/*/*.mwm "s3://$S3_BUCKET/$(date +%y%m%d)/" --recursive
s3cmd put ~/OM/maps_build/*/logs "s3://$S3_BUCKET/$(date +%y%m%d)/" --recursive #s3cmd put ~/OM/maps_build/*/logs "s3://$S3_BUCKET/$(date +%y%m%d)/" --recursive
else else
echo "<$(date +%T)> No MWM files, not uploading maps." echo "<$(date +%T)> No MWM files, not uploading maps."
fi fi

View File

@@ -20,9 +20,9 @@ export SKIP_PLANET_UPDATE="1"
# If unavailable then replace with a local file. # If unavailable then replace with a local file.
# TODO: keep the downloaded csv file from the latest run. # TODO: keep the downloaded csv file from the latest run.
#export CITIES_INFO_URL="" #export CITIES_INFO_URL=""
export TMPDIR="$BUILD_PATH/subways" export TMPDIR="$BUILD_PATH/subway"
# The output file, which needs post-processing by transit_graph_generator.py # The output file, which needs post-processing by transit_graph_generator.py
export MAPSME="$SUBWAYS_PATH/subways.json" export MAPSME="$SUBWAYS_PATH/subway.json"
# Produce additional files needed for https://cdn.organicmaps.app/subway/ # Produce additional files needed for https://cdn.organicmaps.app/subway/
export HTML_DIR="$SUBWAYS_VALIDATOR_PATH" export HTML_DIR="$SUBWAYS_VALIDATOR_PATH"
@@ -36,7 +36,7 @@ export DUMP_CITY_LIST="$SUBWAYS_VALIDATOR_PATH/cities.txt"
cp -r "$SUBWAYS_REPO_PATH"/render/* "$SUBWAYS_VALIDATOR_PATH/" cp -r "$SUBWAYS_REPO_PATH"/render/* "$SUBWAYS_VALIDATOR_PATH/"
TRANSIT_TOOL_PATH="$REPO_PATH/tools/python/transit" TRANSIT_TOOL_PATH="$REPO_PATH/tools/python/transit"
SUBWAYS_GRAPH_FILE="$SUBWAYS_PATH/subways.transit.json" SUBWAYS_GRAPH_FILE="$SUBWAYS_PATH/subway.transit.json"
activate_venv_at_path "$TRANSIT_TOOL_PATH" activate_venv_at_path "$TRANSIT_TOOL_PATH"
"$PYTHON" "$TRANSIT_TOOL_PATH/transit_graph_generator.py" "$MAPSME" "$SUBWAYS_GRAPH_FILE" 2>&1 | tee -a "$SUBWAYS_LOG" "$PYTHON" "$TRANSIT_TOOL_PATH/transit_graph_generator.py" "$MAPSME" "$SUBWAYS_GRAPH_FILE" 2>&1 | tee -a "$SUBWAYS_LOG"

View File

@@ -20,6 +20,6 @@ PLANET_O5M="${PLANET_O5M:-$PLANET_PATH/planet-latest.o5m}"
# Subways # Subways
SUBWAYS_REPO_PATH="${SUBWAYS_REPO_PATH:-$CODE_PATH/subways}" SUBWAYS_REPO_PATH="${SUBWAYS_REPO_PATH:-$CODE_PATH/subways}"
SUBWAYS_PATH="${SUBWAYS_PATH:-$DATA_PATH/subways}" SUBWAYS_PATH="${SUBWAYS_PATH:-$DATA_PATH/subway}"
SUBWAYS_LOG="${SUBWAYS_LOG:-$SUBWAYS_PATH/subways.log}" SUBWAYS_LOG="${SUBWAYS_LOG:-$SUBWAYS_PATH/subway.log}"
SUBWAYS_VALIDATOR_PATH="${SUBWAYS_VALIDATOR_PATH:-$SUBWAYS_PATH/validator}" SUBWAYS_VALIDATOR_PATH="${SUBWAYS_VALIDATOR_PATH:-$SUBWAYS_PATH/validator}"