This commit is contained in:
Zsolt Ero
2023-12-21 02:06:48 +01:00
parent 06e0084095
commit 2d9e5f2f4f
12 changed files with 45 additions and 84 deletions

View File

@@ -1,22 +1,26 @@
#!/usr/bin/env bash
# the Xmx value below the most important parameter here
# setting is less then 25g means there is too little memory
# setting it to too much means there is too much memory used
DATE=$(date +"%Y%m%d_%H%M%S")
TILE_GEN_BIN=/data/ofm/tile_gen/bin
RUN_FOLDER="/data/ofm/tile_gen/runs/planet/${DATE}_pt"
mkdir -p "$RUN_FOLDER"
cd "$RUN_FOLDER" || exit
# the Xmx value below the most important parameter here
# 30 GB works well
java -Xmx30g \
-jar /data/ofm/tile_gen/planetiler.jar \
-jar $TILE_GEN_BIN/planetiler.jar \
`# Download the latest planet.osm.pbf from s3://osm-pds bucket` \
--area=planet --bounds=planet --download \
`# Accelerate the download by fetching the 10 1GB chunks at a time in parallel` \
--download-threads=10 --download-chunk-size-mb=1000 \
`# Also download name translations from wikidata` \
--fetch-wikidata \
--output=output.mbtiles \
--output=tiles.mbtiles \
`# Store temporary node locations at fixed positions in a memory-mapped file` \
--nodemap-type=array --storage=mmap \
--force \
> "planetiler_out.log" 2> "planetiler_err.log"