[postgis-devel] [PostGIS] #1643: revise loader to handle 2011 tiger data

PostGIS trac at osgeo.org
Sun Apr 29 08:43:27 PDT 2012

#1643: revise loader to handle 2011 tiger data
 Reporter:  robe            |       Owner:  robe         
     Type:  enhancement     |      Status:  new          
 Priority:  medium          |   Milestone:  PostGIS 2.1.0
Component:  tiger geocoder  |     Version:  trunk        
 Keywords:                  |  

Comment(by robe):

 Okay I have this pretty much working.  Just fine tuning the upgrade
 As it stands right now, its compatible with tiger2010 structure.  I
 haven't changed any of the structures yet so you can have a mix of 2010
 and 2011 data and things will work fine.  I did add logic in the loader to
 load up the new addrfeat (which I'm in the middle of testing).  I haven't
 done anything with this and actually not convinced it will help much since
 the way it is structured I predict it will make less efficient use of
 indexes (although it will save a join). Only testing will see.

 Anyrate -- since I had to add in some helper functions (e.g. one that is a
 bit more respective of user search path during install) and addition of a
 nation load function (since the county and state are in 2011 just packaged
 as whole nation instead of individual state), I don't feel compfortable
 releasing this as a micro update. Will probably get shot down by folks
 since I can't introduce new functions in a micro.  If you want to give it
 a try -- I have it in spike


 The only caveat -- which I was going to create a helper function do do is:

 You need to drop all the state county and state tables -- e.g. ma_county,

 And then right after, generate download script to download nation data:


  SELECT tiger.loader_generate_nation_script('windows');

 or if on unix:


  SELECT tiger.loader_generate_nation_script('sh');

 I've been testing only on windows.  Won't be able to test on Linux for
 another week or so.  However most of the changes I made were to the psql
 and wget calls which are the same regardless of if you are on windows or
 unix so I don't forsee any issues with the sh version working out of the
 box and if there are, they are probably minor.

 The new routine is also less greedy about downloads.  It won't download
 files we don't load up and also will delete each set of table files after
 use (instead of extracting a whole states worth in temp) so should
 minimize the issue people had with too many files generated on Mac.

Ticket URL: <http://trac.osgeo.org/postgis/ticket/1643#comment:3>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.

More information about the postgis-devel mailing list