Opened 10 years ago
Closed 10 years ago
#2760 closed defect (worksforme)
geocoder producing erronous results
Reported by: | infinityedge | Owned by: | robe |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 2.1.5 |
Component: | tiger geocoder | Version: | 2.1.x |
Keywords: | geocoder | Cc: |
Description
I had previously geocoded a set of Californian addresses successfully using a previous version of postgis (postgres 9.1 and postgis 2.1 I think).
Now, using the same set of addresses, I am getting some strange errors. For example:
select (geocode('30 LA PATERA CT., CAMARILLO, CA 9301',1));
returns ("(Camarillo,CA,93010,t)",0101000020AD100000CB0A33FFC6C45DC0D42A976F6A1D4140,100)
I have a bunch of these that have been geododed to the town in general, or sometimes to a whole new town:
addid | address | lon | lat | new_address | rating
130 | 1722 S. LEWIS RD., CAMARILLO, CA 93012 | -119.79024 | 36.75442 | 1722 E Lewis Ave, Fresno, CA 93701 | 26 131 | 1722 S. LEWIS RD., CAMARILLO, CA 93012 | -119.79024 | 36.75442 | 1722 E Lewis Ave, Fresno, CA 93701 | 26 241 | 601 DAILY DRIVE STE. 224, CAMARILLO, CA 93012 | -122.12970 | 37.72027 | Daily Dr, STE. 224, San Leandro, CA 94577 | 19 242 | 4001 MISSION OAKS BL. STE K&T, CAMARILLO, CA 93012 | -119.07465 | 34.22981 | Camarillo, CA 93010 | 100 436 | 280 SKYWAY DRIVE, CAMARILLO, CA 93010 | -123.77127 | 40.12537 | 280 Skyway Rd, Benbow, CA 95542 | 20 501 | 3639 EAST LAS POSAS ROAD #117, CAMARILLO, CA 93010 | -121.75601 | 37.70194 | 3639 Las Positas Rd, Dublin, CA 94550 | 33
1022 | 380 ARNEILL ROAD, CAMARILLO, CA 93011 | -114.61132 | 32.75287 | Arnold Rd, Winterhaven, CA 92283 | 53 2290 | 161 MARKER AVENUE, CAMARILLO, CA 93010 | -122.13531 | 37.70544 | Margery Ave, San Leandro, CA 94578 | 40 6012 | 1758 SOUTH LEWIS ROAD, CAMARILLO, CA 93012 | -119.53975 | 36.70130 | S Lewis Ln, Centerville, CA 93657 | 25 7676 | 1601 TEMPLE AVENUE, CAMARILLO, CA 93010 | -120.56026 | 37.02440 | Temple Ave, Dos Palos, CA 93620 | 20 7886 | 4451 E. LAS POSAS RD., CAMARILLO, CA 93010 | -121.74394 | 37.69889 | 4451 Las Positas Rd, Livermore, CA 94551 | 34 7985 | ONE UNIVERSITY DR., CAMARILLO, CA 93012 | -119.07465 | 34.22981 | Camarillo, CA 93010 | 100
Is there something wrong with the geocoder install, is this a known bug with the current version, or am I alone with this problem?
Enviroment: — Ubuntu 14.04 LTS — PostgreSQL 9.3.4 on x86_64-unknown-linux-gnu, compiled by gcc (Ubuntu 4.8.2-16ubuntu6) 4.8.2, 64-bit — POSTGIS="2.1.3 r12547" GEOS="3.4.2-CAPI-1.8.2 r3921" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.11.0, released 2014/04/16" LIBXML="2.9.1" LIBJSON="UNKNOWN" TOPOLOGY RASTER
Thanks for any insights, —Christopher
Attachments (2)
Change History (8)
by , 10 years ago
by , 10 years ago
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Owner: | changed from | to
---|
comment:3 by , 10 years ago
Did you install the Nation Script?
http://postgis.net/docs/manual-2.1/Loader_Generate_Nation_Script.html
That was the main change between 2.0 and 2.1 — they started having counties as a single file — so changed the logic to load up all these nation files apart from state. If you missed this step then you will get very bad results.
comment:4 by , 10 years ago
Component: | postgis → tiger geocoder |
---|
comment:5 by , 10 years ago
Milestone: | → PostGIS 2.1.5 |
---|
This is weird I didn't notice this ticket was this old, maybe because it wasn't slated for a milestone I missed it. I tried these on my PostGIS 2.1.4 install (which is newer than yours) and they give the right answers. But I'm not sure if my install is completely a clean 2.1.4 since I think I upgraded from prior.
The Shields one doesn't geocode right but part of that is the normalize_address doesn't know what do to with One (translate to 1)
the others seem reasonable for example:
select * FROM geocode('805 Russell Blvd, Davis, CA 95616',100); -- gives (805,,Russell,Blvd,,,Davis,CA,95616,t);0101000020AD100000C7336FA6A9705EC05BF054B5F0454340;0 -- and select (geocode('30 LA PATERA CT., CAMARILLO, CA 9301',1)); --gives ("(30,,""la Patera"",Ct,,,Camarillo,CA,93010,t)",0101000020AD1000001E51989626C55DC0763B53F60B1F4140,1)
I see you did load up the nation script and other so my comment isn't relevant.
The behavior you are getting sounds like you are missing records in your california edges or featnames. If the problem is isolated to a particular region, that could be the issue.
Just for compare to rule that out: I have 3,908,126 records in my tiger.ca_edges 4,532,617 in tiger.ca_featnames 1,127,191 in tiger.ca_faces
Can you run:
SELECT set_geocode_setting('debug_geocode_address', 'true');
Then rerun and paste the notice that outputs the queries and prepared statements
comment:6 by , 10 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
I'm closing this out since haven't heard back from infinityedge and I can't reproduce the issue.
I reinstalled the geocoder by cascade dropping the tiger schema, reinstalling the geocoder extension, exporting loader scripts (edited versions attached), then running those scripts.
Geocoding is still useless:
california=# select (geocode('One Shields Avenue Davis, CA 95616',100));
(1 row)
california=# select (geocode('805 Russell Blvd, Davis, CA 95616',100));
(1 row)
california=# select (geocode('30 LA PATERA CT., CAMARILLO, CA 9301',1));
(1 row)
california=# select (geocode('280 SKYWAY DRIVE, CAMARILLO, CA 93010',1));
(1 row)
It didn't used to be this bad. The prior version geocoded the same list I'm working with just fine. What has changed in the geocoder, and is there any way to work around it?