Skip to content

Commit 5e9b11b

Browse files
committed
Update planet-dump-ng version
1 parent 1bcf371 commit 5e9b11b

File tree

2 files changed

+46
-39
lines changed

2 files changed

+46
-39
lines changed

images/full-history/start.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ export VOLUME_DIR=/mnt/data
1313
export PLANET_EPOCH_DATE="${PLANET_EPOCH_DATE:-2004-01-01}"
1414
date=$(date '+%y%m%d_%H%M')
1515

16-
local_planetPBFFile=$VOLUME_DIR/planet-history-${date}.osm.pbf
17-
cloud_planetPBFFile=planet/planet-history-${date}.osm.pbf
16+
local_planetHistoryPBFFile=$VOLUME_DIR/planet-history-${date}.osm.pbf
17+
cloud_planetHistoryPBFFile=planet/full-history/planet-history-${date}.osm.pbf
1818
stateFile="$VOLUME_DIR/state.txt"
1919
dumpFile="$VOLUME_DIR/input-latest.dump"
2020

2121

2222
# If overwrite flag is enabled, use fixed filenames
2323
if [ "$OVERWRITE_PLANET_FILE" == "true" ]; then
24-
local_planetPBFFile=$VOLUME_DIR/planet-history-latest.osm.pbf
25-
cloud_planetPBFFile=planet/planet-history-latest.osm.pbf
24+
local_planetHistoryPBFFile=$VOLUME_DIR/planet-history-latest.osm.pbf
25+
cloud_planetHistoryPBFFile=planet/planet-history-latest.osm.pbf
2626
fi
2727

2828
# ===============================
@@ -52,13 +52,13 @@ upload_planet_file() {
5252

5353
if [ "$CLOUDPROVIDER" == "aws" ]; then
5454
AWS_URL=${AWS_S3_BUCKET/s3:\/\//http:\/\/}
55-
echo "$AWS_URL.s3.amazonaws.com/$cloud_planetPBFFile" > "$stateFile"
56-
aws s3 cp "$local_planetPBFFile" "$AWS_S3_BUCKET/$cloud_planetPBFFile" --acl public-read
55+
echo "$AWS_URL.s3.amazonaws.com/$cloud_planetHistoryPBFFile" > "$stateFile"
56+
aws s3 cp "$local_planetHistoryPBFFile" "$AWS_S3_BUCKET/$cloud_planetHistoryPBFFile" --acl public-read
5757
aws s3 cp "$stateFile" "$AWS_S3_BUCKET/planet/state.txt" --acl public-read
5858

5959
elif [ "$CLOUDPROVIDER" == "gcp" ]; then
60-
echo "https://storage.cloud.google.com/$GCP_STORAGE_BUCKET/$cloud_planetPBFFile" > "$stateFile"
61-
gsutil cp -a public-read "$local_planetPBFFile" "$GCP_STORAGE_BUCKET/$cloud_planetPBFFile"
60+
echo "https://storage.cloud.google.com/$GCP_STORAGE_BUCKET/$cloud_planetHistoryPBFFile" > "$stateFile"
61+
gsutil cp -a public-read "$local_planetHistoryPBFFile" "$GCP_STORAGE_BUCKET/$cloud_planetHistoryPBFFile"
6262
gsutil cp -a public-read "$stateFile" "$GCP_STORAGE_BUCKET/planet/state.txt"
6363
fi
6464
}
@@ -73,7 +73,7 @@ if [ "$PLANET_EXPORT_METHOD" == "planet-dump-ng" ]; then
7373
export PLANET_EPOCH_DATE="$PLANET_EPOCH_DATE"
7474
planet-dump-ng \
7575
--dump-file "$dumpFile" \
76-
--history-pbf "$local_planetPBFFile"
76+
--history-pbf "$local_planetHistoryPBFFile"
7777

7878
elif [ "$PLANET_EXPORT_METHOD" == "osmosis" ]; then
7979
echo "Generating history planet file with osmosis..."
@@ -87,7 +87,7 @@ elif [ "$PLANET_EXPORT_METHOD" == "osmosis" ]; then
8787
readFullHistory=yes \
8888
--write-xml-change \
8989
compressionMethod=auto \
90-
$local_planetPBFFile
90+
$local_planetHistoryPBFFile
9191
else
9292
echo "Error: Unknown PLANET_EXPORT_METHOD value. Use 'planet-dump-ng' or 'osmosis'."
9393
exit 1

images/osm-processor/Dockerfile

Lines changed: 36 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,11 @@
1-
FROM debian:bookworm-slim
2-
ENV workdir /mnt/data
3-
WORKDIR $workdir
4-
5-
# Installs osmosis v0.48.3, osmium-tool v1.15.0, and PostgreSQL client
6-
RUN set -ex \
7-
&& apt-get update \
8-
&& DEBIAN_FRONTEND=noninteractive apt-get install \
9-
-y --no-install-recommends \
10-
osmosis \
11-
osmium-tool \
12-
# Cloud provider CLIs
13-
awscli \
14-
gsutil \
15-
azure-cli \
16-
# PostgreSQL client
17-
postgresql-client \
18-
# Other useful packages
19-
rsync \
20-
pyosmium \
21-
tmux \
22-
zsh \
23-
git \
24-
&& rm -rf /var/lib/apt/lists/*
1+
# Stage 1: builder
2+
FROM debian:bookworm-slim AS builder
3+
WORKDIR /opt/planet-dump-ng
254

26-
# Install planet-dump-ng
275
RUN set -ex \
286
&& apt-get update \
297
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
8+
ca-certificates \
309
build-essential \
3110
automake \
3211
autoconf \
@@ -42,11 +21,39 @@ RUN set -ex \
4221
libprotobuf-dev \
4322
pkg-config \
4423
git \
45-
&& git clone -b timestamp_epoch https://github.com/OpenHistoricalMap/planet-dump-ng.git /opt/planet-dump-ng \
46-
&& cd /opt/planet-dump-ng \
24+
&& git clone -b planet_epoch_date https://github.com/OpenHistoricalMap/planet-dump-ng.git . \
4725
&& ./autogen.sh \
4826
&& ./configure \
4927
&& make \
50-
&& ln -s /opt/planet-dump-ng/planet-dump-ng /usr/local/bin/planet-dump-ng \
28+
&& strip planet-dump-ng
29+
30+
FROM debian:bookworm-slim
31+
ENV workdir /mnt/data
32+
WORKDIR $workdir
33+
34+
RUN set -ex \
35+
&& apt-get update \
36+
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
37+
osmosis \
38+
osmium-tool \
39+
awscli \
40+
gsutil \
41+
azure-cli \
42+
postgresql-client \
43+
rsync \
44+
pyosmium \
45+
tmux \
46+
zsh \
47+
git \
48+
libxml2 \
49+
libboost-filesystem1.74.0 \
50+
libboost-program-options1.74.0 \
51+
libboost-thread1.74.0 \
52+
libboost-iostreams1.74.0 \
53+
libboost-date-time1.74.0 \
54+
libprotobuf32 \
55+
libprotobuf-lite32 \
56+
libosmpbf1 \
5157
&& rm -rf /var/lib/apt/lists/*
52-
58+
59+
COPY --from=builder /opt/planet-dump-ng/planet-dump-ng /usr/local/bin/planet-dump-ng

0 commit comments

Comments
 (0)