[postgis-users] Incorrect Address Parsing

Shawn Peterson shawnnpeterson at gmail.com
Tue Apr 23 23:45:35 PDT 2013


***
I was geocoding the following address:

SELECT g.rating, ST_X(g.geomout) As lon, ST_Y(g.geomout) As lat,
(addy).address As stno, (addy).streetname As street,
(addy).streettypeabbrev As styp, (addy).location As city,
(addy).stateabbrev As st,(addy).zip
FROM geocode('*100 El Camino Real, Menlo Park, CA 94025*') As g;

All the returned results are wrong, even cities don't match.

*****
I did a workaround by manually supplying the address components:

SELECT g.rating, ST_X(g.geomout) As lon, ST_Y(g.geomout) As lat,
(addy).address As stno, (addy).streetname As street,
(addy).streettypeabbrev As styp, (addy).location As city,
(addy).stateabbrev As st,(addy).zip
FROM geocode(row*(100,'','El Camino Real','','','','Menlo Park', 'CA',
'94025',true)*::norm_addy) As g;

This second query gives a closer answer (street number is 101, on the other
side of the street). Is this the only workaround? This would assume my
addresses are already correctly parsed by another program.

*****
 It seems the problem is with address normalization:

SELECT normalize_address('100 El Camino Real, Menlo Park, CA 94025');
             normalize_address
--------------------------------------------
* (100,,Real,Cam,E,,"Menlo Park",CA,94025,t)*
(1 row)

****
On the other hand, geocoder.us can parse the address correctly, and it's on
the correct side of the street.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20130423/13fe51a7/attachment.html>


More information about the postgis-users mailing list