Update shapefile loading commands

This commit is contained in:
Anthony DeBarros 2021-10-02 11:25:10 -04:00
parent e2e96963f5
commit c6559cac05

View File

@ -66,7 +66,7 @@ DELETE FROM state_regions;
DELETE FROM state_regions; DELETE FROM state_regions;
psql -d analysis -U postgres -c "COPY state_regions FROM STDIN WITH (FORMAT CSV, HEADER);" < state_regions.csv psql -d analysis -U postgres -c "COPY state_regions FROM STDIN WITH (FORMAT CSV, HEADER);" < C:\YourDirectory\state_regions.csv
-- Listing 18-9: Saving query output to a file -- Listing 18-9: Saving query output to a file
@ -95,9 +95,10 @@ createdb -U postgres -e box_office
-- Loading shapefiles into PostgreSQL -- Loading shapefiles into PostgreSQL
-- For the US Census county shapefile in Chapter 14: -- For the US Census counties shapefile in Chapter 15:
shp2pgsql -I -s 4269 -W Latin1 tl_2019_us_county.shp us_counties_2019_shp | psql -d analysis -U postgres shp2pgsql -I -s 4269 -W Latin1 tl_2019_us_county.shp us_counties_2019_shp | psql -d analysis -U postgres
-- For the Santa Fe roads and waterways shapfiles in Chapter 14: -- For the Santa Fe roads and waterways shapfiles in Chapter 15:
shp2pgsql -I -s 4269 tl_2016_35049_roads.shp santafe_roads_2016 | psql -d analysis -U postgres shp2pgsql -I -s 4269 tl_2019_35049_roads.shp santafe_roads_2019 | psql -d analysis -U postgres
shp2pgsql -I -s 4269 tl_2016_35049_linearwater.shp santafe_linearwater_2016 | psql -d analysis -U postgres shp2pgsql -I -s 4269 tl_2019_35049_linearwater.shp santafe_linearwater_2019 | psql -d analysis -U postgres