Changes

Jump to navigation Jump to search
2,038 bytes removed ,  13:39, 8 October 2019
$ sudo apt-get install --no-install-recommends postgis</nowiki>
Note the last line. Without the <code>--no-install-recommends</code> line postgres assumes you're using the default configuration (in this case, postgis for postgresql 9.6). Since we're using a different flavor of postgispostgresql, we do not want this.
The <code>postgis</code> apt package is not the extension to postgres. It is a collection of command line utilities for importing and exporting data to a postgis db.
[https://postgis.net/docs/postgis_installation.html#install_tiger_geocoder_extension This link] outlines the process to enable our Postgres Database to support Tiger functionality.
I began by adding the extension listed above. First, enter into Postgres by using the psql command. Then: --Add Extensions to database CREATE EXTENSION postgis; CREATE EXTENSION fuzzystrmatch; CREATE EXTENSION postgis_tiger_geocoder; CREATE EXTENSION address_standardizer; You can test that the installation worked by running the following query: SELECT na.address, na.streetname,na.streettypeabbrev, na.zip FROM normalize_address('1 Devonshire Place, Boston, MA 02109') AS na; This should return the following: address | streetname | streettypeabbrev | zip ---------+------------+------------------+------- 1 | Devonshire | Pl | 02109 Next, a new profile needs documentation has been moved to be created by using the following command. INSERT INTO tiger.loader_platform(os, declare_sect, pgbin, wget, unzip_command, psql, path_sep, loader, environ_set_command, county_process_command) SELECT 'newuser', declare_sect, pgbin, wget, unzip_command, psql, path_sep, loader, environ_set_command, county_process_command FROM tiger.loader_platform WHERE os = 'sh'; The paths in declare_sect need to be edited so they match our server locations.The declare_sect looks like the following: export PGHOST=localhost + export PGUSER=postgres + export PGPASSWORD=yourpasswordhere + export PGDATABASE=geocoder + PSQL=${PGBIN}/psql + SHP2PGSQL=shp2pgsql + cd ${staging_fold} + TMPDIR="${staging_fold}/temp/" + UNZIPTOOL=unzip + WGETTOOL="/usr/bin/wget" + export PGBIN=/usr/lib/postgresql/9[[Tiger Geocoder]] wiki page.6/bin + export PGPORT=5432 + export PGHOST=localhost + export PGUSER=postgres + export PGPASSWORD=yourpasswordhere + export PGDATABASE=geocoder + PSQL=${PGBIN}/psql + SHP2PGSQL=shp2pgsql + cd ${staging_fold}

Navigation menu