Interactive interface for browsing global, full-resolution satellite imagery
Merge vector data files and add as vectorData to config on build
ZachTRice1c825f927929
diff --git a/tasks/buildOptions.sh b/tasks/buildOptions.shindex 3b5f70edd..d32e7155d 100755--- a/tasks/buildOptions.sh+++ b/tasks/buildOptions.sh@@ -82,13 +82,13 @@ fi# Run processVectorData.py and move vectordata where we want themif [ -e "$BUILD_DIR/vectordata" ] ; then- mkdir -p "$BUILD_DIR"/config/vectordata+ mkdir -p "$BUILD_DIR"/config/wv.json/vectordataif [ -d "$BUILD_DIR"/gc/vectordata ] ; thencp -r "$BUILD_DIR"/gc/vectordata "$BUILD_DIR"fi"$TASKS_DIR/processVectorData.py" "$OPT_DIR/$OPT_SUBDIR/config.json" \"$BUILD_DIR/vectordata" \- "$BUILD_DIR/config/vectordata"+ "$BUILD_DIR/config/wv.json/vectordata"fi# Run processColormap.py and move colormaps where we want themdiff --git a/tasks/extractConfigFromWMTS.py b/tasks/extractConfigFromWMTS.pyindex 49856fcde..6e230d37c 100755--- a/tasks/extractConfigFromWMTS.py+++ b/tasks/extractConfigFromWMTS.py@@ -52,7 +52,7 @@ total_warning_count = 0total_error_count = 0json_options = {}-json_options["indent"] = 4+json_options["indent"] = 2json_options["separators"] = (',', ': ')class SkipException(Exception):diff --git a/tasks/mergeConfig.py b/tasks/mergeConfig.pyindex 90f90b373..88d493d1a 100755--- a/tasks/mergeConfig.py+++ b/tasks/mergeConfig.py@@ -64,7 +64,7 @@ for root, dirs, files in os.walk(input_dir):sys.exit(1)json_options = {}-json_options["indent"] = 4+json_options["indent"] = 2json_options["separators"] = (',', ': ')with open(output_file, "w") as fp:diff --git a/tasks/processColormap.py b/tasks/processColormap.pyindex a2fd4b8b7..e1a65f3b2 100755--- a/tasks/processColormap.py+++ b/tasks/processColormap.py@@ -220,7 +220,7 @@ def process_file(file):"maps": maps}json_options = {}- json_options["indent"] = 4+ json_options["indent"] = 2json_options["separators"] = (',', ': ')output_file = os.path.join(output_dir, id + ".json")diff --git a/tasks/processVectorData.py b/tasks/processVectorData.pyindex 69057d81d..6a5b17458 100644--- a/tasks/processVectorData.py+++ b/tasks/processVectorData.py@@ -31,6 +31,18 @@ with open(config_file) as fp:def copy_file(file):input_file = os.path.join(root, file)if input_file.endswith('.json'):+ response_json = {}+ vectordata = []+ with open(input_file) as json_file:+ initial_data = json.load(json_file)+ for i in initial_data:+ vectordata.append({i: initial_data[i]})+ vector_layer_filename = file;+ vector_layer_id = vector_layer_filename.split(".", 1)[0]+ response_json["vectorData"] = {}+ response_json["vectorData"][vector_layer_id] = vectordata+ with open(input_file, 'w') as json_file:+ json.dump(response_json, json_file,indent=2)shutil.copy(input_file, output_dir)# Maindiff --git a/tasks/validateOptions.py b/tasks/validateOptions.pyindex 9297350a6..cbf89be06 100755--- a/tasks/validateOptions.py+++ b/tasks/validateOptions.py@@ -197,7 +197,7 @@ print "%s: %d error(s), %d warning(s), %d removed" % (prog, error_count,warning_count, remove_count)json_options = {}-json_options["indent"] = 4+json_options["indent"] = 2json_options["separators"] = (',', ': ')with open(main_config_file, "w") as fp: