From: Regina Obe Date: Sun, 16 Aug 2015 01:48:43 +0000 (+0000) Subject: #3227 incorporate Brian's suggested changes and fix some other minor issues with... X-Git-Tag: 2.2.0rc1~165 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7db1374415789f7e4802476832ce6b7e2ff5edfa;p=postgis #3227 incorporate Brian's suggested changes and fix some other minor issues with instructions. git-svn-id: http://svn.osgeo.org/postgis/trunk@13907 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/doc/installation.xml b/doc/installation.xml index 319baa4f7..948dcd784 100644 --- a/doc/installation.xml +++ b/doc/installation.xml @@ -18,9 +18,16 @@ make install The raster support is currently optional, but installed by default. For enabling using the PostgreSQL 9.1+ extensions model raster is required. Using the extension enable process is preferred and more user-friendly. To spatially enable your database: psql -d yourdatabase -c "CREATE EXTENSION postgis;" psql -d yourdatabase -c "CREATE EXTENSION postgis_topology;" -psql -d yourdatabase -c "CREATE EXTENSION postgis_tiger_geocoder;" -- if you built with sfcgal support -- psql -d yourdatabase -c "CREATE EXTENSION postgis_sfcgal;" + +-- if you want to install tiger geocoder -- +psql -d yourdatabase -c "CREATE EXTENSION fuzzystrmatch" +psql -d yourdatabase -c "CREATE EXTENSION postgis_tiger_geocoder;" + +-- if you installed with pcre +-- you should have address standardizer extension as well +psql -d yourdatabase -c "CREATE EXTENSION address_standardizer;" @@ -1264,13 +1271,13 @@ but you can download the latest at: http://www. Installing, Upgrading Tiger Geocoder and loading data - Extras like Tiger geocoder may not be packaged in your PostGIS distribution, but will always be available in the postgis-&last_release_version;.tar.gz file. The instructions provided here are also available in the extras/tiger_geocoder/tiger_2011/README + Extras like Tiger geocoder may not be packaged in your PostGIS distribution, but will always be available in the postgis-&last_release_version;.tar.gz file. The instructions provided here are also available in the extras/tiger_geocoder/README If you are on Windows and you don't have tar installed, you can use http://www.7-zip.org/ to unzip the PostGIS tarball. Tiger Geocoder Enabling your PostGIS database: Using Extension - If you are using PostgreSQL 9.1+ and PostGIS 2.1.0, you can take advantage of the new extension model for installing tiger geocoder. To do so: + If you are using PostgreSQL 9.1+ and PostGIS 2.1+, you can take advantage of the new extension model for installing tiger geocoder. To do so: - First get binaries for PostGIS 2.1.0 or compile and install as usual. This should install the necessary extension files as well for tiger geocoder. + First get binaries for PostGIS 2.1+ or compile and install as usual. This should install the necessary extension files as well for tiger geocoder. Connect to your database via psql or pgAdmin or some other tool and run the following SQL commands. Note that if you are installing in a database that already has postgis, you don't need to do the first step. If you have fuzzystrmatch extension already installed, you don't need to do the second step either. CREATE EXTENSION postgis; CREATE EXTENSION fuzzystrmatch; @@ -1325,10 +1332,10 @@ SELECT 'debbie', declare_sect, pgbin, wget, unzip_command, psql, path_sep, - cd postgis-&last_release_version;/extras/tiger_geocoder/tiger_2011 + cd postgis-&last_release_version;/extras/tiger_geocoder - Edit the tiger_loader_2012.sql to the paths of your executables server etc or alternatively you can update the loader_platform table once installed. If you don't edit this file or the loader_platform table, it will just contain common case locations of items and you'll have to edit the generated script after the fact when you run the and SQL functions. + Edit the tiger_loader_2015.sql (or latest loader file you find, unless you want to load different year) to the paths of your executables server etc or alternatively you can update the loader_platform table once installed. If you don't edit this file or the loader_platform table, it will just contain common case locations of items and you'll have to edit the generated script after the fact when you run the and SQL functions. If you are installing Tiger geocoder for the first time edit either the create_geocode.bat script If you are on windows or the create_geocode.sh if you are on Linux/Unix/Mac OSX with your PostgreSQL specific settings and run the corresponding script from the commandline. diff --git a/extras/tiger_geocoder/README b/extras/tiger_geocoder/README index bdf544f93..7a88be66e 100644 --- a/extras/tiger_geocoder/README +++ b/extras/tiger_geocoder/README @@ -39,6 +39,7 @@ Steps using extensions: CREATE EXTENSION postgis; 2) Next: +CREATE EXTENSION fuzzystrmatch; CREATE EXTENSION postgis_tiger_geocoder; Loading up data: @@ -62,7 +63,7 @@ WHITESPACE AND POSSIBLY NON-SCRIPT CHARACTERS THAT CAUSE IT TO BREAK.) -- UNIX /LINUX USERS -- -- Note even if you want just specific states you need to --- do this step since 2011 county, state tables are available only at national level +-- do this step since 2015 county, state tables are available only at national level SELECT loader_generate_nation_script('sh'); -- After the nation load, generate a bash script suitable for Unix command lines diff --git a/extras/tiger_geocoder/create_geocode.sh b/extras/tiger_geocoder/create_geocode.sh index 3692aaeea..732501aad 100755 --- a/extras/tiger_geocoder/create_geocode.sh +++ b/extras/tiger_geocoder/create_geocode.sh @@ -4,8 +4,8 @@ PGHOST=localhost PGUSER=postgres PGPASSWORD=yourpasswordhere THEDB=geocoder -PSQL_CMD=/usr/bin/psql -PGCONTRIB=/usr/share/postgresql/contrib +PSQL_CMD= /usr/lib/postgresql/9.4/bin/psql +PGCONTRIB=/usr/share/postgresql/9.4/contrib #if you are on 9.1+ use the CREATE EXTENSION syntax instead ${PSQL_CMD} -d "${THEDB}" -f "${PGCONTRIB}/fuzzystrmatch.sql" #${PSQL_CMD} -d "${THEDB}" -c "CREATE EXTENSION fuzzystrmatch" @@ -15,4 +15,4 @@ ${PSQL_CMD} -d "${THEDB}" -c "CREATE SCHEMA tiger" #${PSQL_CMD} -d "${THEDB}" -f "tables/lookup_tables_2010.sql" ${PSQL_CMD} -d "${THEDB}" -c "CREATE SCHEMA tiger_data" ${PSQL_CMD} -d "${THEDB}" -f "create_geocode.sql" -${PSQL_CMD} -d "${THEDB}" -f "tiger_loader_2015.sql" \ No newline at end of file +${PSQL_CMD} -d "${THEDB}" -f "tiger_loader_2015.sql" diff --git a/extras/tiger_geocoder/tiger_loader_2015.sql b/extras/tiger_geocoder/tiger_loader_2015.sql index bf3d09466..46387d3ca 100644 --- a/extras/tiger_geocoder/tiger_loader_2015.sql +++ b/extras/tiger_geocoder/tiger_loader_2015.sql @@ -167,7 +167,7 @@ VALUES('windows', '%WGETTOOL%', '%PGBIN%', E'set TMPDIR=${staging_fold}\\temp\\ set UNZIPTOOL="C:\\Program Files\\7-Zip\\7z.exe" set WGETTOOL="C:\\wget\\wget.exe" -set PGBIN=C:\\Program Files\\PostgreSQL\\9.2\\bin\\ +set PGBIN=C:\\Program Files\\PostgreSQL\\9.4\\bin\\ set PGPORT=5432 set PGHOST=localhost set PGUSER=postgres @@ -191,7 +191,7 @@ VALUES('sh', 'wget', '', E'TMPDIR="${staging_fold}/temp/" UNZIPTOOL=unzip WGETTOOL="/usr/bin/wget" -export PGBIN=/usr/pgsql-9.0/bin +export PGBIN=/usr/lib/postgresql/9.4/bin/ export PGPORT=5432 export PGHOST=localhost export PGUSER=postgres diff --git a/extras/tiger_geocoder/upgrade_geocoder.sh b/extras/tiger_geocoder/upgrade_geocoder.sh index c3bc9aafa..55c4a8428 100755 --- a/extras/tiger_geocoder/upgrade_geocoder.sh +++ b/extras/tiger_geocoder/upgrade_geocoder.sh @@ -10,4 +10,4 @@ ${PSQL_CMD} -d "${THEDB}" -f "upgrade_geocode.sql" #unremark the loader line to update your loader scripts #note this wipes out your custom settings in loader_* tables -#${PSQL_CMD} -d "${THEDB}" -f "tiger_loader_2013.sql" \ No newline at end of file +#${PSQL_CMD} -d "${THEDB}" -f "tiger_loader_2013.sql"