Monday, 1 July 2019

postgis - Installing TIGER geocoder?


I am trying to install the tiger geocoder for postGIS. I am using the 2.1 version of postGIS on Windows 7. I am using this set of instruction to do so.


I am confused by what they mean be edit the paths in the declare_sect column to those that fit your pg, unzip,shp2pgsql, psql, etc path locations.


Here's the code that I am using to do this.


INSERT INTO tiger.loader_platform(os, declare_sect, pgbin, wget, unzip_command, psql, path_sep, loader, environ_set_command, county_process_command) SELECT 'ravimehta', declare_sect, pgbin, wget, unzip_command, psql, path_sep, loader, environ_set_command, county_process_command FROM tiger.loader_platform WHERE os = 'windows';



@RyanDalton - I tried to do what you suggested. However, I got the following error.



ERROR: unrecognized configuration parameter "unziptool." I'm not sure what I am doing wrong.



Fixed problem by using:


UPDATE tiger.loader_platform SET unzip_command = 'C:\Program Files\7-Zip\7z.exe' WHERE os = 'ravim';

Answer



The "paths" they are referring to are the program executables (*.exe) for your system, as mentioned in step 4. For example, if you are using 7-zip for unzipping data, you would replace:


with "C:\Program Files (x86)\7-Zip\7z.exe" in the SELECT portion of the SQL statement.


You could make this easier by creating SQL variables representing each item by using the SET command, similar to what is shown on page 2 of PostGIS 2.0 Tiger Geocoder Cheatsheet under the heading of "Loader_Generate_Script":



SET unzip_command="C:\Program Files\7-Zip\7z.exe"

No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...