[postgis-tickets] [PostGIS] #2979: address standardizer doesn't correctly parse street suffix if no ,

PostGIS trac at osgeo.org
Fri Oct 24 17:35:03 PDT 2014


#2979: address standardizer doesn't correctly parse  street suffix if no ,
---------------------------------+------------------------------------------
 Reporter:  robe                 |       Owner:  woobri       
     Type:  defect               |      Status:  new          
 Priority:  medium               |   Milestone:  PostGIS 2.2.0
Component:  pagc_address_parser  |     Version:  trunk        
 Keywords:                       |  
---------------------------------+------------------------------------------
 Sorry for this barrage of issues.  Leo had a batch of addresses he needed
 to standardize and was comparing performance between normalize_address and
 standardize_address and came up with these issues.

 Here is one where normalize_address parses right but standardize_address
 (and pagc_normalized_address by extension) don't


 {{{
 SELECT 'std' As parser, house_num, name, suftype, state, postcode
 FROM standardize_address('lex' -- --
 , 'gaz' -- --
 , 'rules' -- --
 , '25 PINE ST PROVIDENCE RI 99999'
 ) As std
 UNION ALL
 SELECT 'norm' As parser, address::text, streetname, streettypeabbrev,
 stateabbrev, zip
 FROM normalize_address('25 PINE ST PROVIDENCE RI 99999' ) ;
 }}}

 Output is:


 {{{
  parser | house_num | name | suftype |    state     | postcode
 --------+-----------+------+---------+--------------+----------
  std    | 25        | PINE |         | RHODE ISLAND | ST 99999
  norm   | 25        | PINE | St      | RI           | 99999
 }}}

 Note how with standardize_address, the street type gets caught in
 postcode.

 However both behave right if I put in a,

 {{{
 SELECT 'std' As parser, house_num, name, suftype, state, postcode
 FROM standardize_address('lex' -- --
 , 'gaz' -- --
 , 'rules' -- --
 , '25 PINE ST, PROVIDENCE, RI 99999'
 ) As std
 UNION ALL
 SELECT 'norm' As parser, address::text, streetname, streettypeabbrev,
 stateabbrev, zip
 FROM normalize_address('25 PINE ST, PROVIDENCE, RI 99999' ) ;
 }}}



 {{{
  parser | house_num | name | suftype |    state     | postcode
 --------+-----------+------+---------+--------------+----------
  std    | 25        | PINE | STREET  | RHODE ISLAND | 99999
  norm   | 25        | PINE | St      | RI           | 99999
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2979>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list