Ticket #1600 (assigned defect)
normalize_address() confused by whitespace
| Reported by: | mikepease | Owned by: | robe |
|---|---|---|---|
| Priority: | medium | Milestone: | PostGIS 2.1.0 |
| Component: | pagc_address_parser | Version: | 1.5.X |
| Keywords: | Cc: | woodbri |
Description
If there is a tab or newline at the beginning or end of an address string, normalize_address() incorrectly parses the address components.
select * from normalize_address('212 n 3rd ave, Minneapolis, mn 55401 ')
select * from normalize_address(' 212 n 3rd ave, Minneapolis, mn 55401')
Can your function start off by cleaning up whitespace on the input string? When I don't make sure to send input clean of whitespace, I get poor results.
Something like... trim(regexp_replace(' 212 n 3rd ave, Minneapolis, mn 55401', '\r|\n', ' ', 'g'))
e.g. select normalize_address(trim(raw_address))
Change History
Note: See
TracTickets for help on using
tickets.
