@@ -13,16 +13,16 @@ export VOLUME_DIR=/mnt/data
13
13
export PLANET_EPOCH_DATE=" ${PLANET_EPOCH_DATE:- 2004-01-01} "
14
14
date=$( date ' +%y%m%d_%H%M' )
15
15
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
18
18
stateFile=" $VOLUME_DIR /state.txt"
19
19
dumpFile=" $VOLUME_DIR /input-latest.dump"
20
20
21
21
22
22
# If overwrite flag is enabled, use fixed filenames
23
23
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
26
26
fi
27
27
28
28
# ===============================
@@ -52,13 +52,13 @@ upload_planet_file() {
52
52
53
53
if [ " $CLOUDPROVIDER " == " aws" ]; then
54
54
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
57
57
aws s3 cp " $stateFile " " $AWS_S3_BUCKET /planet/state.txt" --acl public-read
58
58
59
59
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 "
62
62
gsutil cp -a public-read " $stateFile " " $GCP_STORAGE_BUCKET /planet/state.txt"
63
63
fi
64
64
}
@@ -73,7 +73,7 @@ if [ "$PLANET_EXPORT_METHOD" == "planet-dump-ng" ]; then
73
73
export PLANET_EPOCH_DATE=" $PLANET_EPOCH_DATE "
74
74
planet-dump-ng \
75
75
--dump-file " $dumpFile " \
76
- --history-pbf " $local_planetPBFFile "
76
+ --history-pbf " $local_planetHistoryPBFFile "
77
77
78
78
elif [ " $PLANET_EXPORT_METHOD " == " osmosis" ]; then
79
79
echo " Generating history planet file with osmosis..."
@@ -87,7 +87,7 @@ elif [ "$PLANET_EXPORT_METHOD" == "osmosis" ]; then
87
87
readFullHistory=yes \
88
88
--write-xml-change \
89
89
compressionMethod=auto \
90
- $local_planetPBFFile
90
+ $local_planetHistoryPBFFile
91
91
else
92
92
echo " Error: Unknown PLANET_EXPORT_METHOD value. Use 'planet-dump-ng' or 'osmosis'."
93
93
exit 1
0 commit comments