[postgis-devel] [PostGIS] #1600: normalize_address() confused by whitespace
PostGIS
trac at osgeo.org
Wed Feb 22 06:52:44 PST 2012
#1600: normalize_address() confused by whitespace
----------------------------+-----------------------------------------------
Reporter: mikepease | Owner: robe
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 2.0.0
Component: tiger geocoder | Version: 1.5.X
Keywords: |
----------------------------+-----------------------------------------------
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))
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/1600>
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-devel
mailing list