<div dir="ltr">Hi Regina,<div><br></div><div style>Thanks for the suggestions. I did search for similar posts but somehow I missed that thread. I'll try the new code you are working on.</div><div style><br></div><div style>
Thanks,</div><div style>Shawn</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Apr 25, 2013 at 12:31 PM, Paragon Corporation <span dir="ltr"><<a href="mailto:lr@pcorp.us" target="_blank">lr@pcorp.us</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I have this problem ticketed already:<br>
<a href="http://trac.osgeo.org/postgis/ticket/1118" target="_blank">http://trac.osgeo.org/postgis/ticket/1118</a><br>
<br>
In this particular case you'd be actually better off deleting those records<br>
and then it would normalize that particular variant right.<br>
<br>
The problem is that all those other Cams that tiger does put the Cam in the<br>
pre type field would then be wrong.<br>
<br>
As noted in the last item of ticket I'm working with Steve Woodbridge to<br>
have an alternative normalizer which should handle these issues better and<br>
we are in the heat of it at the moment so very much in flux.<br>
I haven't tried adding this entry to the new standardizer table set but will<br>
and see how it fairs. But it does behave the same right now for this<br>
particular case with the entries I currently have.<br>
<br>
<br>
If you are interested your can download the code from here and compile<br>
<a href="http://pagc.svn.sourceforge.net/viewvc/pagc/branches/sew-refactor/postgresql
/?view=tar" target="_blank">http://pagc.svn.sourceforge.net/viewvc/pagc/branches/sew-refactor/postgresql<br>
/?view=tar</a><br>
<br>
It creates a PostgreSQL extension you can install with<br>
CREATE EXTENSION address_standardizer;<br>
<br>
<br>
Lots of examples in this diatribe of this ticket:<br>
<a href="http://trac.osgeo.org/postgis/ticket/2260" target="_blank">http://trac.osgeo.org/postgis/ticket/2260</a><br>
<br>
<br>
We are still working out some kinks as to how tiger is wrapping it and I<br>
need to add in a few more entries.<br>
<br>
In postgis 2.1<br>
<br>
CREATE EXTENSION postgis_tiger_geocoder;<br>
CREATE EXTENSION address_standardizer;<br>
<br>
Then you can run<br>
<br>
SELECT pagc_normalize_address(youraddress);<br>
<br>
Instead of<br>
SELECT normalize_address(youraddress);<br>
<br>
And the tables used are tiger.pagc_lex, tiger.pagc_gaz, tiger.pagc_rules<br>
which you can add entries to.<br>
<br>
<br>
The other alternative more invasive solution which Steve suggested and he<br>
does for his geocoding work is to normalize the tiger dataset itself.<br>
I've been avoiding that solution (though it would work well with cases like<br>
this), just because its going to add more time to the data load process and<br>
also take up a bit more disk space.  Neither of which is all that appealing<br>
nor ones I've benchmarked.  It will also require a bit more work to add that<br>
logic to the prep step (though I think I probably overestimated the effort<br>
on that part).<br>
<br>
Thanks,<br>
Regina<br>
<a href="http://www.postgis.us" target="_blank">http://www.postgis.us</a><br>
<a href="http://postgis.net" target="_blank">http://postgis.net</a><br>
<br>
<br>
<br>
________________________________<br>
<br>
From: <a href="mailto:postgis-users-bounces@lists.osgeo.org">postgis-users-bounces@lists.osgeo.org</a><br>
[mailto:<a href="mailto:postgis-users-bounces@lists.osgeo.org">postgis-users-bounces@lists.osgeo.org</a>] On Behalf Of Shawn Peterson<br>
Sent: Thursday, April 25, 2013 12:22 PM<br>
To: PostGIS Users Discussion<br>
Subject: [postgis-users] Incorrect Address Normalization<br>
<div><div class="h5"><br>
<br>
I was testing normalize_address on the following address:<br>
<br>
<br>
<br>
100 El Camino Real, Menlo Park, CA 94025<br>
<br>
<br>
but it gives incorrect results. I tried to add the following entry to<br>
postgis-2.1.0SVN/extras/tiger_geocoder/tiger_2011/tables/lookup_tables_2011.<br>
sql:<br>
<br>
    FROM (VALUES<br>
        ('EL CAMINO', 'El Cam'),<br>
        ('CAM', 'Cam'),<br>
        ('CAM.', 'Cam'),<br>
...<br>
<br>
and then run<br>
postgis-2.1.0SVN/extras/tiger_geocoder/tiger_2011/create_geocode.sh. But it<br>
does not work.<br>
<br>
My postgreSQL is 9.2.4, and postGIS is 2.1.0SVN.<br>
<br>
<br>
Any help is appreciated!<br>
<br>
Thanks,<br>
Shawn<br>
<br>
<br>
</div></div>_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br>
</blockquote></div><br></div>