Order By Location

I have different types of nodes in my database called events and posts and each of them has a location property that will contain a spatial point of latitude and longitude. I would like to implement a query that will get me all events and posts and groups them by location ie geospatial clusters as long as they are within 5 miles of each other. How would I go about doing that?