Closed bobintetley closed 2 years ago
smcom_geo now has a postcode method for doing this.
The new person dialogs (screen + embedded) should have an address find button next to the postcode field for appropriate locales to make the call and populate the address.
This is a two part issue as the service needs creating. Create a postal code to address lookup as part of smcom_service. https://service.sheltermanager.com/service/postal?locale=en&q=90210
Response is json:
{ address: "", "city": "", "state": "", "lat": "", "lon": "" }
For the backing data, use the data from http://federalgovernmentzipcodes.us/ for US postal codes (the locale should be sent with the query so we know which database to query).
Process the data and turn data into a file containing a Python dictionary of postcode: { address details, including lat/lon where available }
For the UK, the PAF should be used if access can be obtained. Worth investigating Australia, Canada and other countries.