revert changes to env vars

This commit is contained in:
Ed Chalstrey 2022-03-28 15:06:23 +01:00
parent 7bffa44502
commit c85b321a60

View File

@ -17,12 +17,12 @@ mastermap_dir=$1
find $mastermap_dir -type f -name '*.3857.csv' \ find $mastermap_dir -type f -name '*.3857.csv' \
-printf "$mastermap_dir/%f\n" | \ -printf "$mastermap_dir/%f\n" | \
parallel \ parallel \
cat {} '|' PGHOST=$PGHOST PGDATABASE=$PGDATABASE PGUSER=$PGUSER PGPASSWORD=$PGPASSWORD psql -c "\"COPY geometries ( geometry_geom, source_id ) FROM stdin WITH CSV HEADER;\"" cat {} '|' psql -c "\"COPY geometries ( geometry_geom, source_id ) FROM stdin WITH CSV HEADER;\""
# #
# Delete any duplicated geometries (by TOID) # Delete any duplicated geometries (by TOID)
# #
PGHOST=$PGHOST PGDATABASE=$PGDATABASE PGUSER=$PGUSER PGPASSWORD=$PGPASSWORD psql -c "DELETE FROM geometries a USING ( psql -c "DELETE FROM geometries a USING (
SELECT MIN(ctid) as ctid, source_id SELECT MIN(ctid) as ctid, source_id
FROM geometries FROM geometries
GROUP BY source_id GROUP BY source_id