in payloadHandler.py [0:0]
def createRegionObject(self, city, state) -> None:
i=0
region = {
"latitudeMin":39.625923,
"longitudeMin":-105.036412,
"latitudeMax":39.833554,
"longitudeMax":-104.731846
}
#get regional/city bbox coordinates from OSM
r = requests.get('https://nominatim.openstreetmap.org/search?q=' + city + ' ' + state + '&format=geojson')
data = json.loads(r.text)
if data:
#just take first one, no sense in getting precise
lst = data['features'][0]['bbox']
for key in region:
region[key]= lst[i]
i=i+1
return region