[postgis-tickets] [PostGIS] #3260: parse_address function screws up when zip is > 5 characters

PostGIS trac at osgeo.org
Sun Aug 23 23:12:06 PDT 2015


#3260: parse_address function screws up when zip is > 5 characters
---------------------------------+---------------------------
 Reporter:  robe                 |      Owner:  robe
     Type:  defect               |     Status:  new
 Priority:  medium               |  Milestone:  PostGIS 2.3.0
Component:  pagc_address_parser  |    Version:  trunk
 Keywords:                       |
---------------------------------+---------------------------
 Originally when I first came across this with a Canadian address, I blamed
 Canada, but then I noticed a lot of my normal_address ones (which pass
 with tiger normalize address, fail when using pagc_normalize_address).  On
 closer inspection it seems the address_standardizer parse_address function
 is to blame.

 See how state doesn't fill in and city has state
 {{{
 test_tiger=# SELECT (each(hstore(a))).* FROM parse_address('212 3rd Ave N,
 MINNEAPOLIS, MN 553404') As a;
    key    |           value
 ----------+----------------------------
  num      | 212
  zip      |
  city     | MN 553404
  state    |
  street   | 3rd Ave N, MINNEAPOLIS
  country  | US
  street2  |
  zipplus  |
  address1 | 212 3rd Ave N, MINNEAPOLIS
 (9 rows)
 }}}

 now if I do this:


 {{{
 SELECT (each(hstore(a))).*
 FROM parse_address('212 3rd Ave N, MINNEAPOLIS, MN 55401') As a;
    key    |     value
 ----------+---------------
  num      | 212
  zip      | 55401
  city     | MINNEAPOLIS
  state    | MN
  street   | 3rd Ave N
  country  | US
  street2  |
  zipplus  |
  address1 | 212 3rd Ave N
 (9 rows)

 }}}

 works fine

 this requires muddling with C code, so might need woodbri for this one.

--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3260>
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