[prev in list] [next in list] [prev in thread] [next in thread]
List: postgis-users
Subject: Re: [postgis-users] Tiger geocoder - error instead of null when unlocatable
From: Matthew Syphus <MSyphus () lhtac ! org>
Date: 2016-02-08 19:10:11
Message-ID: 9A88082E9F46DF469E9FBDE7788104470125ECCC () lhtacexch
[Download RAW message or body]
Bug has been created, #3451<https://trac.osgeo.org/postgis/ticket/3451>.
Thanks again.
From: postgis-users [mailto:postgis-users-bounces@lists.osgeo.org] On Behalf Of \
Regina Obe
Sent: Monday, February 08, 2016 11:18 AM
To: 'PostGIS Users Discussion'
Subject: Re: [postgis-users] Tiger geocoder - error instead of null when unlocatable
Matthew,
Now that you mention it I have run into the same issue myself especially since county \
is such a common table name.
Go ahead and enter a ticket to request schema qualifying. It has been something I've \
been thinking of doing anyway.
Thanks,
Regina
From: postgis-users [mailto:postgis-users-bounces@lists.osgeo.org] On Behalf Of \
Matthew Syphus
Sent: Monday, February 08, 2016 1:09 PM
To: PostGIS Users Discussion \
<postgis-users@lists.osgeo.org<mailto:postgis-users@lists.osgeo.org>>
Subject: Re: [postgis-users] Tiger geocoder - error instead of null when unlocatable
Regina,
Thank you for looking into this. Before entering a bug I did some other checks and \
believe I've found the cause.
The function in question creates a query without schema-qualified table names.
ERROR: column co.statefp does not exist
LINE 2: ...cefp = p.placefp) LEFT JOIN county co ON ('25' = co.statefp...
^
CONTEXT: PL/pgSQL function geocode_address(norm_addy,integer,geometry) line 383 at \
FOR over EXECUTE statement PL/pgSQL function geocode(norm_addy,integer,geometry) line \
14 at FOR over SELECT rows PL/pgSQL function geocode(character \
varying,integer,geometry) line 26 at RETURN QUERY
I have a county table in another schema (also in the search path). After renaming \
that other table it appeared to work. In fact, it returned locations (not just null) \
where it errored out before, meaning it isn't just unlocatable addresses; it is \
affecting all output. Also, it looks like the table names in the tiger and tiger_data \
schemas are not obscure (a good thing) and therefore may be in use somewhere else in \
a database (a bad thing).
Can the extension be updated so the generated scripts and all functions always use \
schema-qualified table names? I realize that might be a tall order, but it seems \
very easy for table names to collide within the search path. Should I still enter \
this as a bug?
Thanks for the excellent work on geocoding (and PostGIS); the address standardizing, \
data import, and geocode results are impressive.
Matthew
From: postgis-users [mailto:postgis-users-bounces@lists.osgeo.org] On Behalf Of \
Regina Obe
Sent: Sunday, February 07, 2016 8:45 AM
To: 'PostGIS Users Discussion'
Subject: Re: [postgis-users] Tiger geocoder - error instead of null when unlocatable
Matthew,
Can you ticket this one in our ticket tracker - http://postgis.net/support/
Unfortunately I don't have Idaho data loaded in my instance and can't trigger the \
problem with the data I have just by replacing the state.
It does sound like a bug though if other addresses work. I'll try to take a look at \
it next week while I'm looking at other tiger issues.
Thanks,
Regina
http://www.postgis.us
http://postgis.net
From: postgis-users [mailto:postgis-users-bounces@lists.osgeo.org] On Behalf Of \
Matthew Syphus
Sent: Sunday, February 07, 2016 12:43 AM
To: PostGIS Users Discussion \
<postgis-users@lists.osgeo.org<mailto:postgis-users@lists.osgeo.org>>
Subject: Re: [postgis-users] Tiger geocoder - error instead of null when unlocatable
Apologies for not including version details originally.
"postgis_full_version"
"POSTGIS="2.2.1 r14555" GEOS="3.5.0-CAPI-1.9.0 r4084" PROJ="Rel. 4.8.0, 6 March 2012" \
GDAL="GDAL 1.10.1, released 2013/08/26" LIBXML="2.7.6" LIBJSON="0.11" TOPOLOGY \
RASTER"
PostgreSQL 9.5.0
CentOS 6.5
mst
From: postgis-users [mailto:postgis-users-bounces@lists.osgeo.org] On Behalf Of \
Matthew Syphus
Sent: Saturday, February 06, 2016 9:06 PM
To: postgis-users@lists.osgeo.org<mailto:postgis-users@lists.osgeo.org>
Subject: [postgis-users] Tiger geocoder - error instead of null when unlocatable
After following the instructions (several times) and apparently successfully \
installing tiger geocoder and the tiger data for Idaho, I keep getting an error when \
the geocoder can't find an address.
With a locatable address it works just fine.
SELECT * FROM geocode('3300 state st, boise, id 83703')
When an address is not locatable, I assume it should return null (and move on to the \
next in the batch). Instead, it returns an error:
SELECT * FROM geocode('3300 state st, neverland, id 9876543210')
---------------------------------------
ERROR: column co.statefp does not exist
LINE 2: ...cefp = p.placefp) LEFT JOIN county co ON ('16' = co.statefp...
^
QUERY: SELECT DISTINCT ON (sub.predirabrv,sub.fename,COALESCE(sub.suftypabrv, \
sub.pretypabrv) ,sub.sufdirabrv,coalesce(p.name,zip.city,cs.name,co.name),s.stusps,sub.zip) \
sub.predirabrv as fedirp, sub.fename, COALESCE(sub.suftypabrv, \
sub.pretypabrv) as fetype, sub.sufdirabrv as fedirs, \
coalesce(p.name,zip.city,cs.name,co.name)::varchar as place, s.stusps as state, \
sub.zip as zip, interpolate_from_address($1, sub.fromhn, ...
It doesn't seem to matter which address element causes the problem, the error is the \
same and it kills the query. Is there some error handling that is getting missed? \
The examples I've seen look like it just returns null. Thank you for any help.
mst
________________________________
This email has been scanned for spam and viruses by Proofpoint Essentials cloud email \
security - click here<https://us1.proofpointessentials.com/index01.php?mod_id=11&mod_option=logitem&mail_id=Z07c%2BrvT0fHg&rid=6780640&report=1> \
to report this email as spam.
________________________________
This email has been scanned for spam and viruses by Proofpoint Essentials cloud email \
security - click here<https://us1.proofpointessentials.com/index01.php?mod_id=11&mod_option=logitem&mail_id=fwStnh5A4b6W&rid=6780640&report=1> \
to report this email as spam.
________________________________
This email has been scanned for spam and viruses by Proofpoint Essentials cloud email \
security - click here<https://us1.proofpointessentials.com/index01.php?mod_id=11&mod_option=logitem&mail_id=jhne-RR8qQM1&rid=6780640&report=1> \
to report this email as spam.
[Attachment #3 (text/html)]
<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" \
xmlns="http://www.w3.org/TR/REC-html40"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";}
span.EmailStyle20
{mso-style-type:personal;
font-family:"Arial","sans-serif";
color:windowtext;}
span.EmailStyle21
{mso-style-type:personal;
font-family:"Arial","sans-serif";
color:#1F497D;}
span.EmailStyle22
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle23
{mso-style-type:personal;
font-family:"Arial","sans-serif";
color:#1F497D;}
span.EmailStyle24
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle25
{mso-style-type:personal-reply;
font-family:"Arial","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span \
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D">Bug \
has been created, <a \
href="https://trac.osgeo.org/postgis/ticket/3451">#3451</a>.<o:p></o:p></span></p> <p \
class="MsoNormal"><span \
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span \
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D">Thanks \
again.<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span \
style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span \
style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> \
postgis-users [mailto:postgis-users-bounces@lists.osgeo.org] <b>On Behalf Of \
</b>Regina Obe<br> <b>Sent:</b> Monday, February 08, 2016 11:18 AM<br>
<b>To:</b> 'PostGIS Users Discussion'<br>
<b>Subject:</b> Re: [postgis-users] Tiger geocoder - error instead of null when \
unlocatable<o:p></o:p></span></p> </div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">Matthew,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Now that you mention it I have run \
into the same issue myself especially since county is such a common table \
name.<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="color:#1F497D"><o:p> </o:p></span></p> <p class="MsoNormal"><span \
style="color:#1F497D">Go ahead and enter a ticket to request schema qualifying. \
It has been something I've been thinking of doing anyway.<o:p></o:p></span></p> <p \
class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p> <p \
class="MsoNormal"><span style="color:#1F497D">Thanks,<o:p></o:p></span></p> <p \
class="MsoNormal"><span style="color:#1F497D">Regina<o:p></o:p></span></p> <p \
class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p> <div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-left:.5in"><b>From:</b> postgis-users [<a \
href="mailto:postgis-users-bounces@lists.osgeo.org">mailto:postgis-users-bounces@lists.osgeo.org</a>]
<b>On Behalf Of </b>Matthew Syphus<br>
<b>Sent:</b> Monday, February 08, 2016 1:09 PM<br>
<b>To:</b> PostGIS Users Discussion <<a \
href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a>><br> \
<b>Subject:</b> Re: [postgis-users] Tiger geocoder - error instead of null when \
unlocatable<o:p></o:p></p> </div>
</div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:.5in"><span \
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D">Regina,<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span \
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D">Thank \
you for looking into this. Before entering a bug I did some other checks and \
believe I’ve found the cause.<o:p></o:p></span></p> <p class="MsoNormal" \
style="margin-left:.5in"><span \
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span \
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D">The \
function in question creates a query without schema-qualified table names. \
<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left:.5in"><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:#1F497D">ERROR: column co.statefp does not \
exist<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left:.5in"><span \
style="font-size:10.0pt;font-family:"Courier New";color:#1F497D">LINE 2: \
...cefp = p.placefp) LEFT JOIN county co ON ('25' = \
co.statefp...<o:p></o:p></span></p> <p class="MsoNormal" \
style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier \
New";color:#1F497D"> & \
nbsp; &nb \
sp;   \
; \
^<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left:.5in"><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:#1F497D">CONTEXT: PL/pgSQL function \
geocode_address(norm_addy,integer,geometry) line 383 at FOR over EXECUTE \
statement<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left:.5in"><span \
style="font-size:10.0pt;font-family:"Courier New";color:#1F497D">PL/pgSQL \
function geocode(norm_addy,integer,geometry) line 14 at FOR over SELECT \
rows<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left:.5in"><span \
style="font-size:10.0pt;font-family:"Courier New";color:#1F497D">PL/pgSQL \
function geocode(character varying,integer,geometry) line 26 at RETURN \
QUERY<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left:.5in"><span \
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span \
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D">I \
have a </span><span style="font-size:10.0pt;font-family:"Courier \
New";color:#1F497D">county</span><span \
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D"> \
table in another schema (also in the search path). After renaming that other \
table it appeared to work. In fact, it returned locations (not just null) \
where it errored out before, meaning it isn’t just unlocatable addresses; it is \
affecting all output. Also, it looks like the table names in the </span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:#1F497D">tiger</span><span \
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D"> \
and </span><span style="font-size:10.0pt;font-family:"Courier \
New";color:#1F497D">tiger_data</span><span \
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D"> \
schemas are not obscure (a good thing) and therefore may be in use somewhere else in \
a database (a bad thing).<o:p></o:p></span></p> <p class="MsoNormal" \
style="margin-left:.5in"><span \
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span \
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D">Can \
the extension be updated so the generated scripts and all functions always use \
schema-qualified table names? I realize that might be a tall order, but it \
seems very easy for table names to collide within the search path. Should I \
still enter this as a bug? <o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span \
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span \
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D">Thanks \
for the excellent work on geocoding (and PostGIS); the address standardizing, data \
import, and geocode results are impressive.<o:p></o:p></span></p> <p \
class="MsoNormal" style="margin-left:.5in"><span \
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span \
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D">Matthew<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span \
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-left:.5in"><b><span \
style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span \
style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> \
postgis-users [<a href="mailto:postgis-users-bounces@lists.osgeo.org">mailto:postgis-users-bounces@lists.osgeo.org</a>]
<b>On Behalf Of </b>Regina Obe<br>
<b>Sent:</b> Sunday, February 07, 2016 8:45 AM<br>
<b>To:</b> 'PostGIS Users Discussion'<br>
<b>Subject:</b> Re: [postgis-users] Tiger geocoder - error instead of null when \
unlocatable<o:p></o:p></span></p> </div>
</div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:.5in"><span \
style="color:#1F497D">Matthew,<o:p></o:p></span></p> <p class="MsoNormal" \
style="margin-left:.5in"><span style="color:#1F497D"><o:p> </o:p></span></p> <p \
class="MsoNormal" style="margin-left:.5in"><span style="color:#1F497D">Can you ticket \
this one in our ticket tracker - <a \
href="http://postgis.net/support/">http://postgis.net/support/</a><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span \
style="color:#1F497D"><o:p> </o:p></span></p> <p class="MsoNormal" \
style="margin-left:.5in"><span style="color:#1F497D">Unfortunately I don't have Idaho \
data loaded in my instance and can't trigger the problem with the data I have just by \
replacing the state.<o:p></o:p></span></p> <p class="MsoNormal" \
style="margin-left:.5in"><span style="color:#1F497D"><o:p> </o:p></span></p> <p \
class="MsoNormal" style="margin-left:.5in"><span style="color:#1F497D">It does sound \
like a bug though if other addresses work. I'll try to take a look at it next \
week while I'm looking at other tiger issues.<o:p></o:p></span></p> <p \
class="MsoNormal" style="margin-left:.5in"><span \
style="color:#1F497D"><o:p> </o:p></span></p> <p class="MsoNormal" \
style="margin-left:.5in"><span style="color:#1F497D">Thanks,<o:p></o:p></span></p> <p \
class="MsoNormal" style="margin-left:.5in"><span \
style="color:#1F497D">Regina<o:p></o:p></span></p> <p class="MsoNormal" \
style="margin-left:.5in"><span style="color:#1F497D"><a \
href="http://www.postgis.us">http://www.postgis.us</a><o:p></o:p></span></p> <p \
class="MsoNormal" style="margin-left:.5in"><span style="color:#1F497D"><a \
href="http://postgis.net">http://postgis.net</a><o:p></o:p></span></p> <p \
class="MsoNormal" style="margin-left:.5in"><span \
style="color:#1F497D"><o:p> </o:p></span></p> <p class="MsoNormal" \
style="margin-left:.5in"><span style="color:#1F497D"><o:p> </o:p></span></p> <p \
class="MsoNormal" style="margin-left:.5in"><span \
style="color:#1F497D"><o:p> </o:p></span></p> <p class="MsoNormal" \
style="margin-left:.5in"><span style="color:#1F497D"><o:p> </o:p></span></p> <p \
class="MsoNormal" style="margin-left:.5in"><span \
style="color:#1F497D"><o:p> </o:p></span></p> <div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-left:1.0in"><b>From:</b> postgis-users [<a \
href="mailto:postgis-users-bounces@lists.osgeo.org">mailto:postgis-users-bounces@lists.osgeo.org</a>]
<b>On Behalf Of </b>Matthew Syphus<br>
<b>Sent:</b> Sunday, February 07, 2016 12:43 AM<br>
<b>To:</b> PostGIS Users Discussion <<a \
href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a>><br> \
<b>Subject:</b> Re: [postgis-users] Tiger geocoder - error instead of null when \
unlocatable<o:p></o:p></p> </div>
</div>
<p class="MsoNormal" style="margin-left:1.0in"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:1.0in"><span \
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D">Apologies \
for not including version details originally.<o:p></o:p></span></p> <p \
class="MsoNormal" style="margin-left:1.0in"><span \
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span \
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D">"postgis_full_version"<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span \
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D">"POSTGIS="2.2.1 \
r14555" GEOS="3.5.0-CAPI-1.9.0 r4084" PROJ="Rel. 4.8.0, 6 March \
2012" GDAL="GDAL 1.10.1, released 2013/08/26" LIBXML="2.7.6" \
LIBJSON="0.11" TOPOLOGY RASTER"<o:p></o:p></span></p> <p \
class="MsoNormal" style="margin-left:1.0in"><span \
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span \
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D">PostgreSQL \
9.5.0<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left:1.0in"><span \
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D">CentOS \
6.5<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left:1.0in"><span \
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span \
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D">mst<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span \
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-left:1.0in"><b><span \
style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span \
style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> \
postgis-users [<a href="mailto:postgis-users-bounces@lists.osgeo.org">mailto:postgis-users-bounces@lists.osgeo.org</a>]
<b>On Behalf Of </b>Matthew Syphus<br>
<b>Sent:</b> Saturday, February 06, 2016 9:06 PM<br>
<b>To:</b> <a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<b>Subject:</b> [postgis-users] Tiger geocoder - error instead of null when \
unlocatable<o:p></o:p></span></p> </div>
</div>
<p class="MsoNormal" style="margin-left:1.0in"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:1.0in"><span \
style="font-size:10.0pt;font-family:"Arial","sans-serif"">After \
following the instructions (several times) and apparently successfully installing \
tiger geocoder and the tiger data for Idaho, I keep getting an error when the \
geocoder can’t find an address.<o:p></o:p></span></p> <p class="MsoNormal" \
style="margin-left:1.0in"><span \
style="font-size:10.0pt;font-family:"Arial","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span \
style="font-size:10.0pt;font-family:"Arial","sans-serif"">With a \
locatable address it works just fine.<o:p></o:p></span></p> <p class="MsoNormal" \
style="margin-left:1.0in"><span style="font-size:10.0pt;font-family:"Courier \
New"">SELECT * FROM geocode('3300 state st, boise, id \
83703')<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left:1.0in"><span \
style="font-size:10.0pt;font-family:"Arial","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span \
style="font-size:10.0pt;font-family:"Arial","sans-serif"">When an \
address is not locatable, I assume it should return null (and move on to the next in \
the batch).<o:p></o:p></span></p> <p class="MsoNormal" \
style="margin-left:1.0in"><span \
style="font-size:10.0pt;font-family:"Arial","sans-serif"">Instead, \
it returns an error:<o:p></o:p></span></p> <p class="MsoNormal" \
style="margin-left:1.0in"><span style="font-size:10.0pt;font-family:"Courier \
New""><o:p> </o:p></span></p> <p class="MsoNormal" \
style="margin-left:1.0in"><span style="font-size:10.0pt;font-family:"Courier \
New"">SELECT * FROM geocode(‘3300 state st, neverland, id \
9876543210’)<o:p></o:p></span></p> <p class="MsoNormal" \
style="margin-left:1.0in"><span style="font-size:10.0pt;font-family:"Courier \
New""><o:p> </o:p></span></p> <p class="MsoNormal" \
style="margin-left:1.0in"><span style="font-size:10.0pt;font-family:"Courier \
New"">---------------------------------------<o:p></o:p></span></p> <p \
class="MsoNormal" style="margin-left:1.0in"><span \
style="font-size:10.0pt;font-family:"Courier \
New""><o:p> </o:p></span></p> <p class="MsoNormal" \
style="margin-left:1.0in"><span style="font-size:10.0pt;font-family:"Courier \
New"">ERROR: column co.statefp does not exist<o:p></o:p></span></p> <p \
class="MsoNormal" style="margin-left:1.0in"><span \
style="font-size:10.0pt;font-family:"Courier New"">LINE 2: ...cefp = \
p.placefp) LEFT JOIN county co ON ('16' = co.statefp...<o:p></o:p></span></p> \
<p class="MsoNormal" style="margin-left:1.0in"><span \
style="font-size:10.0pt;font-family:"Courier \
New""> &nb \
sp;   \
; \
^<o:p></o:p></span></p> <p class="MsoNormal" \
style="margin-left:1.0in"><span style="font-size:10.0pt;font-family:"Courier \
New"">QUERY: SELECT DISTINCT ON \
(sub.predirabrv,sub.fename,COALESCE(sub.suftypabrv, sub.pretypabrv) \
,sub.sufdirabrv,coalesce(p.name,zip.city,cs.name,co.name),s.stusps,sub.zip)
sub.predirabrv as fedirp, \
sub.fename, COALESCE(sub.suftypabrv, sub.pretypabrv) as \
fetype, sub.sufdirabrv as fedirs, \
coalesce(p.name,zip.city,cs.name,co.name)::varchar as place, \
s.stusps as state, sub.zip as zip, \
interpolate_from_address($1, sub.fromhn, \
…<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left:1.0in"><span \
style="font-size:10.0pt;font-family:"Arial","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span \
style="font-size:10.0pt;font-family:"Arial","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span \
style="font-size:10.0pt;font-family:"Arial","sans-serif"">It \
doesn’t seem to matter which address element causes the problem, the error is \
the same and it kills the query. Is there some error handling that is getting \
missed? The examples I’ve seen look like it just returns null. Thank you \
for any help.<o:p></o:p></span></p> <p class="MsoNormal" \
style="margin-left:1.0in"><span \
style="font-size:10.0pt;font-family:"Arial","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span \
style="font-size:10.0pt;font-family:"Arial","sans-serif"">mst<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span \
style="font-size:10.0pt;font-family:"Arial","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span \
style="font-size:10.0pt;font-family:"Arial","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span \
style="font-size:12.0pt;font-family:"Times New \
Roman","serif""><o:p> </o:p></span></p> <p \
style="margin-left:1.0in"> <o:p></o:p></p> <div style="margin-left:.5in">
<div style="margin-left:.5in">
<div class="MsoNormal" align="center" style="text-align:center"><span \
style="font-size:12.0pt;font-family:"Times New Roman","serif""> \
<hr size="2" width="100%" align="center"> </span></div>
</div>
</div>
<p style="margin-left:1.0in">This email has been scanned for spam and viruses by \
Proofpoint Essentials cloud email security - click <a \
href="https://us1.proofpointessentials.com/index01.php?mod_id=11&mod_option=logitem&mail_id=Z07c%2BrvT0fHg&rid=6780640&report=1">
here</a> to report this email as spam.<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:1.0in"><span \
style="font-size:12.0pt;font-family:"Times New \
Roman","serif""><o:p> </o:p></span></p> <p class="MsoNormal" \
style="margin-left:.5in"><span style="font-size:12.0pt;font-family:"Times New \
Roman","serif""><o:p> </o:p></span></p> <p \
style="margin-left:.5in"> <o:p></o:p></p> <div style="margin-left:.5in">
<div class="MsoNormal" align="center" style="text-align:center"><span \
style="font-size:12.0pt;font-family:"Times New Roman","serif""> \
<hr size="2" width="100%" align="center"> </span></div>
</div>
<p style="margin-left:.5in">This email has been scanned for spam and viruses by \
Proofpoint Essentials cloud email security - click <a \
href="https://us1.proofpointessentials.com/index01.php?mod_id=11&mod_option=logitem&mail_id=fwStnh5A4b6W&rid=6780640&report=1">
here</a> to report this email as spam.<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in"><span \
style="font-size:12.0pt;font-family:"Times New \
Roman","serif""><o:p> </o:p></span></p> <p \
class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New \
Roman","serif""><o:p> </o:p></span></p> <p> <o:p></o:p></p>
<div class="MsoNormal" align="center" style="text-align:center"><span \
style="font-size:12.0pt;font-family:"Times New Roman","serif""> \
<hr size="2" width="100%" align="center"> </span></div>
<p>This email has been scanned for spam and viruses by Proofpoint Essentials cloud \
email security - click <a \
href="https://us1.proofpointessentials.com/index01.php?mod_id=11&mod_option=logitem&mail_id=jhne-RR8qQM1&rid=6780640&report=1">
here</a> to report this email as spam.<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New \
Roman","serif""><o:p> </o:p></span></p> </div>
</body>
</html>
[Attachment #4 (unknown)]
_______________________________________________
postgis-users mailing list
postgis-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/postgis-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic