Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#2981 closed defect (fixed)

standardize address returns no answer for particular highway

Reported by: robe Owned by: robe
Priority: high Milestone: PostGIS 2.2.0
Component: pagc_address_parser Version: master
Keywords: Cc:

Description

I'm actually not sure what should be returned here but at very least the city and state I would think should be parseable

SELECT standardize_address('lex','gaz','rules', '1566 NEW STATE HWY, RAYNHAM, MA') ;

returns:
(,,,,,,,,,,,,,,,)

normalize_address seems to do much better:

SELECT normalize_address('1566 NEW STATE HWY, RAYNHAM, MA');

(1566,,NEW,"State Hwy",,,RAYNHAM,MA,,t)

Change History (3)

comment:1 by robe, 10 years ago

Priority: mediumhigh

comment:2 by robe, 9 years ago

Owner: changed from woobri to robe

Well confirmed parse_address at least does the right thing:

SELECT *
FROM parse_address( '1566 NEW STATE HWY, RAYNHAM, MA') ;

 num  |    street     | street2 |      address1      |  city   | state | zip | zipplus | country
------+---------------+---------+--------------------+---------+-------+-----+---------+---------
 1566 | NEW STATE HWY |         | 1566 NEW STATE HWY | RAYNHAM | MA    |     |         | US
(1 row)

New query should be:

CREATE EXTENSION address_standardizer_data_us;

SELECT standardize_address('us_lex','us_gaz','us_rules', '1566 NEW STATE HWY, RAYNHAM, MA') ;

The NEW seems to be what is tripping it up because this works:

SELECT standardize_address('us_lex','us_gaz','us_rules', '1566 STATE HWY, RAYNHAM, MA') ;

                     standardize_address
-------------------------------------------------------------
 (,1566,,,,"STATE HIGHWAY",,,,,RAYNHAM,MASSACHUSETTS,USA,,,)

comment:3 by robe, 9 years ago

Resolution: fixed
Status: newclosed

Fixed at r14054

SELECT * FROM  standardize_address('us_lex','us_gaz','us_rules', '1566 NEW STATE HWY, RAYNHAM, MA') ;

SELECT * FROM standardize_address('us_lex','us_gaz','us_rules', '1566 STATE HWY, RAYNHAM, MA') ;

now yields:

 building | house_num | predir | qual | pretype |       name        | suftype | sufdir | ruralroute | extra |  city   |     state     | country | postcode | box | unit
----------+-----------+--------+------+---------+-------------------+---------+--------+------------+-------+---------+---------------+---------+----------+-----+------
          | 1566      |        |      |         | NEW STATE HIGHWAY |         |        |            |       | RAYNHAM | MASSACHUSETTS | USA     |          |     |
(1 row)


building | house_num | predir | qual | pretype |     name      | suftype | sufdir | ruralroute | extra |  city   |     state     | country | postcode | box | unit
---------+-----------+--------+------+---------+---------------+---------+--------+------------+-------+---------+---------------+---------+----------+-----+------
         | 1566      |        |      |         | STATE HIGHWAY |         |        |            |       | RAYNHAM | MASSACHUSETTS | USA     |          |     |

and tiger packaged one now yields:

SELECT * FROM  standardize_address('tiger.pagc_lex','tiger.pagc_gaz','tiger.pagc_rules', '1566 NEW STATE HWY, RAYNHAM, MA') ;

 building | house_num | predir | qual | pretype |     name      | suftype | sufdir | ruralroute | extra |  city   | state | country | postcode | box | unit
----------+-----------+--------+------+---------+---------------+---------+--------+------------+-------+---------+-------+---------+----------+-----+------
          | 1566      |        |      |         | NEW STATE HWY |         |        |            |       | RAYNHAM | MA    | USA     |          |     |
(1 row)


Though I stumbled across another issue that the tiger one gives no answer for the w/out NEW. That has existed for awhile and think I'm just missing some rules.

Last edited 9 years ago by robe (previous) (diff)
Note: See TracTickets for help on using tickets.