[postgis-tickets] [SCM] PostGIS branch stable-3.1 updated. 3.1.1-2-g3b6b318

git at osgeo.org git at osgeo.org
Mon Feb 1 16:53:02 PST 2021


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".

The branch, stable-3.1 has been updated
       via  3b6b3184d067fcaf4426add0264cdfd1abb15b7b (commit)
      from  23e0327c9555384b0dc32f8a21600b55d53caf54 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 3b6b3184d067fcaf4426add0264cdfd1abb15b7b
Author: Regina Obe <lr at pcorp.us>
Date:   Mon Feb 1 19:52:58 2021 -0500

    Better answers when no zip is provided. Closes #4826 for PostGIS 3.1.2

diff --git a/extras/tiger_geocoder/geocode/geocode_address.sql b/extras/tiger_geocoder/geocode/geocode_address.sql
index cfa8b03..5ce80a9 100644
--- a/extras/tiger_geocoder/geocode/geocode_address.sql
+++ b/extras/tiger_geocoder/geocode/geocode_address.sql
@@ -306,12 +306,12 @@ BEGIN
   -- We use the prequalabr (these are like Old, that may or may not appear in front of the street name)
   -- We also treat pretypabr as fetype since in normalize we treat these as streetypes  and highways usually have the type here
   -- In pprint_addy we changed to put it in front if it is a is_hw type
-    stmt := '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)'
+    stmt := 'SELECT DISTINCT ON (sub.predirabrv,sub.fename,COALESCE(sub.suftypabrv, sub.pretypabrv) ,sub.sufdirabrv,coalesce(p.name,cs.name,zip.city,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,'
+         || '    coalesce(p.name,cs.name,zip.city,co.name)::varchar as place,'
          || '    s.stusps as state,'
          || '    sub.zip as zip,'
          || '    interpolate_from_address($1, sub.fromhn,'
@@ -319,7 +319,7 @@ BEGIN
          || '       (sub.sub_rating + '
          || CASE WHEN parsed.zip > '' THEN '  least((coalesce(diff_zip($7 , sub.zip),0) *$9)::integer, coalesce(levenshtein_ignore_case($7, sub.zip)*$9,0) ) '
             ELSE '3' END::text
-         || ' + coalesce(least(levenshtein_ignore_case($3, coalesce(p.name,zip.city,cs.name,co.name)), levenshtein_ignore_case($3, coalesce(cs.name,co.name))),5) )::integer'
+         || ' + coalesce(least(levenshtein_ignore_case($3, coalesce(p.name,cs.name,zip.city,co.name)), levenshtein_ignore_case($3, coalesce(cs.name,co.name))),5) )::integer'
          || '    as sub_rating,'
          || '    sub.exact_address as exact_address '
          || ' FROM ('
@@ -433,4 +433,3 @@ END;
 $$
   LANGUAGE 'plpgsql' STABLE COST 1000 ROWS 50;
 ALTER FUNCTION geocode_address(IN norm_addy, IN integer, IN geometry) SET join_collapse_limit='2';
-

-----------------------------------------------------------------------

Summary of changes:
 extras/tiger_geocoder/geocode/geocode_address.sql | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list