Find the NW and SE coordinates for a given center

Hello, I have the lat, log for a location and I want to get the NW and SE coordinates for a specific radius e.g. 10 miles around the location. I want to do this programmatically so I can pass the the NW and SE boundaries to the purpleair api to get a list of sensors in that region. I can then collect the data from each of those sensors to determine the AQI. How can I find the NW and SE coordinates to use with the api?

If you’re just doing a one-off, you could use Google Maps to get coordinates, or this “Find Terminal Coordinates” calculator at

But if you want to do it programmatically, maybe this page will help:

Purple Air is using a rectangle/square not a circle, but I’ll leave it to you to figure out what workaround for that works for you.