In the current development version of the controller module there is a feature which resembles what you describe:
.
The difference is that groups are meant to control configuration and management details of devices which are not necessarily related to a location, but you can have one group for each location if you want.
You're already the second person that mentions templates based on locations so one thing we could do in the near future is to specify a location in a group, so that any device assigned to a group automatically gets the location as well.
With the current version (OpenWISP 22.05) the most convenient thing you can do is to create one Template for each location and assign it manually after device registration: since you will have to assign this device to a location anyway, in this step you also assign it the template of the location.
Best regards
Federico CapoanoOpenWISP OÜ
Harjumaa, Tallinn, Sepapaja tn 6, 15551
VAT: EE101989729