diff --git a/etl/get_test_polygons.py b/etl/get_test_polygons.py index 544fa33a..6247a838 100644 --- a/etl/get_test_polygons.py +++ b/etl/get_test_polygons.py @@ -46,7 +46,7 @@ gdf_to_save.rename( ) # convert to CSV -test_data_csv = str(os.path.join(test_dir, 'test_buildings.csv')) +test_data_csv = str(os.path.join(test_dir, 'test_buildings.3857.csv')) subprocess.run(["rm", test_data_csv]) subprocess.run(["ogr2ogr", "-f", "CSV", test_data_csv, test_data_geojson, "-lco", "GEOMETRY=AS_WKT"]) diff --git a/etl/load_geometries.sh b/etl/load_geometries.sh index 82265f7c..1b06d258 100755 --- a/etl/load_geometries.sh +++ b/etl/load_geometries.sh @@ -15,9 +15,9 @@ mastermap_dir=$1 # geom: # find $mastermap_dir -type f -name '*.3857.csv' \ --printf "COPY geometries ( geometry_geom, source_id ) FROM '$mastermap_dir/%f' WITH CSV HEADER;\n" | \ +-printf "$mastermap_dir/%f\n" | \ parallel \ -psql -c {} +cat {} | psql -c "COPY geometries ( geometry_geom, source_id ) FROM stdin WITH CSV HEADER;" # # Delete any duplicated geometries (by TOID)