Skip to content
Mario Basa edited this page Jan 29, 2024 · 1 revision

Bulk Address Geocoding

This is how multiple addresses can be geocoded from a table inside a PostgreSQL Database.

  • create and populate a table that contains an address column to hold the Japanese addresses data.

  • add a column named gc that is of type geores.

ALTER TABLE table_name ADD COLUMN gc geores;
  • geocode all the addresses of the table and save the geocoder results into the column gc.
UPDATE table_name SET gc = geocoder( address );
  • display the geocoder result code and x,y coordinates of the address
SELECT address,(gc).code,(gc).x,(gc).y FROM table_name;