Dan, This is not a known bug to my knowledge. Can you put in a ticket for this and I'll check it out.
http://trac.osgeo.org/postgis/newticket Catalog it under component : tiger geocoder / PostGIS 2.0.0 If you wanted to pass individual elements -- create an object of type norm_addy and set the individual elements. Something like this: SELECT ROW(2450,'N','COLORADO', 'ST', '', '', 'PHILADELPHIA', 'PA', '19132', false)::norm_addy Then use the geocode version that takes an already normalized address http://www.postgis.org/documentation/manual-svn/Geocode.html (the second function) So - check and see if the below works SELECT geocode(ROW(2450,'N','COLORADO', 'ST', '', '', 'PHILADELPHIA', 'PA', '19132', false)::norm_addy); Thanks, Regina http://www.postgis.us -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Daniel Ball Sent: Saturday, March 19, 2011 10:03 PM To: [email protected] Subject: [postgis-users] Tiger Geocoder error when street name contains nameof state Hi all, I've been toying with the Tiger Geocoder and have run into a minor problem. I can successfully geocode most street addresses: SELECT g.rating, ST_X(g.geomout) as lon, ST_Y(g.geomout) as lat FROM GEOCODE('1124 BERKSHIRE AVE, PITTSBURGH, PA 15226') as g; rating | lon | lat --------+-------------------+------------------ 0 | -80.0163301048089 | 40.3898836658447 However, if I try an address with a street name that includes the name of a state: SELECT g.rating, ST_X(g.geomout) as lon, ST_Y(g.geomout) as lat FROM GEOCODE('2450 N COLORADO ST, PHILADELPHIA, PA, 19132') as g; ERROR: query string argument of EXECUTE is null CONTEXT: PL/pgSQL function "location_extract" line 54 at EXECUTE statement PL/pgSQL function "normalize_address" line 142 at assignment PL/pgSQL function "geocode" line 10 at assignment Note that misspelling the name of the street fixes the problem: SELECT g.rating, ST_X(g.geomout) as lon, ST_Y(g.geomout) as lat FROM GEOCODE('2450 N COLORADA ST, PHILADELPHIA, PA, 19132') as g; rating | lon | lat --------+-------------------+------------------ 10 | -75.1607586938776 | 39.9908191428571 Haven't quite worked out the details of the address parser, but I'm assuming it's matching the state name in the street and throwing off the what it's passing to the geocoder. Is this a known bug or something I'm doing wrong? Is it possible to pass individual elements of the address to the coder explicitly (e.g., street="2450 N Colorado ST", city="Philadelphia", state="PA", zip="19132")? Thanks in advance for your help! -- Dan _______________________________________________ postgis-users mailing list [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users _______________________________________________ postgis-users mailing list [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users
