sheltermanager / asm3

Animal Shelter Manager
GNU General Public License v3.0
108 stars 64 forks source link

Use smcom_service postal code address finder #306

Closed bobintetley closed 2 years ago

bobintetley commented 6 years ago

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.

bobintetley commented 2 years ago

smcom_geo now has a postcode method for doing this.

bobintetley commented 2 years ago

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.