[postgis-users] Postgis 2.2.0 With TIGER data

Paragon Corporation lr at pcorp.us
Wed Nov 20 12:27:36 PST 2013


Greg,
Did you run the nation script routine?
http://postgis.net/docs/manual-dev/Loader_Generate_Nation_Script.html
 
That's the first step needed.  Should actually be done before you load the
other tables.
 
Hope that helps,
Regina
http://www.postgis.us
http://postgis.net
 

  _____  

From: postgis-users-bounces at lists.osgeo.org
[mailto:postgis-users-bounces at lists.osgeo.org] On Behalf Of Greg Nawrocki
Sent: Wednesday, November 20, 2013 12:10 PM
To: postgis-users at lists.osgeo.org
Subject: [postgis-users] Postgis 2.2.0 With TIGER data



Sorry about the noob question, but I am stuck. I am trying to get to a point
where I can geocode (get latitude and longitude) from an address.

I build and install Postgres 9.3 and Postgis 2.2.0

I create a database named "geocode" and create the proper extensions,
grants, search paths:

/usr/local/pgsql/bin/psql -d geocode -c "CREATE EXTENSION postgis"
/usr/local/pgsql/bin/psql -d geocode -c "CREATE EXTENSION postgis_topology"
/usr/local/pgsql/bin/psql -d geocode -c "CREATE EXTENSION fuzzystrmatch;"
/usr/local/pgsql/bin/psql -d geocode -c "CREATE EXTENSION
postgis_tiger_geocoder;"
/usr/local/pgsql/bin/psql -d geocode -c "CREATE EXTENSION
address_standardizer;"
/usr/local/pgsql/bin/psql geocode -f
/usr/local/pgsql/share/contrib/postgis-2.2/legacy.sql

/usr/local/pgsql/bin/psql -d geocode -c "GRANT ALL ON geometry_columns TO
PUBLIC;"
/usr/local/pgsql/bin/psql -d geocode -c "GRANT ALL ON geography_columns TO
PUBLIC;"
/usr/local/pgsql/bin/psql -d geocode -c "GRANT ALL ON spatial_ref_sys TO
PUBLIC;"

/usr/local/pgsql/bin/psql -d geocode -c "ALTER DATABASE geocode SET
search_path=public, tiger;"

Here's some information on the resulting environment:

============================================================================
=============
"SELECT version();"
                                                   version

----------------------------------------------------------------------------
----------------------------------
 PostgreSQL 9.3.0 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.7.2
20120921 (Red Hat 4.7.2-2), 64-bit
(1 row)

"SELECT postgis_full_version();"
 
postgis_full_version

----------------------------------------------------------------------------
----------------------------------------------------------------------------
-
 POSTGIS="2.2.0dev r12128" GEOS="3.3.8-CAPI-1.7.8" PROJ="Rel. 4.8.0, 6 March
2012" GDAL="GDAL 1.9.1, released 2012/05/15" LIBXML="2.7.8" TOPOLOGY RASTER
(1 row)

"SELECT name, default_version,installed_version FROM pg_available_extensions
WHERE name LIKE 'postgis%';"
          name          | default_version | installed_version 
------------------------+-----------------+-------------------
 postgis_tiger_geocoder | 2.2.0dev        | 2.2.0dev
 postgis                | 2.2.0dev        | 2.2.0dev
 postgis_topology       | 2.2.0dev        | 2.2.0dev
(3 rows)
============================================================================
==============

The pprint_addy() and normalize_address() functions work as expected in the
examples I've seen.

I generate, modify and run a tiger load script to retrieve TIGER data for my
state:
/usr/local/pgsql/bin/psql -d geocode -c "SELECT
loader_generate_script(ARRAY['IL'], 'sh');" -A -o ILdata.sh

Everything appears to load normally. The only anomaly I see is the following
message when installing the various featnames.dbf files:
XXXXXXX_featnames.dbf: shape (.shp) or index files (.shx) can not be opened,
will just import attribute data.
However, from what I can see those files contain no shape information so I
do not think this is an error.

I run the install_missing_indexes() function which appears to work.

However, when I attempt to geocode I get an immediate empty return.

/usr/local/pgsql/bin/psql -d geocode -c "SELECT g.rating, ST_X(g.geomout) As
lon, ST_Y(g.geomout) As lat FROM geocode('810 W Main St, West Dundee, IL
60118') As g;"
 rating | lon | lat 
--------+-----+-----
(0 rows)

At this point, I'm lost. Any help greatly appreciated.

-- Greg









-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20131120/746ca331/attachment.html>


More information about the postgis-users mailing list