Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#1604 closed defect (fixed)

normalize_address() confused by internal component

Reported by: mikepease Owned by: robe
Priority: medium Milestone: PostGIS 2.1.0
Component: pagc_address_parser Version: master
Keywords: Cc: woodbri

Description

There are certain cases where normalize_address() incorrectly parses the address.

Consider an address with no street type like below AND an internal component. Remove the internal component and it works. Or add a street type and it works.

—INCORRECT select * from normalize_address('901 Mainstreet Fl 1 Hopkins MN 55343')

—INCORRECT select * from normalize_address('901 Mainstreet, Fl 1, Hopkins, MN 55343')

—CORRECT! select * from normalize_address('901 Main street, Fl 1, Hopkins, MN 55343')

—CORRECT! select * from normalize_address('901 Mainstreet Hopkins MN 55343')

Change History (12)

comment:1 by robe, 13 years ago

Milestone: PostGIS 2.0.0PostGIS 2.1.0

comment:2 by robe, 13 years ago

Milestone: PostGIS 2.1.0PostGIS 2.0.1

comment:3 by mikepease, 13 years ago

Another example:

select * from normalize_address('2301 BEACH FRONT LN SW, Rochester, MN 55902') —Gets confused by "FRONT" in street name —Remove "FRONT" from secondary_unit_lookup table and the normalizer works correctly.

comment:4 by mikepease, 13 years ago

—This also normalizes and subsequently geocodes correctly by adding a hyphen.

select * from normalize_address('2301 BEACH-FRONT LN SW, Rochester, MN 55902')

comment:5 by mikepease, 13 years ago

Another example:

select (addy).*, rating from geocode('5435 US HIGHWAY 14, ROCHESTER, MN 55904') —This gets the correct location, but take out "US" and it gets the wrong address number

—Wrong answer select (addy).*, rating from geocode('5435 HIGHWAY 14, ROCHESTER, MN 55904')

—Also wrong answer select (addy).*, rating from geocode('5435 HWY 14, ROCHESTER, MN 55904')

comment:6 by robe, 13 years ago

Milestone: PostGIS 2.0.1PostGIS 2.1.0

comment:7 by woodbri, 12 years ago

Cc: woodbri added

comment:8 by woodbri, 12 years ago

Cc: woodbri removed

PAGC tools handles Mainstreet Fl 1 correctly, and the Beach Front Ln with and without the hyphen, and US HWY 14 and HWY 14 (this last one is more related to how the geocoder constructs the queries, my geocoder get the same location for both of these).

comment:9 by woodbri, 12 years ago

Cc: woodbri added

My last comment might be slightly incorrect with respect to the split word like beach front. The standardizer will standardize them, but searching for them still requires some kind of fuzzy searching. My geocoder finds some of these. But this is a larger discussion about how to do fuzzy searching that we should do in email, and then summarize in another ticket.

comment:10 by robe, 12 years ago

Component: tiger geocoderpagc_address_parser

comment:11 by robe, 12 years ago

Resolution: fixed
Status: newclosed
Version: 1.5.Xtrunk

Seems to work well:

SELECT  pprint_addy(a), a.internal 
   FROM pagc_normalize_address('901 Mainstreet Fl 1 Hopkins MN 55343') As a;

Yields:

                 pprint_addy                  | internal
----------------------------------------------+-----------
 901 MAINSTREET, # FLOOR 1, HOPKINS, MN 55343 | # FLOOR 1

— this one might have been caused by my over abbreviating —

SELECT pprint_addy(a), a.streetname, a.location, a.stateabbrev 
  FROM pagc_normalize_address('2301 BEACH FRONT LN SW, Rochester, MN 55902') AS a;
-- but still acceptable -- 
                pprint_addy                | streetname | location  | stateabbrev
-------------------------------------------+------------+-----------+-------------
 2301 BCH FRONT Ln SW, ROCHESTER, MN 55902 | BCH FRONT  | ROCHESTER | MN

SELECT pprint_addy(a), a.streetname, a.location, a.stateabbrev, a.predirabbrev, a.postdirabbrev
  FROM pagc_normalize_address('2301 BEACH FRONT LN Southwest, Rochester, MN 55902') AS a;

                pprint_addy                | streetname | location  | stateabbre
v | predirabbrev | postdirabbrev
-------------------------------------------+------------+-----------+-----------
--+--------------+---------------
 2301 BCH FRONT Ln SW, ROCHESTER, MN 55902 | BCH FRONT  | ROCHESTER | MN
  |              | SW

Anyrate will consider it a non-issue now.

comment:12 by robe, 12 years ago

yap I was over abbreviating. the original pagc tables were fine.now it returns

BEACH FRONT as it should at r11244

Note: See TracTickets for help on using tickets.