Finds the official street behind a messy, abbreviated or incomplete name, and records how it got to the answer.
PL/pgSQLPostgreSQL
What it is
PL/pgSQL module that finds the official street from a name written any which way: abbreviated, incomplete, misspelled. It always returns an answer, and says how it decided.
What it is for
Standardize street names in administrative datasets, returning the official code and name of the street and explaining how it was decided.
What it does
Searches up to three scopes, from the narrowest to the widest: neighborhood, surroundings and city.
Understands compound addresses and hyphenated names.
14-phase cascade, from exact match to the most approximate.
Always returns exactly one row, with the most informative failure when it finds nothing.
Records the method used in each resolution.
Parameters adjustable in a table, ready to run in batch and in parallel.
How a messy name becomes the official street.
Technologies
PostgreSQL
PostGIS
PL/pgSQL
pg_trgm
unaccent
fuzzystrmatch
Security
Runs inside the database, without taking data out.