-
Notifications
You must be signed in to change notification settings - Fork 1
/
code-snippets
31 lines (26 loc) · 1.26 KB
/
code-snippets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# download and convert in parallel does not work well. When input buffer of
# osmconvert is full, wget is stalled until osmconvert clears an processes
# its buffer. This likely results in wget timeouts.
# echo "download PBF and convert to o5m in parallel"
# wget -O - $DOWNLOAD_URL | \
# tee $OSM_SRC_FILE_PBF | \
# $OSMCONVERT_START - $DEBUG_OSMCONVERT
# -t=$OSMCONVERT_WORKDIR -o=$OSM_SRC_FILE_O5M
# OSM_WGET_TMP_FILE=$TEMP_DIR/osmcopy/wget_tmp.osm.pbf
# complete-ways cannot be used then reading from incomplete file, so file is
# downloaded first. Then the polygon is applied and in parallel the file is
# converted to o5m
#wget -O - $DOWNLOAD_URL | \
# tee >($OSMCONVERT_START - $DEBUG_OSMCONVERT
# $OSMCONVERT_CUT_OPTIONS -o=$OSM_SRC_FILE_PBF) | \
# $OSMCONVERT_START - $DEBUG_OSMCONVERT
# $OSM_CONVERT_CUT_OPTIONS -o=$OSM_SRC_FILE_O5M
#OSM_WGET_TMP_FILE=$TEMP_DIR/osmcopy/wget_tmp.osm.pbf
# processing polygon on pdf and converting in
# parallel with two osmconvert instances is not
# reliable in current version (keeps crashing).
# $OSMCONVERT_START $OSM_WGET_TMP_FILE
# $DEBUG_OSMCONVERT $OSMCONVERT_CUT_OPTIONS --out-pbf | \
# tee $OSM_SRC_FILE_PBF | \
# $OSMCONVERT_START - $DEBUG_OSMCONVERT
# -o=$OSM_SRC_FILE_O5M