Opened 13 years ago

Closed 13 years ago

#1310 closed defect (fixed)

City names with cardinal directions split by address normalizer

Reported by: bpanulla Owned by: robe
Priority: high Milestone: PostGIS 2.0.0
Component: tiger geocoder Version: master
Keywords: Cc:

Description

normalize_address() appears to strip cardinal directions from the city name and place them in the Post-dir field, causing incorrect geocoding. Test case:

1110 W CAPITOL AVE, WEST SACRAMENTO, CA

gets parsed by normalize_address as:

AddressPre-DirStreetStreet TypePost-DirInternalLocalityStateZip
1110WCAPITOLAveWSACRAMENTOCA

Geocoded address: 1500 Capitol Ave, Sacramento, CA 95814

Removing the space between WEST and SACREMENTO causes the address to be parsed, and hence geocoded, correctly.

AddressPre-DirStreetStreet TypePost-DirInternalLocalityStateZip
1110WCAPITOLAveWESTSACRAMENTOCA

Geocoded address: 1110 W Capitol Ave, West Sacramento, CA 95691

Change History (3)

comment:1 by bpanulla, 13 years ago

Priority: mediumhigh

I figured out how to turn on debugging in the normalize_address() function. It's fine the whole way along until it loses it at the very end.

NOTICE:  2011-11-21 21:54:07.337209-08 input: 1110 W CAPITOL AVE, WEST SACRAMENTO, CA
NOTICE:  2011-11-21 21:54:07.337291-08 addressString: 1110
NOTICE:  2011-11-21 21:54:07.337384-08 zipString: <NULL>
NOTICE:  2011-11-21 21:54:07.337425-08 fullStreet: 1110 W CAPITOL AVE, WEST SACRAMENTO, CA
NOTICE:  2011-11-21 21:54:07.337748-08 stateAbbrev: CA
NOTICE:  2011-11-21 21:54:07.338475-08 fullStreet: W CAPITOL AVE
NOTICE:  2011-11-21 21:54:07.338546-08 location: WEST SACRAMENTO
NOTICE:  fullStreet: W CAPITOL AVE
NOTICE:  location: WEST SACRAMENTO
NOTICE:  internal: <NULL>
NOTICE:  location: WEST SACRAMENTO
NOTICE:  street Type: AVE, street Type abbrev: Ave
NOTICE:  2011-11-21 21:54:07.340286-08 streetTypeAbbrev: Ave
NOTICE:  2011-11-21 21:54:07.340622-08 reduced street:  W CAPITOL
NOTICE:  2011-11-21 21:54:07.343659-08 location trying to extract postdir: WEST SACRAMENTO
NOTICE:  2011-11-21 21:54:07.343919-08 postDir: W

Total query runtime: 18 ms.
1 row retrieved.

comment:2 by robe, 13 years ago

bpanulla,

We'll try to take a look at this in the next couple of days. thanks for the report :)

comment:3 by robe, 13 years ago

Resolution: fixed
Status: newclosed

fixed at r8252

Note: See TracTickets for help on using tickets.