From a3d2537e22961dd967f554e278c95cc72d38e2e4 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Fri, 1 Apr 2022 10:05:11 +0100 Subject: [PATCH] Revert "create script to load new geometries" This reverts commit d6ca8852d4cd22ddee7bdb8e53b65759f2aeca9b. --- etl/load_new_geometries.sh | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 etl/load_new_geometries.sh diff --git a/etl/load_new_geometries.sh b/etl/load_new_geometries.sh deleted file mode 100644 index 0d4bfc0d..00000000 --- a/etl/load_new_geometries.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash - -# Load new geometries from GeoJSON to Postgres -# - assume postgres connection details are set in the environment using PGUSER, PGHOST etc. - -: ${1?"Usage: $0 ./path/to/mastermap/dir"} - -mastermap_dir=$1 - -# Create 'geometry' record with -# id: , -# source_id: , -# geom: - -echo "Copy new geometries to db..." -find $mastermap_dir -type f -name '*.3857.csv' \ --printf "$mastermap_dir/%f\n" | \ -parallel \ -cat {} '|' psql -c "\"COPY geometries ( geometry_geom, source_id ) FROM stdin WITH CSV HEADER -WHERE source_id NOT IN geometries;\""