[styles] drules_proto.bin is now a merged style; legacy style in in _legacy.bin

This commit is contained in:
Ilya Zverev 2016-01-14 16:17:12 +03:00
parent 90639254c7
commit ef297ac7de
5 changed files with 31690 additions and 11540 deletions

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

View file

@ -1,11 +1,11 @@
#!/bin/bash
set -e -u -x
set -e -u
# Prevent python from generating compiled *.pyc files
export PYTHONDONTWRITEBYTECODE=1
OMIM_PATH="${OMIM_PATH:-$(dirname "$0")/../..}"
DATA_PATH="$OMIM_PATH/data"
DATA_PATH="${DATA_PATH:-$OMIM_PATH/data}"
function BuildDrawingRules() {
styleType=$1
@ -13,10 +13,9 @@ function BuildDrawingRules() {
suffix=${3-}
echo "Building drawing rules for style $styleName"
# Cleanup
rm $DATA_PATH/drules_proto$suffix.bin || true
rm $DATA_PATH/drules_proto$suffix.txt || true
rm "$DATA_PATH"/drules_proto$suffix.{bin,txt} || true
# Run script to build style
python "$OMIM_PATH/tools/kothic/src/libkomwm.py" \
python "$OMIM_PATH/tools/kothic/src/libkomwm.py" --txt \
-s "$DATA_PATH/styles/$styleType/style-$styleName/style.mapcss" \
-o "$DATA_PATH/drules_proto$suffix"
}
@ -31,4 +30,9 @@ done
# Building drawing rules
BuildDrawingRules clear clear _clear
BuildDrawingRules clear night _dark
BuildDrawingRules legacy light
BuildDrawingRules legacy light _legacy
echo "Merging legacy and new styles"
python "$OMIM_PATH/tools/python/stylesheet/drules_merge.py" \
"$DATA_PATH/drules_proto_legacy.bin" "$DATA_PATH/drules_proto_clear.bin" \
"$DATA_PATH/drules_proto.bin" "$DATA_PATH/drules_proto.txt" > /dev/null