Interactive interface for browsing global, full-resolution satellite imagery
move file/dir paths to buildOptions
Jason Kent2fd8d2edf69b
diff --git a/tasks/buildOptions.sh b/tasks/buildOptions.shindex 72e8e5a43..343f3500a 100755--- a/tasks/buildOptions.sh+++ b/tasks/buildOptions.sh@@ -3,12 +3,11 @@PROG=$(basename "$0")BASE=$(dirname "$0")/..-TASKS_DIR="$BASE/tasks"SRC_DIR="$BASE/config/default"OPT_DIR="$BASE/config/default"BUILD_DIR="$BASE/build/options-build"DEST_DIR="$BASE/build/options"-PYTHON_SCRIPTS_DIR="$TASKS_DIR/python3"+PYTHON_SCRIPTS_DIR="$BASE/tasks/python3"# If there is an active directory, use instead of defaults@@ -132,9 +131,9 @@ if [ ! -e "$BUILD_DIR/config/wv.json/categoryGroupOrder.json" ] ; then"$SRC_DIR/common/config/wv.json/"fi-# Run getVisMetadata.py to fetch visualization (layer) metadata-"$PYTHON_SCRIPTS_DIR/getVisMetadata.py" "$BUILD_DIR/config/wv.json/layerOrder.json" \- "$BUILD_DIR/config/wv.json/visMetadata.json"+# Get visualization metadata (if configured)+"$PYTHON_SCRIPTS_DIR/getVisMetadata.py" "$BUILD_DIR/features.json" \+ "$BUILD_DIR/config/wv.json/layerOrder.json" "$BUILD_DIR/config/wv.json/layer-metadata.json"# Run mergeConfig.py on all directories in /configconfigs=$(ls "$BUILD_DIR/config")diff --git a/tasks/python3/getVisMetadata.py b/tasks/python3/getVisMetadata.pyindex c555657bc..b777ac31e 100755--- a/tasks/python3/getVisMetadata.py+++ b/tasks/python3/getVisMetadata.py@@ -6,27 +6,22 @@ import osimport jsonimport urllib3import certifi++prog = os.path.basename(__file__)+parser = OptionParser(usage="Usage: %s <config> <output_dir>" % prog)+(options, args) = parser.parse_args()+http = urllib3.PoolManager(cert_reqs='CERT_REQUIRED',ca_certs=certifi.where())prog = os.path.basename(__file__)-root_dir = 'config/default/common/'--# Use config/active dir if present-if os.path.isdir('config/active'):- root_dir = 'config/active/common/'--CONFIG_ENV = os.environ.get('CONFIG_ENV')--# If a config enviroment was passed, use the coresponding dir-if CONFIG_ENV is not None:- root_dir = 'config/active/' + CONFIG_ENV + '/'-features_file = root_dir + 'features.json'-input_file = root_dir + 'config/wv.json/layerOrder.json'-output_file = 'build/options-build/config/wv.json/visMetadata.json'+features_file = args[0]+input_file = args[1]+output_file = args[2]+# NOTE: Only using these properties at this timeuse_keys = ['conceptIds']layer_metadata = {}