geocoding failure

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

geocoding failure

Sara Yurman
I have the tiger geocoder extension installed, and the tiger data loaded for the state of Georgia.  I can get a reasonable response from the geocode_intersection function, but geocode, geocode_address and reverse_geocode always fetch 0 rows.  

For example:

select geocode_intersection( 'Patterson Ave', 'Walnut St', 'GA', 'Scottdale', '30079', 1 );

Gives this (correct) result:

"("(312,,Patterson,Ave,,,Scottdale,GA,30079,t)",0101000020AD100000465ED6C4021155C0AB764D486BE44040,0)"

But this:

select * geocode_address( normalize_address( '312 Patterson Ave, Scottdale GA 30079' ) );

Yields 0 rows.  I just get the header (addy, geomout, header).

Similarly,  I can get the coordinates for the intersection:

select st_astext( geomout ) from geocode_intersection( 'Patterson Ave', 'Walnut St', 'GA', 'Scottdale', '30079', 1
 );

Results in:

"POINT(-84.265794 33.784524)"

But
select 
   pprint_addy( r.addy[1]) as st1, 
   pprint_addy(r.addy[2]) as st2, 
   pprint_addy(r.addy[3]) as st3,
   array_to_string(r.street, ',') as cross_streets
from
   reverse_geocode( st_geomfromtext( 'POINT(-84.265794 33.784524)', 4269),true) as r
;

Gives me 0 rows again.

I'm doing something very wrong.  Any nudges in the correct direction much appreciated.

Thanks in advance,

Sara
--
Sara Yurman, GISP
Spatial Focus, LLC
Geodata Architects
http://www.spatialfocus.com/
Office: (404) 378-0989
Fax:    (404) 806-6257

_______________________________________________
postgis-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|

Re: geocoding failure

Sara Yurman
Ok, so here's an update.  I found the tiger_data.ga_zip_lookup_base empty.  It seemed to be empty because the tiger.county table was empty.  I grepped the loader script for anything that would have loaded the tiger.county table and didn't find anything.  I regenerated the script to be sure, and got the same result.

So I filled the tiger.county and tiger_data.ga_zip_lookup_base tables.  And got the same result.  Is there something I'm not getting about the loader script?  Here's how I generated my loader:

psql -U postgres -d wafflehouse -A t -c "SELECT Loader_Generate_Script(ARRAY['GA'],'windows');"

This has to run in a windows vm on my laptop for a variety of reasons.  In any case, the script generated looks plausible and seems to work mostly.

I checked all the FROM clauses in the create script for the geocode_address function, and believe I have data in all the required tables.  I'll keep after it, but any help would be great.

Thanks,

Sara
-- 
Sara Yurman, GISP
Spatial Focus, LLC
Geodata Architects
http://www.spatialfocus.com/
Office: <a href="tel:%28404%29%20378-0989" value="+14043780989" target="_blank">(404) 378-0989
Fax:    <a href="tel:%28404%29%20806-6257" value="+14048066257" target="_blank">(404) 806-6257


_______________________________________________
postgis-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|

Re: geocoding failure

P O'Toole
In reply to this post by Sara Yurman
>>I have the tiger geocoder extension installed, and the tiger data loaded
>>for the state of Georgia.  I can get a reasonable response from the
>>geocode_intersection function, but geocode, geocode_address and
>>reverse_geocode always fetch 0 rows.
>
>Ok, so here's an update.  I found the tiger_data.ga_zip_lookup_base empty.
>It seemed to be empty because the tiger.county table was empty.  I grepped
>the loader script for anything that would have loaded the tiger.county
>table and didn't find anything.  I regenerated the script to be sure, and
>got the same result.
>
>So I filled the tiger.county and tiger_data.ga_zip_lookup_base tables.  And
>got the same result.  Is there something I'm not getting about the loader
>script?  Here's how I generated my loader:
>
>psql -U postgres -d wafflehouse -A t -c "SELECT
>Loader_Generate_Script(ARRAY['GA'],'windows');"
>
>This has to run in a windows vm on my laptop for a variety of reasons.  In
>any case, the script generated looks plausible and seems to work mostly.
>I checked all the FROM clauses in the create script for the geocode_address
>function, and believe I have data in all the required tables.  I'll keep
>after it, but any help would be great.
>
>Thanks,
>
>Sara
>--
>Sara Yurman, GISP
>Spatial Focus, LLC
>Geodata Architects
>http://www.spatialfocus.com/
>Office: (404) 378-0989
>Fax:    (404) 806-6257

Sara –

I don't do geocoding myself, but a brute-force way of moving forward would be to either (A) get geocoding information from someone else in the state who uses PostGIS and steal their configuration (B) get geocoding information from someone who uses PostGIS in a neighboring state for clues as to what's going on (C) install Postgres/PostGIS temporarily onto a Linux server and pg_dump/restore to the local Windows machine you stated you have to use. I'd suggest installing a dual-boot to that machine or flipping the virtualization you're doing to go from Windows->Linux instead of Linux->Windows instead of the other way around, but even if it happened to be an option I probably wouldn't chase that option until you had more information.

Cheers,
- Patrick O'Toole

Application Developer
Wyoming Natural Diversity Database
UW Berry Biodiversity Conservation Center
Department 3381, 1000 E. University Av.
Laramie, WY 82071
P: 307-766-3018

_______________________________________________
postgis-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|

Re: geocoding failure

Sara Yurman
Solved.  Flat forehead moment.  Just needed to run the script generated by Loader_Generate_Nation_Script before loading the Georgia data.

Sorry for the fuss.

Sara

On Fri, Oct 14, 2016 at 3:27 PM, P O'Toole <[hidden email]> wrote:
>>I have the tiger geocoder extension installed, and the tiger data loaded
>>for the state of Georgia.  I can get a reasonable response from the
>>geocode_intersection function, but geocode, geocode_address and
>>reverse_geocode always fetch 0 rows.
>
>Ok, so here's an update.  I found the tiger_data.ga_zip_lookup_base empty.
>It seemed to be empty because the tiger.county table was empty.  I grepped
>the loader script for anything that would have loaded the tiger.county
>table and didn't find anything.  I regenerated the script to be sure, and
>got the same result.
>
>So I filled the tiger.county and tiger_data.ga_zip_lookup_base tables.  And
>got the same result.  Is there something I'm not getting about the loader
>script?  Here's how I generated my loader:
>
>psql -U postgres -d wafflehouse -A t -c "SELECT
>Loader_Generate_Script(ARRAY['GA'],'windows');"
>
>This has to run in a windows vm on my laptop for a variety of reasons.  In
>any case, the script generated looks plausible and seems to work mostly.
>I checked all the FROM clauses in the create script for the geocode_address
>function, and believe I have data in all the required tables.  I'll keep
>after it, but any help would be great.
>
>Thanks,
>
>Sara
>--
>Sara Yurman, GISP
>Spatial Focus, LLC
>Geodata Architects
>http://www.spatialfocus.com/
>Office: <a href="tel:%28404%29%20378-0989" value="+14043780989">(404) 378-0989
>Fax:    <a href="tel:%28404%29%20806-6257" value="+14048066257">(404) 806-6257

Sara –

I don't do geocoding myself, but a brute-force way of moving forward would be to either (A) get geocoding information from someone else in the state who uses PostGIS and steal their configuration (B) get geocoding information from someone who uses PostGIS in a neighboring state for clues as to what's going on (C) install Postgres/PostGIS temporarily onto a Linux server and pg_dump/restore to the local Windows machine you stated you have to use. I'd suggest installing a dual-boot to that machine or flipping the virtualization you're doing to go from Windows->Linux instead of Linux->Windows instead of the other way around, but even if it happened to be an option I probably wouldn't chase that option until you had more information.

Cheers,
- Patrick O'Toole

Application Developer
Wyoming Natural Diversity Database
UW Berry Biodiversity Conservation Center
Department 3381, 1000 E. University Av.
Laramie, WY 82071
P: <a href="tel:307-766-3018" value="+13077663018">307-766-3018




--
Sara Yurman, GISP
Spatial Focus, LLC
Geodata Architects
http://www.spatialfocus.com/
Office: (404) 378-0989
Fax:    (404) 806-6257

_______________________________________________
postgis-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/postgis-users