Created
January 26, 2018 16:21
-
-
Save lossyrob/39dbf1df755dcb2266ba261c9f889940 to your computer and use it in GitHub Desktop.
process planet dump into ORC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Directory with all the `.dat.gz` files | |
DUMP_DIRECTORY=??? | |
# Directory to hold working data | |
WORKING_DIR=??? | |
# osm2orc binary (built from source) | |
OSM2ORC=??? | |
DATE=2018-01-25 | |
AWS_PROFILE=??? | |
S3_DIR=s3://???/??? | |
pushd $WORKING_DIR | |
planet-dump-ng --resume \ | |
--history-pbf planet-history-{$DATE}.pbf \ | |
--changesets changesets-{$DATE}.osm \ | |
--dump-file $DUMP_DIRECTORY | |
$OSM2ORC --changesets changesets-${DATE}.osm changesets-${DATE}.orc | |
aws s3 cp changesets-${DATE}.orc ${S3_DIR}/changesets-${DATE}.orc --profile ${AWS_PROFILE} | |
$OSM2ORC planet-history-${DATE}.pbf planet-history-${DATE}.orc | |
aws s3 cp planet-history-${DATE}.orc ${S3_DIR}/planet-history-${DATE}.orc --profile ${AWS_PROFILE} | |
popd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment