[postgis-devel] Updates to address standardizer

Stephen Woodbridge woodbri at swoodbridge.com
Fri Apr 26 15:09:18 PDT 2013


Don't forget to drop extension and the create extension to get the new 
code in your database. Also look at my prior email for how to 
standardize you table. the api has changed.

-Steve

On 4/26/2013 5:58 PM, maplabs at light42.com wrote:
> On Fri, 26 Apr 2013 10:07:37 -0700, maplabs at light42.com wrote:
> does this call look right to you Steve?
>  >
>  > create table cc_s_03_13_std_addr as
>  > select (f).* from ( select c.pkey,
>  >   standardize_address(
>  >     'select * from lex'::text,
>  >     'select * from gaz'::text,
>  >     'select * from rules'::text,
>  >     'select 1::integer as id, address as micro, city||'', CA ''||zip
> as macro
>  >       from cc_s_h_03_13'::text
>  >   ) as f
>  > from cc_s_h_03_13 c offset 0)
>  > s;
>  >
>
>
> Something isnt right with that.. it makes far too many results..
>
> at any rate, I disregarded sew-refactor2 and built sew-refactor
>
> This appears to run.. starting to look into it now..
>
> --
>
> drop table if exists cc_sales_std_addrs_03_13 cascade;  create table
> cc_sales_std_addrs_03_13 (id integer not null primary key,building
> varchar,house_num varchar,predir varchar,qual varchar,pretype
> varchar,name varchar,suftype varchar,sufdir varchar,ruralroute
> varchar,extra varchar,city varchar,state varchar,country
> varchar,postcode varchar,box varchar,unit varchar,name_dmeta varchar);
>
> insert into cc_sales_std_addrs_03_13 (id, building, house_num, predir,
> qual, pretype, name, suftype, sufdir, ruralroute, extra, city, state,
> country, postcode, box, unit, name_dmeta)select *,
> coalesce(nullif(dmetaphone(name),''), name) as name_dmetafrom
> standardize_address('select * from lex order by id','select * from gaz
> order by id','select * from rules order by id','select pkey as
> id,address as micro,array_to_string(ARRAY[city,''CA'',zip], '','') as
> macrofrom cc_sales_history_03_13order by pkey');
>
>
> --
>
> Brian M Hamlin
>
> OSGeo California Chapter
>
> 415-717-4462 cell
>
>




More information about the postgis-devel mailing list