From 13e350543084de5d2f8efefdfd2637d1eff01406 Mon Sep 17 00:00:00 2001 From: anthonydb Date: Sat, 17 Apr 2021 18:02:29 -0400 Subject: [PATCH] Additional shp2pgsql import commands --- Chapter_15/Chapter_15.sql | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Chapter_15/Chapter_15.sql b/Chapter_15/Chapter_15.sql index b15bd80..d885133 100644 --- a/Chapter_15/Chapter_15.sql +++ b/Chapter_15/Chapter_15.sql @@ -171,7 +171,7 @@ ORDER BY miles_from_dt ASC; -- https://www.census.gov/geo/maps-data/data/cbf/cbf_counties.html --- Import +-- Import (for use on command line if on macOS or Linux; see Chapter 18) shp2pgsql -I -s 4269 -W LATIN1 tl_2019_us_county.shp us_counties_2019_shp | psql -d analysis -U postgres -- Listing 15-13: Checking the geom column's well-known text representation @@ -245,6 +245,11 @@ WHERE ST_DWithin(sh.geom::geography, -- https://www.census.gov/geo/reference/mtfcc.html -- Here, H3010: A natural flowing waterway + +-- Import (for use on command line if on macOS or Linux; see Chapter 18) +shp2pgsql -I -s 4269 -W LATIN1 tl_2019_35049_linearwater.shp santafe_linearwater_2019 | psql -d analysis -U postgres +shp2pgsql -I -s 4269 -W LATIN1 tl_2019_35049_roads.shp santafe_roads_2019 | psql -d analysis -U postgres + -- Listing 15-18: Using ST_GeometryType() to determine geometry SELECT ST_GeometryType(geom)