[postgis-tickets] [PostGIS] #3698: CENSUS Download path for TABBLOCK

PostGIS trac at osgeo.org
Tue Aug 15 23:16:47 PDT 2017


#3698: CENSUS Download path for TABBLOCK
-----------------------------+---------------------------
  Reporter:  EvanCarroll     |      Owner:  robe
      Type:  defect          |     Status:  new
  Priority:  high            |  Milestone:  PostGIS 2.3.4
 Component:  tiger geocoder  |    Version:  2.3.x
Resolution:                  |   Keywords:
-----------------------------+---------------------------

Comment (by jeffreywescott):

 I spent a bit more time looking into this and got it to work with the
 following changes in the {{{loader_lookuptables}}}:

 {{{
 UPDATE loader_lookuptables
 SET    load = true
 ,      post_load_process = '${psql} -c "ALTER TABLE
 ${staging_schema}.${state_abbrev}_${lookup_name} RENAME geoid10 TO
 tabblock_id;  SELECT
 loader_load_staged_data(lower(''${state_abbrev}_${table_name}''),
 lower(''${state_abbrev}_${lookup_name}'')); "
 ${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ADD
 CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');"
 ${psql} -c "CREATE INDEX
 ${data_schema}_${state_abbrev}_${lookup_name}_the_geom_gist ON
 ${data_schema}.${state_abbrev}_${lookup_name} USING gist(the_geom);"
 ${psql} -c "vacuum analyze
 ${data_schema}.${state_abbrev}_${lookup_name};"'
 ,      columns_exclude = '{gid, uatyp10, uatype, suffix1ce}'
 WHERE  lookup_name = 'tabblock'
 ;
 }}}

 I had to change the {{{columns_exclude}}} as well as add the
 {{{loader_load_staged_data}}} statement in the {{{post_load_process}}}.

 Also, it was still necessary to work with the {{{10}}} suffix on the
 TABBLOCK filenames:

 {{{
 sed -i "s/_tabblock\./_tabblock10./g" load-states.sh
 }}}

--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3698#comment:14>
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-tickets mailing list