[postgis-users] Geocoding Issues with Route, ##-## house numbers; upgrade questions
Daniel Weitzenfeld
dweitzenfeld at gmail.com
Wed Jul 27 13:27:10 PDT 2011
Hi,
I'm using and abusing the geocoder, and I've come across a couple issues:
1) Routes
example: '1820 ROUTE 32, MODENA, NY 12548':
rating | lon | lat | address | predirabbrev | streetname |
streettypeabbrev | postdirabbrev | internal | location | stateabbrev | zip
| parsed
--------+------------+-----------+---------+--------------+------------+------------------+---------------+----------+----------+-------------+-------+--------
22 | -73.9374945714286 | 40.6108123469388 | 1820 | E |
32nd | St | | | New York |
NY | 11234 | t
which is 85 miles away =)
2) ##-## addresses
example: '112-31 196 STREET, SAINT ALBANS, NY'
rating | lon | lat | address | predirabbrev | streetname |
streettypeabbrev | postdirabbrev | internal | location | stateabbrev | zip
| parsed
--------+------------+-----------+---------+--------------+------------+------------------+---------------+----------+----------+-------------+-------+--------
20 | -73.756229 | 40.693842 | | | 196th |
St | | | New York | NY | 11412
| t
which is only .3 miles away, but note that it just ignored the house number.
Questions:
a. Is there something I can do to pre-process either of these types of
addresses to help the geocoder?
b. If I know that the zip code is correct, is there a setting I can adjust
so that the geocoder never looks outside the provided zip code?
According to normalize_address.sql, I'm using this version of the Geocoder:
7616 2011-07-07 12:41:13Z
If this is the version I 'installed' - ie started with - do I still need to
run upgrade_geocoder.sh? what about *Missing_Indexes_Generate_Script*()?
Lastly, a small contribution: I noticed the geocoder was also having
problems with addresses like '45 3 STREET' and '45 WEST 3 STREET', and I
found that by adding a suffix to the '3' ('3' -> '3RD') gave it a push in
the right direction. The regular expression I'm using to catch these is:
foo=re.match(r'([0-9\-]+ +)([0-9]+)( +[a-zA-Z_]+)', street)
foo2=re.match(r'([0-9\-]+ +)([WESTASOUHNOR]+ )([0-9]+)( +[a-zA-Z_]+)',
street)
Thanks,
Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20110727/d3d01e02/attachment.html>
More information about the postgis-users
mailing list