Skip to content

Commit

Permalink
do same for wsd and linear features
Browse files Browse the repository at this point in the history
  • Loading branch information
smnorris committed Mar 1, 2024
1 parent 9755459 commit 0b26665
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ data/FWA_STREAM_NETWORKS_SP.gdb.zip: .make/db
# load from file to staging table to target table
for wsg in $(GROUPS) ; do \
set -e ; $(PSQL) -c "truncate fwapg.fwa_stream_networks_sp" ; \

set -e; ogr2ogr \
-f PostgreSQL \
PG:$(DATABASE_URL) \
Expand All @@ -104,8 +103,6 @@ data/FWA_STREAM_NETWORKS_SP.gdb.zip: .make/db
-update \
data/FWA_STREAM_NETWORKS_SP.gdb.zip \
$$wsg ; \

# load to target table
set -e ; $(PSQL) -f load/spatial_chunked/fwa_stream_networks_sp.sql -v wsg=$$wsg ; \
done

Expand All @@ -120,6 +117,7 @@ data/FWA_STREAM_NETWORKS_SP.gdb.zip: .make/db
bcdata bc2pg --db_url $(DATABASE_URL) --schema fwapg --schema_only -c 1 -t whse_basemapping.fwa_linear_boundaries_sp
# load from file to staging table
for wsg in $(GROUPS) ; do \
set -e ; $(PSQL) -c "truncate fwapg.fwa_linear_boundaries_sp" ; \
set -e; ogr2ogr \
-f PostgreSQL \
PG:$(DATABASE_URL) \
Expand All @@ -129,9 +127,6 @@ data/FWA_STREAM_NETWORKS_SP.gdb.zip: .make/db
-update \
data/FWA_LINEAR_BOUNDARIES_SP.gdb.zip \
$$wsg ; \
done
# load from staging to target
for wsg in $(GROUPS) ; do \
set -e ; $(PSQL) -f load/spatial_chunked/fwa_linear_boundaries_sp.sql -v wsg=$$wsg ; \
done
$(PSQL) -c "drop table fwapg.fwa_linear_boundaries_sp"
Expand All @@ -143,6 +138,7 @@ data/FWA_STREAM_NETWORKS_SP.gdb.zip: .make/db
bcdata bc2pg --db_url $(DATABASE_URL) --schema fwapg --schema_only -c 1 -t whse_basemapping.fwa_watersheds_poly
# load from file to staging table
for wsg in $(GROUPS) ; do \
set -e ; $(PSQL) -c "truncate fwapg.fwa_watersheds_poly" ; \
set -e; ogr2ogr \
-f PostgreSQL \
PG:$(DATABASE_URL) \
Expand All @@ -152,8 +148,6 @@ data/FWA_STREAM_NETWORKS_SP.gdb.zip: .make/db
-update \
data/FWA_WATERSHEDS_POLY.gdb.zip \
$$wsg ; \
done
for wsg in $(GROUPS) ; do \
set -e ; $(PSQL) -f load/spatial_chunked/fwa_watersheds_poly.sql -v wsg=$$wsg ; \
done
$(PSQL) -c "drop table fwapg.fwa_watersheds_poly"
Expand Down

0 comments on commit 0b26665

Please sign in to comment.