[postgis-users] Geocoder (from extras)

Paragon Corporation lr at pcorp.us
Thu Apr 28 14:41:48 PDT 2011


Jonathan,
Attach it to this ticket.
http://trac.osgeo.org/postgis/ticket/908
 
I'm setting up a couple of CentOS boxes now and when I'm thru with the
benchmarking I'm doing for another project,  I'll be testing tiger geocoder
on them.
 
Thanks,
Regina
http://www.postgis.us
 


  _____  

From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of
Johnathan Leppert
Sent: Thursday, April 28, 2011 5:28 PM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] Geocoder (from extras)


Hi Regina,

Great, thanks! Do you want me to also send my changes for your review to the
linux version of the shell loader script? I fixed some syntax errors and
re-worked how it loops over files. 

Thank you,

Johnathan


On Thu, Apr 28, 2011 at 5:00 PM, Paragon Corporation <lr at pcorp.us> wrote:


Jonathan,
 
Sorry about that.  My fault.  I accidentally commented something out not
intending to.
 
The second function in that file should be
 
CREATE OR REPLACE FUNCTION reverse_geocode(IN pt geometry, OUT intpt
geometry[],
    OUT addy NORM_ADDY[],
    OUT street varchar[]) RETURNS RECORD
AS 
$$
-- default to not including street range in cross streets
    SELECT reverse_geocode($1,false);
$$
language sql STABLE;
 
I'll patch this in subversion.
 
Thanks,
Regina
http://www.postgis.us


  _____  


From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of
Johnathan Leppert

Sent: Thursday, April 28, 2011 4:14 PM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] Geocoder (from extras)


Yes I do, but my problem occurs when running the SQL to install the various
functions into that schema. I had to comment out geocode/reverse_geocode. 
sql (which is included as part of create_geocode.sql) in order for the rest
to install successfully.

There appears to be a syntax error with the reverse_geocode function:

psql:geocode/reverse_geocode. 
sql:101: ERROR:  return type mismatch in function declared to return record
DETAIL:  Function's final statement must be SELECT or INSERT/UPDATE/DELETE
RETURNING.
CONTEXT:  SQL function "reverse_geocode"

I'm not too familiar with writing them, so I'm not able to stop/debug the
error. Any ideas?

Thanks,

Johnathan



On Thu, Apr 28, 2011 at 4:09 PM, Paragon Corporation <lr at pcorp.us> wrote:


All the functions should have been installed in tiger schema.
Do you have a  tiger schema?
 
Leo
 <http://www.postgis.us> http://www.postgis.us

  _____  

From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of
Johnathan Leppert
Sent: Thursday, April 28, 2011 10:39 AM
To: postgis-users at postgis.refractions.net
Subject: [postgis-users] Geocoder (from extras)


I fixed several bugs in the generated bash script to import US Census
shapefiles. Now I'm having an issue with the reverse geocoder SQL:

postgres at li63-206:/tmp/tiger_2010$ /usr/local/pgsql/bin/psql -d geo -f
./create_geocode.sql
psql:./create_geocode.sql:4: ERROR:  schema "tiger" does not exist
BEGIN
psql:./create_geocode.sql:7: NOTICE:  type "norm_addy" does not exist,
skipping
DROP TYPE
CREATE TYPE
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
psql:geocode/reverse_geocode.sql:101: ERROR:  return type mismatch in
function declared to return record
DETAIL:  Function's final statement must be SELECT or INSERT/UPDATE/DELETE
RETURNING.
CONTEXT:  SQL function "reverse_geocode"
ROLLBACK

Anyone have any ideas? Using postgis-2.0.0SVN

Thanks,

Johnathan


_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users






-- 
Johnathan 
Software Architect & Developer
Columbus, Ohio
Follow me on Twitter:  <http://twitter.com/#%21/iamleppert> @iamleppert


_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users






-- 
Johnathan 
Software Architect & Developer
Columbus, Ohio
Follow me on Twitter:  <http://twitter.com/#!/iamleppert> @iamleppert

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20110428/20594fd7/attachment.html>


More information about the postgis-users mailing list