Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#887 closed defect (fixed)

Tiger geocoder fails when address contains name of state sometimes

Reported by: robe Owned by: robe
Priority: medium Milestone: PostGIS 2.0.0
Component: tiger geocoder Version: master
Keywords: history Cc: danpelota@…

Description

See: http://www.postgis.org/pipermail/postgis-users/2011-March/029236.html

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

for details. Though I'm not convinced it's just state name at issue (might be when there is a street prefix) since in example docs we geocode Massachusetts Avenue fine. e.g.

77 Massachusetts Avenue, Cambridge, MA 02139

doesn't give error

Change History (4)

comment:1 by robe, 13 years ago

Component: postgistiger geocoder
Owner: changed from pramsey to robe
Summary: Tiger geocoder fails when address contains name of street sometimesTiger geocoder fails when address contains name of state sometimes

comment:2 by robe, 13 years ago

Cc: danpelota@… added

comment:3 by robe, 13 years ago

Resolution: fixed
Status: newclosed

Fixed at r7005. The problem was that the normalize wouldn't work if state abbrev, zip was separated with a , instead of a space. So:

GEOCODE('2450 N COLORADO ST, PHILADELPHIA, PA 19132')

probably worked fine though probably thru an error:

GEOCODE('2450 N COLORADO ST, PHILADELPHIA, PA, 19132')

comment:4 by robe, 13 years ago

Keywords: history added
Note: See TracTickets for help on using tickets.