Opened 9 years ago

Closed 7 years ago

#3162 closed defect (worksforme)

geocode_intersection crashes on an intersection

Reported by: alexreinhart Owned by: robe
Priority: medium Milestone: PostGIS 2.3.3
Component: tiger geocoder Version: 2.1.x
Keywords: Cc:

Description

I am using the Pennsylvania TIGER data (loaded with Loader_Generate_Script) to geocode a large quantity of addresses. I consistently get the following error in geocode_intersection with one intersection:

crime=# SELECT rating, pprint_addy(addy), st_astext(geomout)
crime-# FROM geocode_intersection('Brighton Rd', 'Viruth St', 'PA', 'Pittsburgh', '15212');
ERROR:  invalid input syntax for integer: "3865-99"
CONTEXT:  PL/pgSQL function geocode_intersection(text,text,text,text,text,integer) line 122 at assignment

Google Maps suggests the intersection does exist, but I don't have an easy way to examine the TIGER data to see if it's included.

Thanks.

Change History (7)

comment:1 by robe, 9 years ago

Milestone: PostGIS 2.1.8PostGIS 2.2.0

comment:2 by robe, 9 years ago

It's possible I fixed this already or the tiger 2015 data doesn't have the offending record. I don't seem to be able to replicate the issue with tiger 2015 data in PostGIS 2.2 for PA.

When I run:

SELECT rating, pprint_addy(addy), st_astext(geomout)
 FROM geocode_intersection('Brighton Rd', 'Viruth St', 'PA', 'Pittsburgh', '15212');

I get:

 rating |              pprint_addy               |          st_astext
--------+----------------------------------------+-----------------------------
      0 | 3873 Brighton Rd, Pittsburgh, PA 15212 | POINT(-80.036731 40.486403)
      0 | 3880 Brighton Rd, Pittsburgh, PA 15212 | POINT(-80.036731 40.486403)
      0 | 3871 Brighton Rd, Pittsburgh, PA 15212 | POINT(-80.036731 40.486403)
      0 | 3878 Brighton Rd, Pittsburgh, PA 15212 | POINT(-80.036731 40.486403)

and

SELECT rating, pprint_addy(addy), st_astext(geomout)
 FROM geocode_intersection('Viruth St', 'Brighton Rd', 'PA', 'Pittsburgh', '15212');

returns:

 rating |             pprint_addy              |          st_astext
--------+--------------------------------------+-----------------------------
      0 | 1899 Viruth St, Pittsburgh, PA 15212 | POINT(-80.036731 40.486403)
      0 | 1898 Viruth St, Pittsburgh, PA 15212 | POINT(-80.036731 40.486403)
(2 rows)

comment:3 by robe, 9 years ago

Resolution: worksforme
Status: newclosed

comment:4 by nickbabcock, 8 years ago

I'm having the same error after about the 10,000th address geocoded using the Michigan TIGER data set:

select pprint_addy(addy), rating 
  FROM geocode_intersection('S FOREST', 'WASHTENAW', 'MI', 'ANN ARBOR', '48104');

Here are the versions (they're recent):

 PostgreSQL 9.5.1 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2,
 64-bit POSTGIS="2.2.1 r14555" GEOS="3.4.2-CAPI-1.8.2 r3921" PROJ="Rel. 4.8.0,
 6 March 2012" GDAL="GDAL 1.10.1, released 2013/08/26" LIBXML="2.9.1" LIBJSON="0.11.99"
 TOPOLOGY RASTER

comment:5 by robe, 8 years ago

Milestone: PostGIS 2.2.0PostGIS 2.1.9
Resolution: worksforme
Status: closedreopened

comment:6 by pramsey, 7 years ago

Milestone: PostGIS 2.1.9PostGIS 2.2.6

comment:7 by robe, 7 years ago

Milestone: PostGIS 2.2.6PostGIS 2.3.3
Resolution: worksforme
Status: reopenedclosed

Just ran this on my 2.4.0 and 2.3.3 installs:

SELECT pprint_addy(addy), rating 
  FROM geocode_intersection('S FOREST', 'WASHTENAW', 'MI', 'ANN ARBOR', '48104');


           pprint_addy            | rating
----------------------------------+--------
 1298 Forest, Ann Arbor, MI 48104 |      0
 917 Forest, Ann Arbor, MI 48104  |      0
 S Forest Ave, Ann Arbor, MI      |      6
(3 rows)



So I'm going to mark this as a works for me in 2.3.3

Note: See TracTickets for help on using tickets.